_ZN8PfxEntryC2EP8AffixMgr:
   90|      8|    : pmyMgr(pmgr)
   91|      8|    , next(nullptr)
   92|      8|    , nexteq(nullptr)
   93|      8|    , nextne(nullptr)
   94|      8|    , flgnxt(nullptr) {}
_ZN8PfxEntry3addEPKcm:
   97|     11|std::string PfxEntry::add(const char* word, size_t len) {
   98|     11|  std::string result;
   99|     11|  if ((len > strip.size() || (len == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (99:7): [True: 11, False: 0]
  |  Branch (99:8): [True: 11, False: 0]
  |  Branch (99:31): [True: 0, False: 0]
  |  Branch (99:43): [True: 0, False: 0]
  ------------------
  100|     11|      (len >= numconds) && test_condition(word) &&
  ------------------
  |  Branch (100:7): [True: 11, False: 0]
  |  Branch (100:28): [True: 11, False: 0]
  ------------------
  101|     11|      (strip.empty() ||
  ------------------
  |  Branch (101:8): [True: 11, False: 0]
  ------------------
  102|     11|      (len >= strip.size() && strncmp(word, strip.c_str(), strip.size()) == 0))) {
  ------------------
  |  Branch (102:8): [True: 0, False: 0]
  |  Branch (102:31): [True: 0, False: 0]
  ------------------
  103|       |    /* we have a match so add prefix */
  104|     11|    result.assign(appnd);
  105|     11|    result.append(word + strip.size());
  106|     11|  }
  107|     11|  return result;
  108|     11|}
_ZN8PfxEntry9checkwordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiictR12AffixScratch:
  213|  1.36M|                                   AffixScratch& scratch) {
  214|  1.36M|  struct hentry* he;  // hash entry of root word or NULL
  215|       |
  216|       |  // on entry prefix is 0 length or already matches the beginning of the word.
  217|       |  // So if the remaining root word has positive length
  218|       |  // and if there are enough chars in root word and added back strip chars
  219|       |  // to meet the number of characters conditions, then test it
  220|       |
  221|  1.36M|  int tmpl = len - appnd.size(); // length of tmpword
  222|       |
  223|  1.36M|  if (tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) {
  ------------------
  |  Branch (223:7): [True: 1.36M, False: 2.77k]
  |  Branch (223:20): [True: 2.77k, False: 0]
  |  Branch (223:33): [True: 0, False: 2.77k]
  ------------------
  224|       |    // generate new root word by removing prefix and adding
  225|       |    // back any characters that would have been stripped
  226|       |
  227|  1.36M|    std::string& tmpword = scratch.pfx_check_word;
  228|  1.36M|    tmpword.assign(strip);
  229|  1.36M|    tmpword.append(word, start + appnd.size(), tmpl);
  230|       |
  231|       |    // now make sure all of the conditions on characters
  232|       |    // are met.  Please see the appendix at the end of
  233|       |    // this file for more info on exactly what is being
  234|       |    // tested
  235|       |
  236|       |    // if all conditions are met then check if resulting
  237|       |    // root word in the dictionary
  238|       |
  239|  1.36M|    if (test_condition(tmpword)) {
  ------------------
  |  Branch (239:9): [True: 16.4k, False: 1.34M]
  ------------------
  240|  16.4k|      tmpl += strip.size();
  241|  16.4k|      if ((he = pmyMgr->lookup(tmpword.c_str(), tmpword.size())) != nullptr) {
  ------------------
  |  Branch (241:11): [True: 3, False: 16.4k]
  ------------------
  242|      3|        do {
  243|      3|          if (TESTAFF(he->astr, aflag, he->alen) &&
  ------------------
  |  |   99|      6|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 3]
  |  |  ------------------
  ------------------
  |  Branch (243:15): [True: 0, False: 3]
  ------------------
  244|       |              // forbid single prefixes with needaffix flag
  245|      0|              !TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
  ------------------
  |  |   99|      3|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (245:15): [True: 0, False: 0]
  ------------------
  246|       |              // a circumfix prefix needs a matching circumfix suffix, so it
  247|       |              // cannot stand on its own
  248|      0|              !TESTAFF(contclass, pmyMgr->get_circumfix(), contclasslen) &&
  ------------------
  |  |   99|      3|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (248:15): [True: 0, False: 0]
  ------------------
  249|       |              // needflag
  250|      0|              ((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (250:16): [True: 0, False: 0]
  ------------------
  251|      0|               (contclass && TESTAFF(contclass, needflag, contclasslen))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (251:17): [True: 0, False: 0]
  ------------------
  252|      0|            return he;
  253|      3|          he = he->next_homonym;  // check homonyms
  254|      3|        } while (he);
  ------------------
  |  Branch (254:18): [True: 0, False: 3]
  ------------------
  255|      3|      }
  256|       |
  257|       |      // prefix matched but no root word was found
  258|       |      // if aeXPRODUCT is allowed, try again but now
  259|       |      // ross checked combined with a suffix
  260|       |
  261|       |      // if ((opts & aeXPRODUCT) && in_compound) {
  262|  16.4k|      if ((opts & aeXPRODUCT)) {
  ------------------
  |  |   65|  16.4k|#define aeXPRODUCT (1 << 0)
  ------------------
  |  Branch (262:11): [True: 16.4k, False: 0]
  ------------------
  263|  16.4k|        he = pmyMgr->suffix_check(tmpword, 0, tmpl, aeXPRODUCT, this,
  ------------------
  |  |   65|  16.4k|#define aeXPRODUCT (1 << 0)
  ------------------
  264|  16.4k|                                  scratch, FLAG_NULL, needflag, in_compound);
  ------------------
  |  |   96|  16.4k|#define FLAG_NULL 0x00
  ------------------
  265|  16.4k|        if (he)
  ------------------
  |  Branch (265:13): [True: 0, False: 16.4k]
  ------------------
  266|      0|          return he;
  267|  16.4k|      }
  268|  16.4k|    }
  269|  1.36M|  }
  270|  1.36M|  return nullptr;
  271|  1.36M|}
_ZN8PfxEntry12check_twosfxERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiictR12AffixScratch:
  279|  1.35M|                                      AffixScratch& scratch) {
  280|       |  // on entry prefix is 0 length or already matches the beginning of the word.
  281|       |  // So if the remaining root word has positive length
  282|       |  // and if there are enough chars in root word and added back strip chars
  283|       |  // to meet the number of characters conditions, then test it
  284|       |
  285|  1.35M|  int tmpl = len - appnd.size(); // length of tmpword
  286|       |
  287|  1.35M|  if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (287:8): [True: 1.35M, False: 2.70k]
  |  Branch (287:21): [True: 2.70k, False: 0]
  |  Branch (287:34): [True: 0, False: 2.70k]
  ------------------
  288|  1.35M|      (tmpl + strip.size() >= numconds)) {
  ------------------
  |  Branch (288:7): [True: 1.30M, False: 50.9k]
  ------------------
  289|       |    // generate new root word by removing prefix and adding
  290|       |    // back any characters that would have been stripped
  291|       |
  292|  1.30M|    std::string& tmpword = scratch.pfx_check_twosfx;
  293|  1.30M|    tmpword.assign(strip);
  294|  1.30M|    tmpword.append(word, start + appnd.size(), tmpl);
  295|       |
  296|       |    // now make sure all of the conditions on characters
  297|       |    // are met.  Please see the appendix at the end of
  298|       |    // this file for more info on exactly what is being
  299|       |    // tested
  300|       |
  301|       |    // if all conditions are met then check if resulting
  302|       |    // root word in the dictionary
  303|       |
  304|  1.30M|    if (test_condition(tmpword)) {
  ------------------
  |  Branch (304:9): [True: 11.6k, False: 1.29M]
  ------------------
  305|  11.6k|      tmpl += strip.size();
  306|       |
  307|       |      // prefix matched but no root word was found
  308|       |      // if aeXPRODUCT is allowed, try again but now
  309|       |      // cross checked combined with a suffix
  310|       |
  311|  11.6k|      if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   65|  11.6k|#define aeXPRODUCT (1 << 0)
  ------------------
                    if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   73|  11.6k|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (311:11): [True: 11.6k, False: 0]
  |  Branch (311:34): [True: 11.6k, False: 0]
  ------------------
  312|       |        // hash entry of root word or NULL
  313|  11.6k|        struct hentry* he = pmyMgr->suffix_check_twosfx(tmpword, 0, tmpl, aeXPRODUCT, this,
  ------------------
  |  |   65|  11.6k|#define aeXPRODUCT (1 << 0)
  ------------------
  314|  11.6k|                                                        scratch, needflag);
  315|  11.6k|        if (he)
  ------------------
  |  Branch (315:13): [True: 0, False: 11.6k]
  ------------------
  316|      0|          return he;
  317|  11.6k|      }
  318|  11.6k|    }
  319|  1.30M|  }
  320|  1.35M|  return nullptr;
  321|  1.35M|}
_ZN8PfxEntry18check_twosfx_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiictR12AffixScratch:
  329|    575|                                         AffixScratch& scratch) {
  330|    575|  std::string result;
  331|       |  // on entry prefix is 0 length or already matches the beginning of the word.
  332|       |  // So if the remaining root word has positive length
  333|       |  // and if there are enough chars in root word and added back strip chars
  334|       |  // to meet the number of characters conditions, then test it
  335|    575|  int tmpl = len - appnd.size(); // length of tmpword
  336|       |
  337|    575|  if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (337:8): [True: 575, False: 0]
  |  Branch (337:21): [True: 0, False: 0]
  |  Branch (337:34): [True: 0, False: 0]
  ------------------
  338|    575|      (tmpl + strip.size() >= numconds)) {
  ------------------
  |  Branch (338:7): [True: 484, False: 91]
  ------------------
  339|       |    // generate new root word by removing prefix and adding
  340|       |    // back any characters that would have been stripped
  341|       |
  342|    484|    std::string& tmpword = scratch.pfx_check_twosfx;
  343|    484|    tmpword.assign(strip);
  344|    484|    tmpword.append(word, start + appnd.size(), tmpl);
  345|       |
  346|       |    // now make sure all of the conditions on characters
  347|       |    // are met.  Please see the appendix at the end of
  348|       |    // this file for more info on exactly what is being
  349|       |    // tested
  350|       |
  351|       |    // if all conditions are met then check if resulting
  352|       |    // root word in the dictionary
  353|       |
  354|    484|    if (test_condition(tmpword)) {
  ------------------
  |  Branch (354:9): [True: 0, False: 484]
  ------------------
  355|      0|      tmpl += strip.size();
  356|       |
  357|       |      // prefix matched but no root word was found
  358|       |      // if aeXPRODUCT is allowed, try again but now
  359|       |      // ross checked combined with a suffix
  360|       |
  361|      0|      if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   65|      0|#define aeXPRODUCT (1 << 0)
  ------------------
                    if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (361:11): [True: 0, False: 0]
  |  Branch (361:34): [True: 0, False: 0]
  ------------------
  362|      0|        result = pmyMgr->suffix_check_twosfx_morph(tmpword, 0, tmpl,
  363|      0|                                                   aeXPRODUCT,
  ------------------
  |  |   65|      0|#define aeXPRODUCT (1 << 0)
  ------------------
  364|      0|                                                   this, scratch, needflag);
  365|      0|      }
  366|      0|    }
  367|    484|  }
  368|    575|  return result;
  369|    575|}
_ZN8PfxEntry11check_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiictR12AffixScratch:
  377|    576|                                  AffixScratch& scratch) {
  378|    576|  std::string result;
  379|       |
  380|       |  // on entry prefix is 0 length or already matches the beginning of the word.
  381|       |  // So if the remaining root word has positive length
  382|       |  // and if there are enough chars in root word and added back strip chars
  383|       |  // to meet the number of characters conditions, then test it
  384|       |
  385|    576|  int tmpl = len - appnd.size(); // length of tmpword
  386|       |
  387|    576|  if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (387:8): [True: 576, False: 0]
  |  Branch (387:21): [True: 0, False: 0]
  |  Branch (387:34): [True: 0, False: 0]
  ------------------
  388|    576|      (tmpl + strip.size() >= numconds)) {
  ------------------
  |  Branch (388:7): [True: 485, False: 91]
  ------------------
  389|       |    // generate new root word by removing prefix and adding
  390|       |    // back any characters that would have been stripped
  391|       |
  392|    485|    std::string& tmpword = scratch.pfx_check_word;
  393|    485|    tmpword.assign(strip);
  394|    485|    tmpword.append(word, start + appnd.size(), tmpl);
  395|       |
  396|       |    // now make sure all of the conditions on characters
  397|       |    // are met.  Please see the appendix at the end of
  398|       |    // this file for more info on exactly what is being
  399|       |    // tested
  400|       |
  401|       |    // if all conditions are met then check if resulting
  402|       |    // root word in the dictionary
  403|       |
  404|    485|    if (test_condition(tmpword)) {
  ------------------
  |  Branch (404:9): [True: 1, False: 484]
  ------------------
  405|      1|      tmpl += strip.size();
  406|      1|      struct hentry* he;  // hash entry of root word or NULL
  407|      1|      if ((he = pmyMgr->lookup(tmpword.c_str(), tmpword.size())) != nullptr) {
  ------------------
  |  Branch (407:11): [True: 0, False: 1]
  ------------------
  408|      0|        do {
  409|      0|          if (TESTAFF(he->astr, aflag, he->alen) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (409:15): [True: 0, False: 0]
  ------------------
  410|       |              // forbid single prefixes with needaffix flag
  411|      0|              !TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (411:15): [True: 0, False: 0]
  ------------------
  412|       |              // a circumfix prefix needs a matching circumfix suffix, so it
  413|       |              // cannot stand on its own
  414|      0|              !TESTAFF(contclass, pmyMgr->get_circumfix(), contclasslen) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (414:15): [True: 0, False: 0]
  ------------------
  415|       |              // needflag
  416|      0|              ((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (416:16): [True: 0, False: 0]
  ------------------
  417|      0|               (contclass && TESTAFF(contclass, needflag, contclasslen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (417:17): [True: 0, False: 0]
  ------------------
  418|      0|            if (morphcode) {
  ------------------
  |  Branch (418:17): [True: 0, False: 0]
  ------------------
  419|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
  420|      0|              result.append(morphcode);
  421|      0|            } else
  422|      0|              result.append(getKey());
  423|      0|            if (!HENTRY_FIND(he, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (423:17): [True: 0, False: 0]
  ------------------
  424|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
  425|      0|              result.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  426|      0|              result.append(HENTRY_WORD(he));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  427|      0|            }
  428|       |            // store the pointer of the hash entry
  429|      0|            if (HENTRY_DATA(he)) {
  ------------------
  |  Branch (429:17): [True: 0, False: 0]
  ------------------
  430|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
  431|      0|              result.append(HENTRY_DATA2(he));
  432|      0|            } else {
  433|       |              // return with debug information
  434|      0|              std::string flag = pmyMgr->encode_flag(getFlag());
  435|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
  436|      0|              result.append(MORPH_FLAG);
  ------------------
  |  |  117|      0|#define MORPH_FLAG "fl:"
  ------------------
  437|      0|              result.append(flag);
  438|      0|            }
  439|      0|            result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
  440|      0|          }
  441|      0|          he = he->next_homonym;
  442|      0|        } while (he);
  ------------------
  |  Branch (442:18): [True: 0, False: 0]
  ------------------
  443|      0|      }
  444|       |
  445|       |      // prefix matched but no root word was found
  446|       |      // if aeXPRODUCT is allowed, try again but now
  447|       |      // ross checked combined with a suffix
  448|       |
  449|      1|      if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   65|      1|#define aeXPRODUCT (1 << 0)
  ------------------
                    if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
  ------------------
  |  |   73|      1|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (449:11): [True: 1, False: 0]
  |  Branch (449:34): [True: 1, False: 0]
  ------------------
  450|      1|        std::string st = pmyMgr->suffix_check_morph(tmpword, 0, tmpl, aeXPRODUCT, this,
  ------------------
  |  |   65|      1|#define aeXPRODUCT (1 << 0)
  ------------------
  451|      1|                                                    scratch, FLAG_NULL, needflag);
  ------------------
  |  |   96|      1|#define FLAG_NULL 0x00
  ------------------
  452|      1|        if (!st.empty()) {
  ------------------
  |  Branch (452:13): [True: 0, False: 1]
  ------------------
  453|      0|          result.append(st);
  454|      0|        }
  455|      1|      }
  456|      1|    }
  457|    485|  }
  458|       |
  459|    576|  return result;
  460|    576|}
_ZN8SfxEntryC2EP8AffixMgr:
  463|     34|    : pmyMgr(pmgr)  // register affix manager
  464|     34|    , next(nullptr)
  465|     34|    , nexteq(nullptr)
  466|     34|    , nextne(nullptr)
  467|     34|    , flgnxt(nullptr)
  468|     34|    , l_morph(nullptr)
  469|     34|    , r_morph(nullptr)
  470|     34|    , eq_morph(nullptr) {}
_ZN8SfxEntry3addEPKcm:
  473|     28|std::string SfxEntry::add(const char* word, size_t len) {
  474|     28|  std::string result;
  475|       |  /* make sure all conditions match */
  476|     28|  if ((len > strip.size() || (len == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (476:8): [True: 28, False: 0]
  |  Branch (476:31): [True: 0, False: 0]
  |  Branch (476:43): [True: 0, False: 0]
  ------------------
  477|     28|      (len >= numconds) && test_condition(word + len, word) &&
  ------------------
  |  Branch (477:7): [True: 28, False: 0]
  |  Branch (477:28): [True: 28, False: 0]
  ------------------
  478|     28|      (strip.empty() ||
  ------------------
  |  Branch (478:8): [True: 28, False: 0]
  ------------------
  479|     28|       (len >= strip.size() && strcmp(word + len - strip.size(), strip.c_str()) == 0))) {
  ------------------
  |  Branch (479:9): [True: 0, False: 0]
  |  Branch (479:32): [True: 0, False: 0]
  ------------------
  480|     28|    result.assign(word, len);
  481|       |    /* we have a match so add suffix */
  482|     28|    result.replace(len - strip.size(), std::string::npos, appnd);
  483|     28|  }
  484|     28|  return result;
  485|     28|}
_ZN8SfxEntry9checkwordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntrytttR12AffixScratch:
  627|  73.5k|                                   AffixScratch& scratch) {
  628|  73.5k|  struct hentry* he;  // hash entry pointer
  629|  73.5k|  PfxEntry* ep = ppfx;
  630|       |
  631|       |  // if this suffix is being cross checked with a prefix
  632|       |  // but it does not support cross products skip it
  633|       |
  634|  73.5k|  if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0))
  ------------------
  |  |   65|  73.5k|#define aeXPRODUCT (1 << 0)
  ------------------
                if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0))
  ------------------
  |  |   65|      0|#define aeXPRODUCT (1 << 0)
  ------------------
  |  Branch (634:7): [True: 0, False: 73.5k]
  |  Branch (634:41): [True: 0, False: 0]
  ------------------
  635|      0|    return nullptr;
  636|       |
  637|       |  // upon entry suffix is 0 length or already matches the end of the word.
  638|       |  // So if the remaining root word has positive length
  639|       |  // and if there are enough chars in root word and added back strip chars
  640|       |  // to meet the number of characters conditions, then test it
  641|       |
  642|  73.5k|  int tmpl = len - appnd.size(); // length of tmpword
  643|       |  // the second condition is not enough for UTF-8 strings
  644|       |  // it checked in test_condition()
  645|       |
  646|  73.5k|  if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (646:8): [True: 72.2k, False: 1.31k]
  |  Branch (646:21): [True: 1.31k, False: 0]
  |  Branch (646:34): [True: 0, False: 1.31k]
  ------------------
  647|  72.2k|      (tmpl + strip.size() >= numconds)) {
  ------------------
  |  Branch (647:7): [True: 72.2k, False: 0]
  ------------------
  648|       |    // generate new root word by removing suffix and adding
  649|       |    // back any characters that would have been stripped or
  650|       |    // or null terminating the shorter string
  651|       |
  652|  72.2k|    std::string& tmpword = scratch.sfx_check_word;
  653|  72.2k|    tmpword.assign(word, start, tmpl);
  654|  72.2k|    if (!strip.empty()) {
  ------------------
  |  Branch (654:9): [True: 0, False: 72.2k]
  ------------------
  655|      0|      tmpword.append(strip);
  656|      0|    }
  657|       |
  658|  72.2k|    const char* beg = tmpword.c_str();
  659|  72.2k|    const char* end = beg + tmpword.size();
  660|       |
  661|       |    // now make sure all of the conditions on characters
  662|       |    // are met.  Please see the appendix at the end of
  663|       |    // this file for more info on exactly what is being
  664|       |    // tested
  665|       |
  666|       |    // if all conditions are met then check if resulting
  667|       |    // root word in the dictionary
  668|       |
  669|  72.2k|    if (test_condition(end, beg)) {
  ------------------
  |  Branch (669:9): [True: 72.2k, False: 3]
  ------------------
  670|       |#ifdef SZOSZABLYA_POSSIBLE_ROOTS
  671|       |      fprintf(stdout, "%s %s %c\n", word.c_str() + start, beg, aflag);
  672|       |#endif
  673|  72.2k|      if ((he = pmyMgr->lookup(tmpword.c_str(), tmpword.size())) != nullptr) {
  ------------------
  |  Branch (673:11): [True: 102, False: 72.1k]
  ------------------
  674|    102|        do {
  675|       |          // check conditional suffix (enabled by prefix)
  676|    102|          if ((TESTAFF(he->astr, aflag, he->alen) ||
  ------------------
  |  |   99|    204|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 102]
  |  |  ------------------
  ------------------
  |  Branch (676:15): [True: 0, False: 102]
  ------------------
  677|    102|               (ep && ep->getCont() &&
  ------------------
  |  Branch (677:17): [True: 0, False: 102]
  |  Branch (677:23): [True: 0, False: 0]
  ------------------
  678|      0|                TESTAFF(ep->getCont(), aflag, ep->getContLen()))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  679|      0|              (((optflags & aeXPRODUCT) == 0) ||
  ------------------
  |  |   65|      0|#define aeXPRODUCT (1 << 0)
  ------------------
  |  Branch (679:16): [True: 0, False: 0]
  ------------------
  680|      0|               (ep && TESTAFF(he->astr, ep->getFlag(), he->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (680:17): [True: 0, False: 0]
  ------------------
  681|       |               // enabled by prefix
  682|      0|               ((contclass) &&
  ------------------
  |  Branch (682:17): [True: 0, False: 0]
  ------------------
  683|      0|                (ep && TESTAFF(contclass, ep->getFlag(), contclasslen)))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (683:18): [True: 0, False: 0]
  ------------------
  684|       |              // handle cont. class
  685|      0|              ((!cclass) ||
  ------------------
  |  Branch (685:16): [True: 0, False: 0]
  ------------------
  686|      0|               ((contclass) && TESTAFF(contclass, cclass, contclasslen))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (686:17): [True: 0, False: 0]
  ------------------
  687|       |              // check only in compound homonyms (bad flags)
  688|      0|              (!badflag || !TESTAFF(he->astr, badflag, he->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (688:16): [True: 0, False: 0]
  |  Branch (688:28): [True: 0, False: 0]
  ------------------
  689|       |              // handle required flag
  690|      0|              ((!needflag) ||
  ------------------
  |  Branch (690:16): [True: 0, False: 0]
  ------------------
  691|      0|               (TESTAFF(he->astr, needflag, he->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  692|      0|                ((contclass) && TESTAFF(contclass, needflag, contclasslen)))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (692:18): [True: 0, False: 0]
  ------------------
  693|      0|            return he;
  694|    102|          he = he->next_homonym;  // check homonyms
  695|    102|        } while (he);
  ------------------
  |  Branch (695:18): [True: 0, False: 102]
  ------------------
  696|    102|      }
  697|  72.2k|    }
  698|  72.2k|  }
  699|  73.5k|  return nullptr;
  700|  73.5k|}
_ZN8SfxEntry12check_twosfxERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntrytR12AffixScratch:
  709|  36.4k|                                      AffixScratch& scratch) {
  710|  36.4k|  PfxEntry* ep = ppfx;
  711|       |
  712|       |  // if this suffix is being cross checked with a prefix
  713|       |  // but it does not support cross products skip it
  714|       |
  715|  36.4k|  if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0)
  ------------------
  |  |   65|  36.4k|#define aeXPRODUCT (1 << 0)
  ------------------
                if ((optflags & aeXPRODUCT) != 0 && (opts & aeXPRODUCT) == 0)
  ------------------
  |  |   65|      0|#define aeXPRODUCT (1 << 0)
  ------------------
  |  Branch (715:7): [True: 0, False: 36.4k]
  |  Branch (715:39): [True: 0, False: 0]
  ------------------
  716|      0|    return nullptr;
  717|       |
  718|       |  // upon entry suffix is 0 length or already matches the end of the word.
  719|       |  // So if the remaining root word has positive length
  720|       |  // and if there are enough chars in root word and added back strip chars
  721|       |  // to meet the number of characters conditions, then test it
  722|       |
  723|  36.4k|  int tmpl = len - appnd.size(); // length of tmpword
  724|       |
  725|  36.4k|  if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
  ------------------
  |  Branch (725:8): [True: 36.3k, False: 105]
  |  Branch (725:21): [True: 105, False: 0]
  |  Branch (725:34): [True: 0, False: 105]
  ------------------
  726|  36.3k|      (tmpl + strip.size() >= numconds)) {
  ------------------
  |  Branch (726:7): [True: 36.3k, False: 0]
  ------------------
  727|       |    // generate new root word by removing suffix and adding
  728|       |    // back any characters that would have been stripped or
  729|       |    // or null terminating the shorter string
  730|       |
  731|  36.3k|    std::string& tmpword = scratch.sfx_check_twosfx;
  732|  36.3k|    tmpword.assign(word, start);
  733|  36.3k|    tmpword.resize(tmpl);
  734|  36.3k|    tmpword.append(strip);
  735|  36.3k|    tmpl += strip.size();
  736|       |
  737|  36.3k|    const char* beg = tmpword.c_str();
  738|  36.3k|    const char* end = beg + tmpl;
  739|       |
  740|       |    // now make sure all of the conditions on characters
  741|       |    // are met.  Please see the appendix at the end of
  742|       |    // this file for more info on exactly what is being
  743|       |    // tested
  744|       |
  745|       |    // if all conditions are met then recall suffix_check
  746|       |
  747|  36.3k|    if (test_condition(end, beg)) {
  ------------------
  |  Branch (747:9): [True: 36.3k, False: 0]
  ------------------
  748|  36.3k|      struct hentry* he;  // hash entry pointer
  749|  36.3k|      if (ppfx) {
  ------------------
  |  Branch (749:11): [True: 0, False: 36.3k]
  ------------------
  750|       |        // handle conditional suffix
  751|      0|        if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (751:13): [True: 0, False: 0]
  |  Branch (751:13): [True: 0, False: 0]
  ------------------
  752|      0|          he = pmyMgr->suffix_check(tmpword, 0, tmpl, 0, nullptr, scratch, (FLAG)aflag, needflag, IN_CPD_NOT);
  ------------------
  |  |   72|      0|#define IN_CPD_NOT 0
  ------------------
  753|      0|        else
  754|      0|          he = pmyMgr->suffix_check(tmpword, 0, tmpl, optflags, ppfx,
  755|      0|                                    scratch, (FLAG)aflag, needflag, IN_CPD_NOT);
  ------------------
  |  |   72|      0|#define IN_CPD_NOT 0
  ------------------
  756|  36.3k|      } else {
  757|  36.3k|        he = pmyMgr->suffix_check(tmpword, 0, tmpl, 0, nullptr, scratch, (FLAG)aflag, needflag, IN_CPD_NOT);
  ------------------
  |  |   72|  36.3k|#define IN_CPD_NOT 0
  ------------------
  758|  36.3k|      }
  759|  36.3k|      if (he)
  ------------------
  |  Branch (759:11): [True: 0, False: 36.3k]
  ------------------
  760|      0|        return he;
  761|  36.3k|    }
  762|  36.3k|  }
  763|  36.4k|  return nullptr;
  764|  36.4k|}
_ZN8SfxEntry15initReverseWordEv:
  875|     34|void SfxEntry::initReverseWord() {
  876|     34|  rappnd = appnd;
  877|     34|  reverseword(rappnd);
  878|     34|}
_ZN8PfxEntry14test_conditionERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  125|  2.66M|inline int PfxEntry::test_condition(const std::string& s) {
  126|  2.66M|  size_t st = 0;
  127|  2.66M|  size_t pos = std::string::npos;  // group with pos input position
  128|  2.66M|  bool neg = false;        // complementer
  129|  2.66M|  bool ingroup = false;    // character in the group
  130|  2.66M|  if (numconds == 0)
  ------------------
  |  Branch (130:7): [True: 4.81k, False: 2.66M]
  ------------------
  131|  4.81k|    return 1;
  132|  2.66M|  char* p = c.conds;
  133|  2.77M|  while (true) {
  ------------------
  |  Branch (133:10): [True: 2.77M, Folded]
  ------------------
  134|  2.77M|    switch (*p) {
  135|      0|      case '\0':
  ------------------
  |  Branch (135:7): [True: 0, False: 2.77M]
  ------------------
  136|      0|        return 1;
  137|  23.3k|      case '[': {
  ------------------
  |  Branch (137:7): [True: 23.3k, False: 2.75M]
  ------------------
  138|  23.3k|        neg = false;
  139|  23.3k|        ingroup = false;
  140|  23.3k|        p = nextchar(p);
  141|  23.3k|        pos = st;
  142|  23.3k|        break;
  143|      0|      }
  144|  23.3k|      case '^': {
  ------------------
  |  Branch (144:7): [True: 23.3k, False: 2.75M]
  ------------------
  145|  23.3k|        p = nextchar(p);
  146|  23.3k|        neg = true;
  147|  23.3k|        break;
  148|      0|      }
  149|  23.3k|      case ']': {
  ------------------
  |  Branch (149:7): [True: 23.3k, False: 2.75M]
  ------------------
  150|  23.3k|        if (bool(neg) == bool(ingroup))
  ------------------
  |  Branch (150:13): [True: 0, False: 23.3k]
  ------------------
  151|      0|          return 0;
  152|  23.3k|        pos = std::string::npos;
  153|  23.3k|        p = nextchar(p);
  154|       |        // skip the next character
  155|  23.3k|        if (!ingroup && st < s.size())
  ------------------
  |  Branch (155:13): [True: 23.3k, False: 0]
  |  Branch (155:25): [True: 22.0k, False: 1.35k]
  ------------------
  156|  22.0k|          st = (opts & aeUTF8) ? utf8_next(s, st) : st + 1;
  ------------------
  |  |   66|  22.0k|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (156:16): [True: 22.0k, False: 0]
  ------------------
  157|  23.3k|        if (st == s.size() && p)
  ------------------
  |  Branch (157:13): [True: 3.63k, False: 19.7k]
  |  Branch (157:31): [True: 0, False: 3.63k]
  ------------------
  158|      0|          return 0;  // word <= condition
  159|  23.3k|        break;
  160|  23.3k|      }
  161|  23.3k|      case '.':
  ------------------
  |  Branch (161:7): [True: 0, False: 2.77M]
  ------------------
  162|      0|        if (pos == std::string::npos) {  // dots are not metacharacters in groups: [.]
  ------------------
  |  Branch (162:13): [True: 0, False: 0]
  ------------------
  163|      0|          if (st == s.size())
  ------------------
  |  Branch (163:15): [True: 0, False: 0]
  ------------------
  164|      0|            return 0;  // dot has no character to match
  165|      0|          p = nextchar(p);
  166|       |          // skip the next character
  167|      0|          st = (opts & aeUTF8) ? utf8_next(s, st) : st + 1;
  ------------------
  |  |   66|      0|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (167:16): [True: 0, False: 0]
  ------------------
  168|      0|          break;
  169|      0|        }
  170|       |      /* FALLTHROUGH */
  171|  2.70M|      default: {
  ------------------
  |  Branch (171:7): [True: 2.70M, False: 70.1k]
  ------------------
  172|  2.70M|        if (st < s.size() && s[st] == *p) {
  ------------------
  |  Branch (172:13): [True: 2.70M, False: 2.70k]
  |  Branch (172:30): [True: 23.5k, False: 2.68M]
  ------------------
  173|  23.5k|          ++st;
  174|  23.5k|          p = nextchar(p);
  175|  23.5k|          if ((opts & aeUTF8) && (s[st - 1] & 0x80)) {  // multibyte
  ------------------
  |  |   66|  23.5k|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (175:15): [True: 23.5k, False: 0]
  |  Branch (175:34): [True: 23.5k, False: 0]
  ------------------
  176|  46.8k|            while (p && is_utf8_cont(*p)) {             // character
  ------------------
  |  Branch (176:20): [True: 46.8k, False: 0]
  |  Branch (176:25): [True: 23.5k, False: 23.3k]
  ------------------
  177|  23.5k|              if (st >= s.size() || *p != s[st]) {
  ------------------
  |  Branch (177:19): [True: 0, False: 23.5k]
  |  Branch (177:37): [True: 110, False: 23.3k]
  ------------------
  178|    110|                if (pos == std::string::npos)
  ------------------
  |  Branch (178:21): [True: 78, False: 32]
  ------------------
  179|     78|                  return 0;
  180|     32|                st = pos;
  181|     32|                break;
  182|    110|              }
  183|  23.3k|              p = nextchar(p);
  184|  23.3k|              ++st;
  185|  23.3k|            }
  186|  23.4k|            if (pos != std::string::npos && st != pos) {
  ------------------
  |  Branch (186:17): [True: 32, False: 23.3k]
  |  Branch (186:45): [True: 0, False: 32]
  ------------------
  187|      0|              ingroup = true;
  188|      0|              while (p && *p != ']' && ((p = nextchar(p)) != nullptr)) {
  ------------------
  |  Branch (188:22): [True: 0, False: 0]
  |  Branch (188:27): [True: 0, False: 0]
  |  Branch (188:40): [True: 0, False: 0]
  ------------------
  189|      0|              }
  190|      0|            }
  191|  23.4k|          } else if (pos != std::string::npos) {
  ------------------
  |  Branch (191:22): [True: 0, False: 0]
  ------------------
  192|      0|            ingroup = true;
  193|      0|            while (p && *p != ']' && ((p = nextchar(p)) != nullptr)) {
  ------------------
  |  Branch (193:20): [True: 0, False: 0]
  |  Branch (193:25): [True: 0, False: 0]
  |  Branch (193:38): [True: 0, False: 0]
  ------------------
  194|      0|            }
  195|      0|          }
  196|  2.68M|        } else if (pos != std::string::npos) {  // group
  ------------------
  |  Branch (196:20): [True: 46.7k, False: 2.63M]
  ------------------
  197|  46.7k|          p = nextchar(p);
  198|  46.7k|        } else
  199|  2.63M|          return 0;
  200|  2.70M|      }
  201|  2.77M|    }
  202|   140k|    if (!p)
  ------------------
  |  Branch (202:9): [True: 23.3k, False: 116k]
  ------------------
  203|  23.3k|      return 1;
  204|   140k|  }
  205|  2.66M|}
_ZN8PfxEntry8nextcharEPc:
  110|   163k|inline char* PfxEntry::nextchar(char* p) {
  111|   163k|  if (p) {
  ------------------
  |  Branch (111:7): [True: 163k, False: 0]
  ------------------
  112|   163k|    p++;
  113|   163k|    if (opts & aeLONGCOND) {
  ------------------
  |  |   69|   163k|#define aeLONGCOND (1 << 4)
  ------------------
  |  Branch (113:9): [True: 0, False: 163k]
  ------------------
  114|       |      // jump to the 2nd part of the condition
  115|      0|      if (p == c.conds + MAXCONDLEN_1)
  ------------------
  |  |   91|      0|#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char*))
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXCONDLEN 20
  |  |  ------------------
  ------------------
  |  Branch (115:11): [True: 0, False: 0]
  ------------------
  116|      0|        return c.l.conds2;
  117|       |      // end of the MAXCONDLEN length condition
  118|   163k|    } else if (p == c.conds + MAXCONDLEN)
  ------------------
  |  |   90|   163k|#define MAXCONDLEN 20
  ------------------
  |  Branch (118:16): [True: 0, False: 163k]
  ------------------
  119|      0|      return nullptr;
  120|   163k|    return *p ? p : nullptr;
  ------------------
  |  Branch (120:12): [True: 140k, False: 23.3k]
  ------------------
  121|   163k|  }
  122|      0|  return nullptr;
  123|   163k|}
_ZN8SfxEntry14test_conditionEPKcS1_:
  502|   108k|inline int SfxEntry::test_condition(const char* st, const char* beg) {
  503|   108k|  const char* pos = nullptr;  // group with pos input position
  504|   108k|  bool neg = false;        // complementer
  505|   108k|  bool ingroup = false;    // character in the group
  506|   108k|  if (numconds == 0)
  ------------------
  |  Branch (506:7): [True: 108k, False: 3]
  ------------------
  507|   108k|    return 1;
  508|      3|  char* p = c.conds;
  509|      3|  st--;
  510|      3|  int i = 1;
  511|     24|  while (true) {
  ------------------
  |  Branch (511:10): [True: 24, Folded]
  ------------------
  512|     24|    switch (*p) {
  513|      0|      case '\0':
  ------------------
  |  Branch (513:7): [True: 0, False: 24]
  ------------------
  514|      0|        return 1;
  515|      3|      case '[':
  ------------------
  |  Branch (515:7): [True: 3, False: 21]
  ------------------
  516|      3|        p = nextchar(p);
  517|      3|        pos = st;
  518|      3|        break;
  519|      0|      case '^':
  ------------------
  |  Branch (519:7): [True: 0, False: 24]
  ------------------
  520|      0|        p = nextchar(p);
  521|      0|        neg = true;
  522|      0|        break;
  523|      3|      case ']':
  ------------------
  |  Branch (523:7): [True: 3, False: 21]
  ------------------
  524|      3|        if (!neg && !ingroup)
  ------------------
  |  Branch (524:13): [True: 3, False: 0]
  |  Branch (524:21): [True: 3, False: 0]
  ------------------
  525|      3|          return 0;
  526|      0|        i++;
  527|       |        // skip the next character
  528|      0|        if (!ingroup) {
  ------------------
  |  Branch (528:13): [True: 0, False: 0]
  ------------------
  529|      0|          for (; (opts & aeUTF8) && (st >= beg) && is_utf8_cont(*st); st--)
  ------------------
  |  |   66|      0|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (529:18): [True: 0, False: 0]
  |  Branch (529:37): [True: 0, False: 0]
  |  Branch (529:52): [True: 0, False: 0]
  ------------------
  530|      0|            ;
  531|      0|          st--;
  532|      0|        }
  533|      0|        pos = nullptr;
  534|      0|        neg = false;
  535|      0|        ingroup = false;
  536|      0|        p = nextchar(p);
  537|      0|        if (st < beg && p)
  ------------------
  |  Branch (537:13): [True: 0, False: 0]
  |  Branch (537:25): [True: 0, False: 0]
  ------------------
  538|      0|          return 0;  // word <= condition
  539|      0|        break;
  540|      0|      case '.':
  ------------------
  |  Branch (540:7): [True: 0, False: 24]
  ------------------
  541|      0|        if (!pos) {
  ------------------
  |  Branch (541:13): [True: 0, False: 0]
  ------------------
  542|       |          // dots are not metacharacters in groups: [.]
  543|      0|          p = nextchar(p);
  544|       |          // skip one character to the left. Walk back over any UTF-8
  545|       |          // continuation bytes of that character to its leading byte first,
  546|       |          // then step past it, so a single-byte match preceded by a
  547|       |          // multibyte character does not consume the multibyte character.
  548|      0|          for (; (opts & aeUTF8) && (st >= beg) && is_utf8_cont(*st); st--)
  ------------------
  |  |   66|      0|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (548:18): [True: 0, False: 0]
  |  Branch (548:37): [True: 0, False: 0]
  |  Branch (548:52): [True: 0, False: 0]
  ------------------
  549|      0|            ;
  550|      0|          st--;
  551|      0|          if (st < beg) {  // word <= condition
  ------------------
  |  Branch (551:15): [True: 0, False: 0]
  ------------------
  552|      0|            if (p)
  ------------------
  |  Branch (552:17): [True: 0, False: 0]
  ------------------
  553|      0|              return 0;
  554|      0|            else
  555|      0|              return 1;
  556|      0|          }
  557|      0|          break;
  558|      0|        }
  559|       |      /* FALLTHROUGH */
  560|     18|      default: {
  ------------------
  |  Branch (560:7): [True: 18, False: 6]
  ------------------
  561|     18|        if (*st == *p) {
  ------------------
  |  Branch (561:13): [True: 0, False: 18]
  ------------------
  562|      0|          p = nextchar(p);
  563|      0|          if ((opts & aeUTF8) && (*st & 0x80)) {
  ------------------
  |  |   66|      0|#define aeUTF8 (1 << 1)
  ------------------
  |  Branch (563:15): [True: 0, False: 0]
  |  Branch (563:34): [True: 0, False: 0]
  ------------------
  564|      0|            st--;
  565|      0|            while (p && (st >= beg)) {
  ------------------
  |  Branch (565:20): [True: 0, False: 0]
  |  Branch (565:25): [True: 0, False: 0]
  ------------------
  566|      0|              if (*p != *st) {
  ------------------
  |  Branch (566:19): [True: 0, False: 0]
  ------------------
  567|      0|                if (!pos)
  ------------------
  |  Branch (567:21): [True: 0, False: 0]
  ------------------
  568|      0|                  return 0;
  569|      0|                st = pos;
  570|      0|                break;
  571|      0|              }
  572|       |              // first byte of the UTF-8 multibyte character
  573|      0|              if (!is_utf8_cont(*p))
  ------------------
  |  Branch (573:19): [True: 0, False: 0]
  ------------------
  574|      0|                break;
  575|      0|              p = nextchar(p);
  576|      0|              st--;
  577|      0|            }
  578|      0|            if (pos && st != pos) {
  ------------------
  |  Branch (578:17): [True: 0, False: 0]
  |  Branch (578:24): [True: 0, False: 0]
  ------------------
  579|      0|              if (neg)
  ------------------
  |  Branch (579:19): [True: 0, False: 0]
  ------------------
  580|      0|                return 0;
  581|      0|              else if (i == numconds)
  ------------------
  |  Branch (581:24): [True: 0, False: 0]
  ------------------
  582|      0|                return 1;
  583|      0|              ingroup = true;
  584|      0|              while (p && *p != ']' && ((p = nextchar(p)) != nullptr)) {
  ------------------
  |  Branch (584:22): [True: 0, False: 0]
  |  Branch (584:27): [True: 0, False: 0]
  |  Branch (584:40): [True: 0, False: 0]
  ------------------
  585|      0|              }
  586|      0|              st--;
  587|      0|            }
  588|      0|            if (p && *p != ']')
  ------------------
  |  Branch (588:17): [True: 0, False: 0]
  |  Branch (588:22): [True: 0, False: 0]
  ------------------
  589|      0|              p = nextchar(p);
  590|      0|          } else if (pos) {
  ------------------
  |  Branch (590:22): [True: 0, False: 0]
  ------------------
  591|      0|            if (neg)
  ------------------
  |  Branch (591:17): [True: 0, False: 0]
  ------------------
  592|      0|              return 0;
  593|      0|            else if (i == numconds)
  ------------------
  |  Branch (593:22): [True: 0, False: 0]
  ------------------
  594|      0|              return 1;
  595|      0|            ingroup = true;
  596|      0|            while (p && *p != ']' && ((p = nextchar(p)) != nullptr)) {
  ------------------
  |  Branch (596:20): [True: 0, False: 0]
  |  Branch (596:25): [True: 0, False: 0]
  |  Branch (596:38): [True: 0, False: 0]
  ------------------
  597|      0|            }
  598|       |            // if (p && *p != ']') p = nextchar(p);
  599|      0|            st--;
  600|      0|          }
  601|      0|          if (!pos) {
  ------------------
  |  Branch (601:15): [True: 0, False: 0]
  ------------------
  602|      0|            i++;
  603|      0|            st--;
  604|      0|          }
  605|      0|          if (st < beg && p && *p != ']')
  ------------------
  |  Branch (605:15): [True: 0, False: 0]
  |  Branch (605:27): [True: 0, False: 0]
  |  Branch (605:32): [True: 0, False: 0]
  ------------------
  606|      0|            return 0;      // word <= condition
  607|     18|        } else if (pos) {  // group
  ------------------
  |  Branch (607:20): [True: 18, False: 0]
  ------------------
  608|     18|          p = nextchar(p);
  609|     18|        } else
  610|      0|          return 0;
  611|     18|      }
  612|     24|    }
  613|     21|    if (!p)
  ------------------
  |  Branch (613:9): [True: 0, False: 21]
  ------------------
  614|      0|      return 1;
  615|     21|  }
  616|      3|}
_ZN8SfxEntry8nextcharEPc:
  487|     21|inline char* SfxEntry::nextchar(char* p) {
  488|     21|  if (p) {
  ------------------
  |  Branch (488:7): [True: 21, False: 0]
  ------------------
  489|     21|    p++;
  490|     21|    if (opts & aeLONGCOND) {
  ------------------
  |  |   69|     21|#define aeLONGCOND (1 << 4)
  ------------------
  |  Branch (490:9): [True: 0, False: 21]
  ------------------
  491|       |      // jump to the 2nd part of the condition
  492|      0|      if (p == c.l.conds1 + MAXCONDLEN_1)
  ------------------
  |  |   91|      0|#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char*))
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXCONDLEN 20
  |  |  ------------------
  ------------------
  |  Branch (492:11): [True: 0, False: 0]
  ------------------
  493|      0|        return c.l.conds2;
  494|       |      // end of the MAXCONDLEN length condition
  495|     21|    } else if (p == c.conds + MAXCONDLEN)
  ------------------
  |  |   90|     21|#define MAXCONDLEN 20
  ------------------
  |  Branch (495:16): [True: 0, False: 21]
  ------------------
  496|      0|      return nullptr;
  497|     21|    return *p ? p : nullptr;
  ------------------
  |  Branch (497:12): [True: 21, False: 0]
  ------------------
  498|     21|  }
  499|      0|  return nullptr;
  500|     21|}

_ZN8PfxEntry7getNextEv:
  134|  2.66M|  inline PfxEntry* getNext() { return next; }
_ZN8SfxEntry7getNextEv:
  216|    228|  inline SfxEntry* getNext() { return next; }
_ZN8PfxEntry6getKeyEv:
  124|  76.4k|  const char* getKey() { return appnd.c_str(); }
_ZN8PfxEntry7getFlagEv:
  123|    839|  FLAG getFlag() { return aflag; }
_ZN8PfxEntry9setFlgNxtEPS_:
  142|      8|  inline void setFlgNxt(PfxEntry* ptr) { flgnxt = ptr; }
_ZN8PfxEntry7setNextEPS_:
  139|      8|  inline void setNext(PfxEntry* ptr) { next = ptr; }
_ZN8PfxEntry9setNextEQEPS_:
  141|     14|  inline void setNextEQ(PfxEntry* ptr) { nexteq = ptr; }
_ZN8PfxEntry9setNextNEEPS_:
  140|     16|  inline void setNextNE(PfxEntry* ptr) { nextne = ptr; }
_ZN8PfxEntry9getNextEQEv:
  136|  54.8k|  inline PfxEntry* getNextEQ() { return nexteq; }
_ZN8PfxEntry9getNextNEEv:
  135|  20.7k|  inline PfxEntry* getNextNE() { return nextne; }
_ZN8SfxEntry6getKeyEv:
  205|   473k|  const char* getKey() { return rappnd.c_str(); }
_ZN8SfxEntry7getFlagEv:
  204|   127k|  FLAG getFlag() { return aflag; }
_ZN8SfxEntry9setFlgNxtEPS_:
  228|     34|  inline void setFlgNxt(SfxEntry* ptr) { flgnxt = ptr; }
_ZN8SfxEntry7setNextEPS_:
  225|     34|  inline void setNext(SfxEntry* ptr) { next = ptr; }
_ZN8SfxEntry9setNextEQEPS_:
  227|     88|  inline void setNextEQ(SfxEntry* ptr) { nexteq = ptr; }
_ZN8SfxEntry9setNextNEEPS_:
  226|     80|  inline void setNextNE(SfxEntry* ptr) { nextne = ptr; }
_ZN8SfxEntry9getNextEQEv:
  218|   366k|  inline SfxEntry* getNextEQ() { return nexteq; }
_ZN8SfxEntry9getNextNEEv:
  217|   107k|  inline SfxEntry* getNextNE() { return nextne; }
_ZN8PfxEntry7getContEv:
  131|  4.07M|  inline const unsigned short* getCont() { return contclass; }
_ZN8PfxEntry10getContLenEv:
  132|  1.35M|  inline unsigned short getContLen() { return contclasslen; }
_ZN8SfxEntry7getContEv:
  210|   486k|  inline const unsigned short* getCont() { return contclass; }
_ZN8SfxEntry10getContLenEv:
  211|  57.8k|  inline unsigned short getContLen() { return contclasslen; }
_ZN8SfxEntry9getKeyLenEv:
  214|   158k|  inline int getKeyLen() { return appnd.size(); }
_ZN8SfxEntry9getFlgNxtEv:
  223|  62.1k|  inline SfxEntry* getFlgNxt() { return flgnxt; }
_ZN8SfxEntry8getAffixEv:
  212|  34.6k|  inline const char* getAffix() { return appnd.c_str(); }
_ZNK8SfxEntry10allowCrossEv:
  171|     28|  bool allowCross() const { return ((opts & aeXPRODUCT) != 0); }
  ------------------
  |  |   65|     28|#define aeXPRODUCT (1 << 0)
  ------------------
_ZNK8PfxEntry10allowCrossEv:
   94|     11|  bool allowCross() const { return ((opts & aeXPRODUCT) != 0); }
  ------------------
  |  |   65|     11|#define aeXPRODUCT (1 << 0)
  ------------------
_ZN8PfxEntry9getKeyLenEv:
  127|  2.49k|  inline int getKeyLen() { return appnd.size(); }
_ZN8PfxEntry9getFlgNxtEv:
  137|    831|  inline PfxEntry* getFlgNxt() { return flgnxt; }

_ZN8AffixMgrC2EPKcRKNSt3__16vectorINS2_10unique_ptrI7HashMgrNS2_14default_deleteIS5_EEEENS2_9allocatorIS8_EEEES1_:
   93|     38|  : alldic(ptr)
   94|     38|  , pHMgr(ptr[0].get()) {
   95|       |
   96|       |  // register hash manager and load affix data from aff file
   97|     38|  csconv = nullptr;
   98|     38|  utf8 = 0;
   99|     38|  complexprefixes = 0;
  100|     38|  parsedmaptable = false;
  101|     38|  parsedbreaktable = false;
  102|     38|  iconvtable = nullptr;
  103|     38|  oconvtable = nullptr;
  104|       |  // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN)
  105|     38|  simplifiedcpd = 0;
  106|     38|  parsedcheckcpd = false;
  107|     38|  parseddefcpd = false;
  108|     38|  phone = nullptr;
  109|     38|  compoundflag = FLAG_NULL;        // permits word in compound forms
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  110|     38|  compoundbegin = FLAG_NULL;       // may be first word in compound forms
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  111|     38|  compoundmiddle = FLAG_NULL;      // may be middle word in compound forms
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  112|     38|  compoundend = FLAG_NULL;         // may be last word in compound forms
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  113|     38|  compoundroot = FLAG_NULL;        // compound word signing flag
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  114|     38|  compoundpermitflag = FLAG_NULL;  // compound permitting flag for suffixed word
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  115|     38|  compoundforbidflag = FLAG_NULL;  // compound fordidden flag for suffixed word
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  116|     38|  compoundmoresuffixes = 0;        // allow more suffixes within compound words
  117|     38|  checkcompounddup = 0;            // forbid double words in compounds
  118|     38|  checkcompoundrep = 0;  // forbid bad compounds (may be non-compound word with
  119|       |                         // a REP substitution)
  120|     38|  checkcompoundcase =
  121|     38|      0;  // forbid upper and lowercase combinations at word bounds
  122|     38|  checkcompoundtriple = 0;  // forbid compounds with triple letters
  123|     38|  simplifiedtriple = 0;     // allow simplified triple letters in compounds
  124|       |                            // (Schiff+fahrt -> Schiffahrt)
  125|     38|  forbiddenword = FORBIDDENWORD;  // forbidden word signing flag
  ------------------
  |  |  127|     38|#define FORBIDDENWORD 65510
  ------------------
  126|     38|  nosuggest = FLAG_NULL;  // don't suggest words signed with NOSUGGEST flag
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  127|     38|  nongramsuggest = FLAG_NULL;
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  128|     38|  langnum = 0;  // language code (see http://l10n.openoffice.org/languages.html)
  129|     38|  needaffix = FLAG_NULL;  // forbidden root, allowed only with suffixes
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  130|     38|  cpdwordmax = -1;        // default: unlimited wordcount in compound words
  131|     38|  cpdmin = -1;            // undefined
  132|     38|  cpdmaxsyllable = 0;     // default: unlimited syllablecount in compound words
  133|     38|  pfxappnd = nullptr;     // previous prefix for counting syllables of the prefix BUG
  134|     38|  sfxappnd = nullptr;     // previous suffix for counting syllables of the suffix BUG
  135|     38|  sfxextra = 0;     // modifier for syllable count of sfxappnd BUG
  136|     38|  checknum = 0;               // checking numbers, and word with numbers
  137|     38|  havecontclass = 0;  // flags of possible continuing classes (double affix)
  138|       |  // LEMMA_PRESENT: not put root into the morphological output. Lemma presents
  139|       |  // in morhological description in dictionary file. It's often combined with
  140|       |  // PSEUDOROOT.
  141|     38|  lemma_present = FLAG_NULL;
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  142|     38|  circumfix = FLAG_NULL;
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  143|     38|  onlyincompound = FLAG_NULL;
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  144|     38|  maxngramsugs = -1;  // undefined
  145|     38|  maxdiff = -1;       // undefined
  146|     38|  onlymaxdiff = 0;
  147|     38|  maxcpdsugs = -1;  // undefined
  148|     38|  nosplitsugs = 0;
  149|     38|  sugswithdots = 0;
  150|     38|  keepcase = 0;
  151|     38|  forceucase = 0;
  152|     38|  warn = 0;
  153|     38|  forbidwarn = 0;
  154|     38|  checksharps = 0;
  155|     38|  substandard = FLAG_NULL;
  ------------------
  |  |   96|     38|#define FLAG_NULL 0x00
  ------------------
  156|     38|  fullstrip = 0;
  157|       |
  158|     38|  sfx = nullptr;
  159|     38|  pfx = nullptr;
  160|       |
  161|  9.76k|  for (int i = 0; i < SETSIZE; i++) {
  ------------------
  |  |   61|  9.76k|#define SETSIZE 256
  ------------------
  |  Branch (161:19): [True: 9.72k, False: 38]
  ------------------
  162|  9.72k|    pStart[i] = nullptr;
  163|  9.72k|    sStart[i] = nullptr;
  164|  9.72k|    pFlag[i] = nullptr;
  165|  9.72k|    sFlag[i] = nullptr;
  166|  9.72k|  }
  167|       |
  168|     38|  memset(contclasses, 0, CONTSIZE * sizeof(char));
  ------------------
  |  |   62|     38|#define CONTSIZE 65536
  ------------------
  169|       |
  170|     38|  if (parse_file(affpath, key)) {
  ------------------
  |  Branch (170:7): [True: 0, False: 38]
  ------------------
  171|      0|    fprintf(stderr, "Failure loading aff file %s\n", affpath);
  172|      0|  }
  173|       |
  174|       |  /* get encoding for CHECKCOMPOUNDCASE */
  175|     38|  if (!utf8) {
  ------------------
  |  Branch (175:7): [True: 20, False: 18]
  ------------------
  176|     20|    csconv = get_current_cs(get_encoding());
  177|  5.14k|    for (int i = 0; i <= 255; i++) {
  ------------------
  |  Branch (177:21): [True: 5.12k, False: 20]
  ------------------
  178|  5.12k|      if ((csconv[i].cupper != csconv[i].clower) &&
  ------------------
  |  Branch (178:11): [True: 2.24k, False: 2.88k]
  ------------------
  179|  2.24k|          (wordchars.find((char)i) == std::string::npos)) {
  ------------------
  |  Branch (179:11): [True: 2.24k, False: 0]
  ------------------
  180|  2.24k|        wordchars.push_back((char)i);
  181|  2.24k|      }
  182|  5.12k|    }
  183|     20|  }
  184|       |
  185|       |  // default BREAK definition
  186|     38|  if (!parsedbreaktable) {
  ------------------
  |  Branch (186:7): [True: 34, False: 4]
  ------------------
  187|     34|    breaktable.emplace_back("-");
  188|     34|    breaktable.emplace_back("^-");
  189|     34|    breaktable.emplace_back("-$");
  190|     34|    parsedbreaktable = true;
  191|     34|  }
  192|       |
  193|     38|#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
  194|       |  // not entirely sure this is invalid, so only for fuzzing for now
  195|     38|  if (iconvtable && !iconvtable->check_against_breaktable(breaktable)) {
  ------------------
  |  Branch (195:7): [True: 2, False: 36]
  |  Branch (195:21): [True: 0, False: 2]
  ------------------
  196|      0|      delete iconvtable;
  197|      0|      iconvtable = nullptr;
  198|      0|  }
  199|     38|#endif
  200|       |
  201|     38|  if (cpdmin == -1)
  ------------------
  |  Branch (201:7): [True: 34, False: 4]
  ------------------
  202|     34|    cpdmin = MINCPDLEN;
  ------------------
  |  |   88|     34|#define MINCPDLEN 3
  ------------------
  203|     38|}
_ZN8AffixMgr13finishFileMgrEP7FileMgr:
  260|     38|void AffixMgr::finishFileMgr(FileMgr* afflst) {
  261|     38|  delete afflst;
  262|       |
  263|       |  // convert affix trees to sorted list
  264|     38|  process_pfx_tree_to_list();
  265|     38|  process_sfx_tree_to_list();
  266|     38|}
_ZN8AffixMgr10parse_fileEPKcS1_:
  269|     38|int AffixMgr::parse_file(const char* affpath, const char* key) {
  270|       |
  271|       |  // checking flag duplication
  272|     38|  char dupflags[CONTSIZE];
  273|     38|  char dupflags_ini = 1;
  274|       |
  275|       |  // first line indicator for removing byte order mark
  276|     38|  int firstline = 1;
  277|       |
  278|       |  // open the affix file
  279|     38|  FileMgr* afflst = new FileMgr(affpath, key);
  280|       |
  281|       |  // step one is to parse the affix file building up the internal
  282|       |  // affix data structures
  283|       |
  284|       |  // read in each line ignoring any that do not
  285|       |  // start with a known line type indicator
  286|     38|  std::string line;
  287|    646|  while (afflst->getline(line)) {
  ------------------
  |  Branch (287:10): [True: 608, False: 38]
  ------------------
  288|    608|    mychomp(line);
  289|       |
  290|       |    /* remove byte order mark */
  291|    608|    if (firstline) {
  ------------------
  |  Branch (291:9): [True: 38, False: 570]
  ------------------
  292|     38|      firstline = 0;
  293|       |      // Affix file begins with byte order mark: possible incompatibility with
  294|       |      // old Hunspell versions
  295|     38|      if (line.compare(0, 3, "\xEF\xBB\xBF", 3) == 0) {
  ------------------
  |  Branch (295:11): [True: 0, False: 38]
  ------------------
  296|      0|        line.erase(0, 3);
  297|      0|      }
  298|     38|    }
  299|       |
  300|       |    /* parse in the keyboard string */
  301|    608|    if (line.compare(0, 3, "KEY", 3) == 0) {
  ------------------
  |  Branch (301:9): [True: 0, False: 608]
  ------------------
  302|      0|      if (!parse_string(line, keystring, afflst->getlinenum())) {
  ------------------
  |  Branch (302:11): [True: 0, False: 0]
  ------------------
  303|      0|        finishFileMgr(afflst);
  304|      0|        return 1;
  305|      0|      }
  306|      0|    }
  307|       |
  308|       |    /* parse in the try string */
  309|    608|    if (line.compare(0, 3, "TRY", 3) == 0) {
  ------------------
  |  Branch (309:9): [True: 2, False: 606]
  ------------------
  310|      2|      if (!parse_string(line, trystring, afflst->getlinenum())) {
  ------------------
  |  Branch (310:11): [True: 0, False: 2]
  ------------------
  311|      0|        finishFileMgr(afflst);
  312|      0|        return 1;
  313|      0|      }
  314|      2|    }
  315|       |
  316|       |    /* parse in the name of the character set used by the .dict and .aff */
  317|    608|    if (line.compare(0, 3, "SET", 3) == 0) {
  ------------------
  |  Branch (317:9): [True: 18, False: 590]
  ------------------
  318|     18|      if (!parse_string(line, encoding, afflst->getlinenum())) {
  ------------------
  |  Branch (318:11): [True: 0, False: 18]
  ------------------
  319|      0|        finishFileMgr(afflst);
  320|      0|        return 1;
  321|      0|      }
  322|     18|      if (encoding == "UTF-8") {
  ------------------
  |  Branch (322:11): [True: 18, False: 0]
  ------------------
  323|     18|        utf8 = 1;
  324|     18|      }
  325|     18|    }
  326|       |
  327|       |    /* parse COMPLEXPREFIXES for agglutinative languages with right-to-left
  328|       |     * writing system */
  329|    608|    if (line.compare(0, 15, "COMPLEXPREFIXES", 15) == 0)
  ------------------
  |  Branch (329:9): [True: 2, False: 606]
  ------------------
  330|      2|      complexprefixes = 1;
  331|       |
  332|       |    /* parse in the flag used by the controlled compound words */
  333|    608|    if (line.compare(0, 12, "COMPOUNDFLAG", 12) == 0) {
  ------------------
  |  Branch (333:9): [True: 8, False: 600]
  ------------------
  334|      8|      if (!parse_flag(line, &compoundflag, afflst)) {
  ------------------
  |  Branch (334:11): [True: 0, False: 8]
  ------------------
  335|      0|        finishFileMgr(afflst);
  336|      0|        return 1;
  337|      0|      }
  338|      8|    }
  339|       |
  340|       |    /* parse in the flag used by compound words */
  341|    608|    if (line.compare(0, 13, "COMPOUNDBEGIN", 13) == 0) {
  ------------------
  |  Branch (341:9): [True: 0, False: 608]
  ------------------
  342|      0|      if (complexprefixes) {
  ------------------
  |  Branch (342:11): [True: 0, False: 0]
  ------------------
  343|      0|        if (!parse_flag(line, &compoundend, afflst)) {
  ------------------
  |  Branch (343:13): [True: 0, False: 0]
  ------------------
  344|      0|          finishFileMgr(afflst);
  345|      0|          return 1;
  346|      0|        }
  347|      0|      } else {
  348|      0|        if (!parse_flag(line, &compoundbegin, afflst)) {
  ------------------
  |  Branch (348:13): [True: 0, False: 0]
  ------------------
  349|      0|          finishFileMgr(afflst);
  350|      0|          return 1;
  351|      0|        }
  352|      0|      }
  353|      0|    }
  354|       |
  355|       |    /* parse in the flag used by compound words */
  356|    608|    if (line.compare(0, 14, "COMPOUNDMIDDLE", 14) == 0) {
  ------------------
  |  Branch (356:9): [True: 0, False: 608]
  ------------------
  357|      0|      if (!parse_flag(line, &compoundmiddle, afflst)) {
  ------------------
  |  Branch (357:11): [True: 0, False: 0]
  ------------------
  358|      0|        finishFileMgr(afflst);
  359|      0|        return 1;
  360|      0|      }
  361|      0|    }
  362|       |
  363|       |    /* parse in the flag used by compound words */
  364|    608|    if (line.compare(0, 11, "COMPOUNDEND", 11) == 0) {
  ------------------
  |  Branch (364:9): [True: 0, False: 608]
  ------------------
  365|      0|      if (complexprefixes) {
  ------------------
  |  Branch (365:11): [True: 0, False: 0]
  ------------------
  366|      0|        if (!parse_flag(line, &compoundbegin, afflst)) {
  ------------------
  |  Branch (366:13): [True: 0, False: 0]
  ------------------
  367|      0|          finishFileMgr(afflst);
  368|      0|          return 1;
  369|      0|        }
  370|      0|      } else {
  371|      0|        if (!parse_flag(line, &compoundend, afflst)) {
  ------------------
  |  Branch (371:13): [True: 0, False: 0]
  ------------------
  372|      0|          finishFileMgr(afflst);
  373|      0|          return 1;
  374|      0|        }
  375|      0|      }
  376|      0|    }
  377|       |
  378|       |    /* parse in the data used by compound_check() method */
  379|    608|    if (line.compare(0, 15, "COMPOUNDWORDMAX", 15) == 0) {
  ------------------
  |  Branch (379:9): [True: 2, False: 606]
  ------------------
  380|      2|      if (!parse_num(line, &cpdwordmax, afflst)) {
  ------------------
  |  Branch (380:11): [True: 0, False: 2]
  ------------------
  381|      0|        finishFileMgr(afflst);
  382|      0|        return 1;
  383|      0|      }
  384|      2|    }
  385|       |
  386|       |    /* parse in the flag sign compounds in dictionary */
  387|    608|    if (line.compare(0, 12, "COMPOUNDROOT", 12) == 0) {
  ------------------
  |  Branch (387:9): [True: 0, False: 608]
  ------------------
  388|      0|      if (!parse_flag(line, &compoundroot, afflst)) {
  ------------------
  |  Branch (388:11): [True: 0, False: 0]
  ------------------
  389|      0|        finishFileMgr(afflst);
  390|      0|        return 1;
  391|      0|      }
  392|      0|    }
  393|       |
  394|       |    /* parse in the flag used by compound_check() method */
  395|    608|    if (line.compare(0, 18, "COMPOUNDPERMITFLAG", 18) == 0) {
  ------------------
  |  Branch (395:9): [True: 2, False: 606]
  ------------------
  396|      2|      if (!parse_flag(line, &compoundpermitflag, afflst)) {
  ------------------
  |  Branch (396:11): [True: 0, False: 2]
  ------------------
  397|      0|        finishFileMgr(afflst);
  398|      0|        return 1;
  399|      0|      }
  400|      2|    }
  401|       |
  402|       |    /* parse in the flag used by compound_check() method */
  403|    608|    if (line.compare(0, 18, "COMPOUNDFORBIDFLAG", 18) == 0) {
  ------------------
  |  Branch (403:9): [True: 2, False: 606]
  ------------------
  404|      2|      if (!parse_flag(line, &compoundforbidflag, afflst)) {
  ------------------
  |  Branch (404:11): [True: 0, False: 2]
  ------------------
  405|      0|        finishFileMgr(afflst);
  406|      0|        return 1;
  407|      0|      }
  408|      2|    }
  409|       |
  410|    608|    if (line.compare(0, 20, "COMPOUNDMORESUFFIXES", 20) == 0) {
  ------------------
  |  Branch (410:9): [True: 0, False: 608]
  ------------------
  411|      0|      compoundmoresuffixes = 1;
  412|      0|    }
  413|       |
  414|    608|    if (line.compare(0, 16, "CHECKCOMPOUNDDUP", 16) == 0) {
  ------------------
  |  Branch (414:9): [True: 0, False: 608]
  ------------------
  415|      0|      checkcompounddup = 1;
  416|      0|    }
  417|       |
  418|    608|    if (line.compare(0, 16, "CHECKCOMPOUNDREP", 16) == 0) {
  ------------------
  |  Branch (418:9): [True: 2, False: 606]
  ------------------
  419|      2|      checkcompoundrep = 1;
  420|      2|    }
  421|       |
  422|    608|    if (line.compare(0, 19, "CHECKCOMPOUNDTRIPLE", 19) == 0) {
  ------------------
  |  Branch (422:9): [True: 0, False: 608]
  ------------------
  423|      0|      checkcompoundtriple = 1;
  424|      0|    }
  425|       |
  426|    608|    if (line.compare(0, 16, "SIMPLIFIEDTRIPLE", 16) == 0) {
  ------------------
  |  Branch (426:9): [True: 0, False: 608]
  ------------------
  427|      0|      simplifiedtriple = 1;
  428|      0|    }
  429|       |
  430|    608|    if (line.compare(0, 17, "CHECKCOMPOUNDCASE", 17) == 0) {
  ------------------
  |  Branch (430:9): [True: 0, False: 608]
  ------------------
  431|      0|      checkcompoundcase = 1;
  432|      0|    }
  433|       |
  434|    608|    if (line.compare(0, 9, "NOSUGGEST", 9) == 0) {
  ------------------
  |  Branch (434:9): [True: 0, False: 608]
  ------------------
  435|      0|      if (!parse_flag(line, &nosuggest, afflst)) {
  ------------------
  |  Branch (435:11): [True: 0, False: 0]
  ------------------
  436|      0|        finishFileMgr(afflst);
  437|      0|        return 1;
  438|      0|      }
  439|      0|    }
  440|       |
  441|    608|    if (line.compare(0, 14, "NONGRAMSUGGEST", 14) == 0) {
  ------------------
  |  Branch (441:9): [True: 0, False: 608]
  ------------------
  442|      0|      if (!parse_flag(line, &nongramsuggest, afflst)) {
  ------------------
  |  Branch (442:11): [True: 0, False: 0]
  ------------------
  443|      0|        finishFileMgr(afflst);
  444|      0|        return 1;
  445|      0|      }
  446|      0|    }
  447|       |
  448|       |    /* parse in the flag used by forbidden words */
  449|    608|    if (line.compare(0, 13, "FORBIDDENWORD", 13) == 0) {
  ------------------
  |  Branch (449:9): [True: 2, False: 606]
  ------------------
  450|      2|      if (!parse_flag(line, &forbiddenword, afflst)) {
  ------------------
  |  Branch (450:11): [True: 0, False: 2]
  ------------------
  451|      0|        finishFileMgr(afflst);
  452|      0|        return 1;
  453|      0|      }
  454|      2|    }
  455|       |
  456|       |    /* parse in the flag used by forbidden words (is deprecated) */
  457|    608|    if (line.compare(0, 13, "LEMMA_PRESENT", 13) == 0) {
  ------------------
  |  Branch (457:9): [True: 0, False: 608]
  ------------------
  458|      0|      if (!parse_flag(line, &lemma_present, afflst)) {
  ------------------
  |  Branch (458:11): [True: 0, False: 0]
  ------------------
  459|      0|        finishFileMgr(afflst);
  460|      0|        return 1;
  461|      0|      }
  462|      0|    }
  463|       |
  464|       |    /* parse in the flag used by circumfixes */
  465|    608|    if (line.compare(0, 9, "CIRCUMFIX", 9) == 0) {
  ------------------
  |  Branch (465:9): [True: 2, False: 606]
  ------------------
  466|      2|      if (!parse_flag(line, &circumfix, afflst)) {
  ------------------
  |  Branch (466:11): [True: 0, False: 2]
  ------------------
  467|      0|        finishFileMgr(afflst);
  468|      0|        return 1;
  469|      0|      }
  470|      2|    }
  471|       |
  472|       |    /* parse in the flag used by fogemorphemes */
  473|    608|    if (line.compare(0, 14, "ONLYINCOMPOUND", 14) == 0) {
  ------------------
  |  Branch (473:9): [True: 0, False: 608]
  ------------------
  474|      0|      if (!parse_flag(line, &onlyincompound, afflst)) {
  ------------------
  |  Branch (474:11): [True: 0, False: 0]
  ------------------
  475|      0|        finishFileMgr(afflst);
  476|      0|        return 1;
  477|      0|      }
  478|      0|    }
  479|       |
  480|       |    /* parse in the flag used by `needaffixs' (is deprecated) */
  481|    608|    if (line.compare(0, 10, "PSEUDOROOT", 10) == 0) {
  ------------------
  |  Branch (481:9): [True: 0, False: 608]
  ------------------
  482|      0|      if (!parse_flag(line, &needaffix, afflst)) {
  ------------------
  |  Branch (482:11): [True: 0, False: 0]
  ------------------
  483|      0|        finishFileMgr(afflst);
  484|      0|        return 1;
  485|      0|      }
  486|      0|    }
  487|       |
  488|       |    /* parse in the flag used by `needaffixs' */
  489|    608|    if (line.compare(0, 9, "NEEDAFFIX", 9) == 0) {
  ------------------
  |  Branch (489:9): [True: 2, False: 606]
  ------------------
  490|      2|      if (!parse_flag(line, &needaffix, afflst)) {
  ------------------
  |  Branch (490:11): [True: 0, False: 2]
  ------------------
  491|      0|        finishFileMgr(afflst);
  492|      0|        return 1;
  493|      0|      }
  494|      2|    }
  495|       |
  496|       |    /* parse in the minimal length for words in compounds */
  497|    608|    if (line.compare(0, 11, "COMPOUNDMIN", 11) == 0) {
  ------------------
  |  Branch (497:9): [True: 4, False: 604]
  ------------------
  498|      4|      if (!parse_num(line, &cpdmin, afflst)) {
  ------------------
  |  Branch (498:11): [True: 0, False: 4]
  ------------------
  499|      0|        finishFileMgr(afflst);
  500|      0|        return 1;
  501|      0|      }
  502|      4|      if (cpdmin < 1)
  ------------------
  |  Branch (502:11): [True: 0, False: 4]
  ------------------
  503|      0|        cpdmin = 1;
  504|      4|    }
  505|       |
  506|       |    /* parse in the max. words and syllables in compounds */
  507|    608|    if (line.compare(0, 16, "COMPOUNDSYLLABLE", 16) == 0) {
  ------------------
  |  Branch (507:9): [True: 2, False: 606]
  ------------------
  508|      2|      if (!parse_cpdsyllable(line, afflst)) {
  ------------------
  |  Branch (508:11): [True: 0, False: 2]
  ------------------
  509|      0|        finishFileMgr(afflst);
  510|      0|        return 1;
  511|      0|      }
  512|      2|    }
  513|       |
  514|       |    /* parse in the flag used by compound_check() method */
  515|    608|    if (line.compare(0, 11, "SYLLABLENUM", 11) == 0) {
  ------------------
  |  Branch (515:9): [True: 0, False: 608]
  ------------------
  516|      0|      if (!parse_string(line, cpdsyllablenum, afflst->getlinenum())) {
  ------------------
  |  Branch (516:11): [True: 0, False: 0]
  ------------------
  517|      0|        finishFileMgr(afflst);
  518|      0|        return 1;
  519|      0|      }
  520|      0|    }
  521|       |
  522|       |    /* parse in the flag used by the controlled compound words */
  523|    608|    if (line.compare(0, 8, "CHECKNUM", 8) == 0) {
  ------------------
  |  Branch (523:9): [True: 0, False: 608]
  ------------------
  524|      0|      checknum = 1;
  525|      0|    }
  526|       |
  527|       |    /* parse in the extra word characters */
  528|    608|    if (line.compare(0, 9, "WORDCHARS", 9) == 0) {
  ------------------
  |  Branch (528:9): [True: 6, False: 602]
  ------------------
  529|      6|      if (!parse_array(line, wordchars, wordchars_utf16,
  ------------------
  |  Branch (529:11): [True: 0, False: 6]
  ------------------
  530|      6|                       utf8, afflst->getlinenum())) {
  531|      0|        finishFileMgr(afflst);
  532|      0|        return 1;
  533|      0|      }
  534|      6|    }
  535|       |
  536|       |    /* parse in the ignored characters (for example, Arabic optional diacretics
  537|       |     * charachters */
  538|    608|    if (line.compare(0, 6, "IGNORE", 6) == 0) {
  ------------------
  |  Branch (538:9): [True: 4, False: 604]
  ------------------
  539|      4|      if (!parse_array(line, ignorechars, ignorechars_utf16,
  ------------------
  |  Branch (539:11): [True: 0, False: 4]
  ------------------
  540|      4|                       utf8, afflst->getlinenum())) {
  541|      0|        finishFileMgr(afflst);
  542|      0|        return 1;
  543|      0|      }
  544|      4|    }
  545|       |
  546|       |    /* parse in the input conversion table */
  547|    608|    if (line.compare(0, 5, "ICONV", 5) == 0) {
  ------------------
  |  Branch (547:9): [True: 2, False: 606]
  ------------------
  548|      2|      if (!parse_convtable(line, afflst, &iconvtable, "ICONV")) {
  ------------------
  |  Branch (548:11): [True: 0, False: 2]
  ------------------
  549|      0|        finishFileMgr(afflst);
  550|      0|        return 1;
  551|      0|      }
  552|      2|    }
  553|       |
  554|       |    /* parse in the output conversion table */
  555|    608|    if (line.compare(0, 5, "OCONV", 5) == 0) {
  ------------------
  |  Branch (555:9): [True: 2, False: 606]
  ------------------
  556|      2|      if (!parse_convtable(line, afflst, &oconvtable, "OCONV")) {
  ------------------
  |  Branch (556:11): [True: 0, False: 2]
  ------------------
  557|      0|        finishFileMgr(afflst);
  558|      0|        return 1;
  559|      0|      }
  560|      2|    }
  561|       |
  562|       |    /* parse in the phonetic translation table */
  563|    608|    if (line.compare(0, 5, "PHONE", 5) == 0) {
  ------------------
  |  Branch (563:9): [True: 2, False: 606]
  ------------------
  564|      2|      if (!parse_phonetable(line, afflst)) {
  ------------------
  |  Branch (564:11): [True: 0, False: 2]
  ------------------
  565|      0|        finishFileMgr(afflst);
  566|      0|        return 1;
  567|      0|      }
  568|      2|    }
  569|       |
  570|       |    /* parse in the checkcompoundpattern table */
  571|    608|    if (line.compare(0, 20, "CHECKCOMPOUNDPATTERN", 20) == 0) {
  ------------------
  |  Branch (571:9): [True: 2, False: 606]
  ------------------
  572|      2|      if (!parse_checkcpdtable(line, afflst)) {
  ------------------
  |  Branch (572:11): [True: 0, False: 2]
  ------------------
  573|      0|        finishFileMgr(afflst);
  574|      0|        return 1;
  575|      0|      }
  576|      2|    }
  577|       |
  578|       |    /* parse in the defcompound table */
  579|    608|    if (line.compare(0, 12, "COMPOUNDRULE", 12) == 0) {
  ------------------
  |  Branch (579:9): [True: 0, False: 608]
  ------------------
  580|      0|      if (!parse_defcpdtable(line, afflst)) {
  ------------------
  |  Branch (580:11): [True: 0, False: 0]
  ------------------
  581|      0|        finishFileMgr(afflst);
  582|      0|        return 1;
  583|      0|      }
  584|      0|    }
  585|       |
  586|       |    /* parse in the related character map table */
  587|    608|    if (line.compare(0, 3, "MAP", 3) == 0) {
  ------------------
  |  Branch (587:9): [True: 2, False: 606]
  ------------------
  588|      2|      if (!parse_maptable(line, afflst)) {
  ------------------
  |  Branch (588:11): [True: 0, False: 2]
  ------------------
  589|      0|        finishFileMgr(afflst);
  590|      0|        return 1;
  591|      0|      }
  592|      2|    }
  593|       |
  594|       |    /* parse in the word breakpoints table */
  595|    608|    if (line.compare(0, 5, "BREAK", 5) == 0) {
  ------------------
  |  Branch (595:9): [True: 4, False: 604]
  ------------------
  596|      4|      if (!parse_breaktable(line, afflst)) {
  ------------------
  |  Branch (596:11): [True: 0, False: 4]
  ------------------
  597|      0|        finishFileMgr(afflst);
  598|      0|        return 1;
  599|      0|      }
  600|      4|    }
  601|       |
  602|       |    /* parse in the language for language specific codes */
  603|    608|    if (line.compare(0, 4, "LANG", 4) == 0) {
  ------------------
  |  Branch (603:9): [True: 2, False: 606]
  ------------------
  604|      2|      if (!parse_string(line, lang, afflst->getlinenum())) {
  ------------------
  |  Branch (604:11): [True: 0, False: 2]
  ------------------
  605|      0|        finishFileMgr(afflst);
  606|      0|        return 1;
  607|      0|      }
  608|      2|      langnum = get_lang_num(lang);
  609|      2|    }
  610|       |
  611|    608|    if (line.compare(0, 7, "VERSION", 7) == 0) {
  ------------------
  |  Branch (611:9): [True: 0, False: 608]
  ------------------
  612|      0|      size_t startpos = line.find_first_not_of(" \t", 7);
  613|      0|      if (startpos != std::string::npos) {
  ------------------
  |  Branch (613:11): [True: 0, False: 0]
  ------------------
  614|      0|          version = line.substr(startpos);
  615|      0|      }
  616|      0|    }
  617|       |
  618|    608|    if (line.compare(0, 12, "MAXNGRAMSUGS", 12) == 0) {
  ------------------
  |  Branch (618:9): [True: 4, False: 604]
  ------------------
  619|      4|      if (!parse_num(line, &maxngramsugs, afflst)) {
  ------------------
  |  Branch (619:11): [True: 0, False: 4]
  ------------------
  620|      0|        finishFileMgr(afflst);
  621|      0|        return 1;
  622|      0|      }
  623|      4|    }
  624|       |
  625|    608|    if (line.compare(0, 11, "ONLYMAXDIFF", 11) == 0)
  ------------------
  |  Branch (625:9): [True: 0, False: 608]
  ------------------
  626|      0|      onlymaxdiff = 1;
  627|       |
  628|    608|    if (line.compare(0, 7, "MAXDIFF", 7) == 0) {
  ------------------
  |  Branch (628:9): [True: 0, False: 608]
  ------------------
  629|      0|      if (!parse_num(line, &maxdiff, afflst)) {
  ------------------
  |  Branch (629:11): [True: 0, False: 0]
  ------------------
  630|      0|        finishFileMgr(afflst);
  631|      0|        return 1;
  632|      0|      }
  633|      0|    }
  634|       |
  635|    608|    if (line.compare(0, 10, "MAXCPDSUGS", 10) == 0) {
  ------------------
  |  Branch (635:9): [True: 0, False: 608]
  ------------------
  636|      0|      if (!parse_num(line, &maxcpdsugs, afflst)) {
  ------------------
  |  Branch (636:11): [True: 0, False: 0]
  ------------------
  637|      0|        finishFileMgr(afflst);
  638|      0|        return 1;
  639|      0|      }
  640|      0|    }
  641|       |
  642|    608|    if (line.compare(0, 11, "NOSPLITSUGS", 11) == 0) {
  ------------------
  |  Branch (642:9): [True: 0, False: 608]
  ------------------
  643|      0|      nosplitsugs = 1;
  644|      0|    }
  645|       |
  646|    608|    if (line.compare(0, 9, "FULLSTRIP", 9) == 0) {
  ------------------
  |  Branch (646:9): [True: 0, False: 608]
  ------------------
  647|      0|      fullstrip = 1;
  648|      0|    }
  649|       |
  650|    608|    if (line.compare(0, 12, "SUGSWITHDOTS", 12) == 0) {
  ------------------
  |  Branch (650:9): [True: 0, False: 608]
  ------------------
  651|      0|      sugswithdots = 1;
  652|      0|    }
  653|       |
  654|       |    /* parse in the flag used by forbidden words */
  655|    608|    if (line.compare(0, 8, "KEEPCASE", 8) == 0) {
  ------------------
  |  Branch (655:9): [True: 2, False: 606]
  ------------------
  656|      2|      if (!parse_flag(line, &keepcase, afflst)) {
  ------------------
  |  Branch (656:11): [True: 0, False: 2]
  ------------------
  657|      0|        finishFileMgr(afflst);
  658|      0|        return 1;
  659|      0|      }
  660|      2|    }
  661|       |
  662|       |    /* parse in the flag used by `forceucase' */
  663|    608|    if (line.compare(0, 10, "FORCEUCASE", 10) == 0) {
  ------------------
  |  Branch (663:9): [True: 0, False: 608]
  ------------------
  664|      0|      if (!parse_flag(line, &forceucase, afflst)) {
  ------------------
  |  Branch (664:11): [True: 0, False: 0]
  ------------------
  665|      0|        finishFileMgr(afflst);
  666|      0|        return 1;
  667|      0|      }
  668|      0|    }
  669|       |
  670|       |    /* parse in the flag used by `warn' */
  671|    608|    if (line.compare(0, 4, "WARN", 4) == 0) {
  ------------------
  |  Branch (671:9): [True: 2, False: 606]
  ------------------
  672|      2|      if (!parse_flag(line, &warn, afflst)) {
  ------------------
  |  Branch (672:11): [True: 0, False: 2]
  ------------------
  673|      0|        finishFileMgr(afflst);
  674|      0|        return 1;
  675|      0|      }
  676|      2|    }
  677|       |
  678|    608|    if (line.compare(0, 10, "FORBIDWARN", 10) == 0) {
  ------------------
  |  Branch (678:9): [True: 0, False: 608]
  ------------------
  679|      0|      forbidwarn = 1;
  680|      0|    }
  681|       |
  682|       |    /* parse in the flag used by the affix generator */
  683|    608|    if (line.compare(0, 11, "SUBSTANDARD", 11) == 0) {
  ------------------
  |  Branch (683:9): [True: 0, False: 608]
  ------------------
  684|      0|      if (!parse_flag(line, &substandard, afflst)) {
  ------------------
  |  Branch (684:11): [True: 0, False: 0]
  ------------------
  685|      0|        finishFileMgr(afflst);
  686|      0|        return 1;
  687|      0|      }
  688|      0|    }
  689|       |
  690|    608|    if (line.compare(0, 11, "CHECKSHARPS", 11) == 0) {
  ------------------
  |  Branch (690:9): [True: 0, False: 608]
  ------------------
  691|      0|      checksharps = 1;
  692|      0|    }
  693|       |
  694|       |    /* parse this affix: P - prefix, S - suffix */
  695|       |    // affix type
  696|    608|    char ft = ' ';
  697|    608|    if (line.compare(0, 3, "PFX", 3) == 0)
  ------------------
  |  Branch (697:9): [True: 12, False: 596]
  ------------------
  698|     12|      ft = complexprefixes ? 'S' : 'P';
  ------------------
  |  Branch (698:12): [True: 4, False: 8]
  ------------------
  699|    608|    if (line.compare(0, 3, "SFX", 3) == 0)
  ------------------
  |  Branch (699:9): [True: 14, False: 594]
  ------------------
  700|     14|      ft = complexprefixes ? 'P' : 'S';
  ------------------
  |  Branch (700:12): [True: 0, False: 14]
  ------------------
  701|    608|    if (ft != ' ') {
  ------------------
  |  Branch (701:9): [True: 26, False: 582]
  ------------------
  702|     26|      if (dupflags_ini) {
  ------------------
  |  Branch (702:11): [True: 18, False: 8]
  ------------------
  703|     18|        memset(dupflags, 0, sizeof(dupflags));
  704|     18|        dupflags_ini = 0;
  705|     18|      }
  706|     26|      if (!parse_affix(line, ft, afflst, dupflags)) {
  ------------------
  |  Branch (706:11): [True: 0, False: 26]
  ------------------
  707|      0|        finishFileMgr(afflst);
  708|      0|        return 1;
  709|      0|      }
  710|     26|    }
  711|    608|  }
  712|       |
  713|     38|  finishFileMgr(afflst);
  714|       |  // affix trees are sorted now
  715|       |
  716|       |  // now we can speed up performance greatly taking advantage of the
  717|       |  // relationship between the affixes and the idea of "subsets".
  718|       |
  719|       |  // View each prefix as a potential leading subset of another and view
  720|       |  // each suffix (reversed) as a potential trailing subset of another.
  721|       |
  722|       |  // To illustrate this relationship if we know the prefix "ab" is found in the
  723|       |  // word to examine, only prefixes that "ab" is a leading subset of need be
  724|       |  // examined.
  725|       |  // Furthermore is "ab" is not present then none of the prefixes that "ab" is
  726|       |  // is a subset need be examined.
  727|       |  // The same argument goes for suffix string that are reversed.
  728|       |
  729|       |  // Then to top this off why not examine the first char of the word to quickly
  730|       |  // limit the set of prefixes to examine (i.e. the prefixes to examine must
  731|       |  // be leading supersets of the first character of the word (if they exist)
  732|       |
  733|       |  // To take advantage of this "subset" relationship, we need to add two links
  734|       |  // from entry.  One to take next if the current prefix is found (call it
  735|       |  // nexteq)
  736|       |  // and one to take next if the current prefix is not found (call it nextne).
  737|       |
  738|       |  // Since we have built ordered lists, all that remains is to properly
  739|       |  // initialize
  740|       |  // the nextne and nexteq pointers that relate them
  741|       |
  742|     38|  process_pfx_order();
  743|     38|  process_sfx_order();
  744|       |
  745|     38|  return 0;
  746|     38|}
_ZN8AffixMgr13build_pfxtreeEP8PfxEntry:
  752|      8|int AffixMgr::build_pfxtree(PfxEntry* pfxptr) {
  753|      8|  PfxEntry* ptr;
  754|      8|  PfxEntry* pptr;
  755|      8|  PfxEntry* ep = pfxptr;
  756|       |
  757|       |  // get the right starting points
  758|      8|  const char* key = ep->getKey();
  759|      8|  const auto flg = (unsigned char)(ep->getFlag() & 0x00FF);
  760|       |
  761|       |  // first index by flag which must exist
  762|      8|  ptr = pFlag[flg];
  763|      8|  ep->setFlgNxt(ptr);
  764|      8|  pFlag[flg] = ep;
  765|       |
  766|       |  // handle the special case of null affix string
  767|      8|  if (*key == '\0') {
  ------------------
  |  Branch (767:7): [True: 2, False: 6]
  ------------------
  768|       |    // always inset them at head of list at element 0
  769|      2|    ptr = pStart[0];
  770|      2|    ep->setNext(ptr);
  771|      2|    pStart[0] = ep;
  772|      2|    return 0;
  773|      2|  }
  774|       |
  775|       |  // now handle the normal case
  776|      6|  ep->setNextEQ(nullptr);
  777|      6|  ep->setNextNE(nullptr);
  778|       |
  779|      6|  unsigned char sp = *((const unsigned char*)key);
  780|      6|  ptr = pStart[sp];
  781|       |
  782|       |  // handle the first insert
  783|      6|  if (!ptr) {
  ------------------
  |  Branch (783:7): [True: 4, False: 2]
  ------------------
  784|      4|    pStart[sp] = ep;
  785|      4|    return 0;
  786|      4|  }
  787|       |
  788|       |  // otherwise use binary tree insertion so that a sorted
  789|       |  // list can easily be generated later
  790|      2|  pptr = nullptr;
  791|      2|  for (;;) {
  792|      2|    pptr = ptr;
  793|      2|    if (strcmp(ep->getKey(), ptr->getKey()) <= 0) {
  ------------------
  |  Branch (793:9): [True: 0, False: 2]
  ------------------
  794|      0|      ptr = ptr->getNextEQ();
  795|      0|      if (!ptr) {
  ------------------
  |  Branch (795:11): [True: 0, False: 0]
  ------------------
  796|      0|        pptr->setNextEQ(ep);
  797|      0|        break;
  798|      0|      }
  799|      2|    } else {
  800|      2|      ptr = ptr->getNextNE();
  801|      2|      if (!ptr) {
  ------------------
  |  Branch (801:11): [True: 2, False: 0]
  ------------------
  802|      2|        pptr->setNextNE(ep);
  803|      2|        break;
  804|      2|      }
  805|      2|    }
  806|      2|  }
  807|      2|  return 0;
  808|      6|}
_ZN8AffixMgr13build_sfxtreeEP8SfxEntry:
  813|     34|int AffixMgr::build_sfxtree(SfxEntry* sfxptr) {
  814|       |
  815|     34|  sfxptr->initReverseWord();
  816|       |
  817|     34|  SfxEntry* ptr;
  818|     34|  SfxEntry* pptr;
  819|     34|  SfxEntry* ep = sfxptr;
  820|       |
  821|       |  /* get the right starting point */
  822|     34|  const char* key = ep->getKey();
  823|     34|  const auto flg = (unsigned char)(ep->getFlag() & 0x00FF);
  824|       |
  825|       |  // first index by flag which must exist
  826|     34|  ptr = sFlag[flg];
  827|     34|  ep->setFlgNxt(ptr);
  828|     34|  sFlag[flg] = ep;
  829|       |
  830|       |  // next index by affix string
  831|       |
  832|       |  // handle the special case of null affix string
  833|     34|  if (*key == '\0') {
  ------------------
  |  Branch (833:7): [True: 0, False: 34]
  ------------------
  834|       |    // always inset them at head of list at element 0
  835|      0|    ptr = sStart[0];
  836|      0|    ep->setNext(ptr);
  837|      0|    sStart[0] = ep;
  838|      0|    return 0;
  839|      0|  }
  840|       |
  841|       |  // now handle the normal case
  842|     34|  ep->setNextEQ(nullptr);
  843|     34|  ep->setNextNE(nullptr);
  844|       |
  845|     34|  unsigned char sp = *((const unsigned char*)key);
  846|     34|  ptr = sStart[sp];
  847|       |
  848|       |  // handle the first insert
  849|     34|  if (!ptr) {
  ------------------
  |  Branch (849:7): [True: 22, False: 12]
  ------------------
  850|     22|    sStart[sp] = ep;
  851|     22|    return 0;
  852|     22|  }
  853|       |
  854|       |  // otherwise use binary tree insertion so that a sorted
  855|       |  // list can easily be generated later
  856|     12|  pptr = nullptr;
  857|     20|  for (;;) {
  858|     20|    pptr = ptr;
  859|     20|    if (strcmp(ep->getKey(), ptr->getKey()) <= 0) {
  ------------------
  |  Branch (859:9): [True: 18, False: 2]
  ------------------
  860|     18|      ptr = ptr->getNextEQ();
  861|     18|      if (!ptr) {
  ------------------
  |  Branch (861:11): [True: 10, False: 8]
  ------------------
  862|     10|        pptr->setNextEQ(ep);
  863|     10|        break;
  864|     10|      }
  865|     18|    } else {
  866|      2|      ptr = ptr->getNextNE();
  867|      2|      if (!ptr) {
  ------------------
  |  Branch (867:11): [True: 2, False: 0]
  ------------------
  868|      2|        pptr->setNextNE(ep);
  869|      2|        break;
  870|      2|      }
  871|      2|    }
  872|     20|  }
  873|     12|  return 0;
  874|     34|}
_ZN8AffixMgr24process_pfx_tree_to_listEv:
  877|     38|int AffixMgr::process_pfx_tree_to_list() {
  878|  9.72k|  for (int i = 1; i < SETSIZE; i++) {
  ------------------
  |  |   61|  9.72k|#define SETSIZE 256
  ------------------
  |  Branch (878:19): [True: 9.69k, False: 38]
  ------------------
  879|  9.69k|    pStart[i] = process_pfx_in_order(pStart[i], nullptr);
  880|  9.69k|  }
  881|     38|  return 0;
  882|     38|}
_ZN8AffixMgr20process_pfx_in_orderEP8PfxEntryS1_:
  884|  9.70k|PfxEntry* AffixMgr::process_pfx_in_order(PfxEntry* ptr, PfxEntry* nptr) {
  885|  9.70k|  if (ptr) {
  ------------------
  |  Branch (885:7): [True: 6, False: 9.69k]
  ------------------
  886|      6|    nptr = process_pfx_in_order(ptr->getNextNE(), nptr);
  887|      6|    ptr->setNext(nptr);
  888|      6|    nptr = process_pfx_in_order(ptr->getNextEQ(), ptr);
  889|      6|  }
  890|  9.70k|  return nptr;
  891|  9.70k|}
_ZN8AffixMgr24process_sfx_tree_to_listEv:
  894|     38|int AffixMgr::process_sfx_tree_to_list() {
  895|  9.72k|  for (int i = 1; i < SETSIZE; i++) {
  ------------------
  |  |   61|  9.72k|#define SETSIZE 256
  ------------------
  |  Branch (895:19): [True: 9.69k, False: 38]
  ------------------
  896|  9.69k|    sStart[i] = process_sfx_in_order(sStart[i], nullptr);
  897|  9.69k|  }
  898|     38|  return 0;
  899|     38|}
_ZN8AffixMgr20process_sfx_in_orderEP8SfxEntryS1_:
  901|  9.75k|SfxEntry* AffixMgr::process_sfx_in_order(SfxEntry* ptr, SfxEntry* nptr) {
  902|  9.75k|  if (ptr) {
  ------------------
  |  Branch (902:7): [True: 34, False: 9.72k]
  ------------------
  903|     34|    nptr = process_sfx_in_order(ptr->getNextNE(), nptr);
  904|     34|    ptr->setNext(nptr);
  905|     34|    nptr = process_sfx_in_order(ptr->getNextEQ(), ptr);
  906|     34|  }
  907|  9.75k|  return nptr;
  908|  9.75k|}
_ZN8AffixMgr17process_pfx_orderEv:
  912|     38|int AffixMgr::process_pfx_order() {
  913|     38|  PfxEntry* ptr;
  914|       |
  915|       |  // loop through each prefix list starting point
  916|  9.72k|  for (int i = 1; i < SETSIZE; i++) {
  ------------------
  |  |   61|  9.72k|#define SETSIZE 256
  ------------------
  |  Branch (916:19): [True: 9.69k, False: 38]
  ------------------
  917|  9.69k|    ptr = pStart[i];
  918|       |
  919|       |    // look through the remainder of the list
  920|       |    //  and find next entry with affix that
  921|       |    // the current one is not a subset of
  922|       |    // mark that as destination for NextNE
  923|       |    // use next in list that you are a subset
  924|       |    // of as NextEQ
  925|       |
  926|  9.69k|    for (; ptr != nullptr; ptr = ptr->getNext()) {
  ------------------
  |  Branch (926:12): [True: 6, False: 9.69k]
  ------------------
  927|      6|      PfxEntry* nptr = ptr->getNext();
  928|      8|      for (; nptr != nullptr; nptr = nptr->getNext()) {
  ------------------
  |  Branch (928:14): [True: 2, False: 6]
  ------------------
  929|      2|        if (!isSubset(ptr->getKey(), nptr->getKey()))
  ------------------
  |  Branch (929:13): [True: 0, False: 2]
  ------------------
  930|      0|          break;
  931|      2|      }
  932|      6|      ptr->setNextNE(nptr);
  933|      6|      ptr->setNextEQ(nullptr);
  934|      6|      if ((ptr->getNext()) &&
  ------------------
  |  Branch (934:11): [True: 2, False: 4]
  ------------------
  935|      2|          isSubset(ptr->getKey(), (ptr->getNext())->getKey()))
  ------------------
  |  Branch (935:11): [True: 2, False: 0]
  ------------------
  936|      2|        ptr->setNextEQ(ptr->getNext());
  937|      6|    }
  938|       |
  939|       |    // now clean up by adding smart search termination strings:
  940|       |    // if you are already a superset of the previous prefix
  941|       |    // but not a subset of the next, search can end here
  942|       |    // so set NextNE properly
  943|       |
  944|  9.69k|    ptr = pStart[i];
  945|  9.69k|    for (; ptr != nullptr; ptr = ptr->getNext()) {
  ------------------
  |  Branch (945:12): [True: 6, False: 9.69k]
  ------------------
  946|      6|      PfxEntry* nptr = ptr->getNext();
  947|      6|      PfxEntry* mptr = nullptr;
  948|      8|      for (; nptr != nullptr; nptr = nptr->getNext()) {
  ------------------
  |  Branch (948:14): [True: 2, False: 6]
  ------------------
  949|      2|        if (!isSubset(ptr->getKey(), nptr->getKey()))
  ------------------
  |  Branch (949:13): [True: 0, False: 2]
  ------------------
  950|      0|          break;
  951|      2|        mptr = nptr;
  952|      2|      }
  953|      6|      if (mptr)
  ------------------
  |  Branch (953:11): [True: 2, False: 4]
  ------------------
  954|      2|        mptr->setNextNE(nullptr);
  955|      6|    }
  956|  9.69k|  }
  957|     38|  return 0;
  958|     38|}
_ZN8AffixMgr17process_sfx_orderEv:
  962|     38|int AffixMgr::process_sfx_order() {
  963|     38|  SfxEntry* ptr;
  964|       |
  965|       |  // loop through each prefix list starting point
  966|  9.72k|  for (int i = 1; i < SETSIZE; i++) {
  ------------------
  |  |   61|  9.72k|#define SETSIZE 256
  ------------------
  |  Branch (966:19): [True: 9.69k, False: 38]
  ------------------
  967|  9.69k|    ptr = sStart[i];
  968|       |
  969|       |    // look through the remainder of the list
  970|       |    //  and find next entry with affix that
  971|       |    // the current one is not a subset of
  972|       |    // mark that as destination for NextNE
  973|       |    // use next in list that you are a subset
  974|       |    // of as NextEQ
  975|       |
  976|  9.72k|    for (; ptr != nullptr; ptr = ptr->getNext()) {
  ------------------
  |  Branch (976:12): [True: 34, False: 9.69k]
  ------------------
  977|     34|      SfxEntry* nptr = ptr->getNext();
  978|     52|      for (; nptr != nullptr; nptr = nptr->getNext()) {
  ------------------
  |  Branch (978:14): [True: 20, False: 32]
  ------------------
  979|     20|        if (!isSubset(ptr->getKey(), nptr->getKey()))
  ------------------
  |  Branch (979:13): [True: 2, False: 18]
  ------------------
  980|      2|          break;
  981|     20|      }
  982|     34|      ptr->setNextNE(nptr);
  983|     34|      ptr->setNextEQ(nullptr);
  984|     34|      if ((ptr->getNext()) &&
  ------------------
  |  Branch (984:11): [True: 12, False: 22]
  ------------------
  985|     12|          isSubset(ptr->getKey(), (ptr->getNext())->getKey()))
  ------------------
  |  Branch (985:11): [True: 10, False: 2]
  ------------------
  986|     10|        ptr->setNextEQ(ptr->getNext());
  987|     34|    }
  988|       |
  989|       |    // now clean up by adding smart search termination strings:
  990|       |    // if you are already a superset of the previous suffix
  991|       |    // but not a subset of the next, search can end here
  992|       |    // so set NextNE properly
  993|       |
  994|  9.69k|    ptr = sStart[i];
  995|  9.72k|    for (; ptr != nullptr; ptr = ptr->getNext()) {
  ------------------
  |  Branch (995:12): [True: 34, False: 9.69k]
  ------------------
  996|     34|      SfxEntry* nptr = ptr->getNext();
  997|     34|      SfxEntry* mptr = nullptr;
  998|     52|      for (; nptr != nullptr; nptr = nptr->getNext()) {
  ------------------
  |  Branch (998:14): [True: 20, False: 32]
  ------------------
  999|     20|        if (!isSubset(ptr->getKey(), nptr->getKey()))
  ------------------
  |  Branch (999:13): [True: 2, False: 18]
  ------------------
 1000|      2|          break;
 1001|     18|        mptr = nptr;
 1002|     18|      }
 1003|     34|      if (mptr)
  ------------------
  |  Branch (1003:11): [True: 10, False: 24]
  ------------------
 1004|     10|        mptr->setNextNE(nullptr);
 1005|     34|    }
 1006|  9.69k|  }
 1007|     38|  return 0;
 1008|     38|}
_ZN8AffixMgr7condlenERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1021|      8|int AffixMgr::condlen(const std::string& s) {
 1022|      8|  int l = 0;
 1023|      8|  bool group = false;
 1024|      8|  size_t i = 0;
 1025|     42|  while (i < s.size()) {
  ------------------
  |  Branch (1025:10): [True: 34, False: 8]
  ------------------
 1026|     34|    if (s[i] == '[') {
  ------------------
  |  Branch (1026:9): [True: 4, False: 30]
  ------------------
 1027|      4|      group = true;
 1028|      4|      ++l;
 1029|      4|      ++i;
 1030|     30|    } else if (s[i] == ']') {
  ------------------
  |  Branch (1030:16): [True: 4, False: 26]
  ------------------
 1031|      4|      group = false;
 1032|      4|      ++i;
 1033|     26|    } else if (group) {
  ------------------
  |  Branch (1033:16): [True: 18, False: 8]
  ------------------
 1034|     18|      ++i;
 1035|     18|    } else {
 1036|      8|      ++l;
 1037|      8|      i = utf8 ? utf8_next(s, i) : i + 1;
  ------------------
  |  Branch (1037:11): [True: 8, False: 0]
  ------------------
 1038|      8|    }
 1039|     34|  }
 1040|      8|  return l;
 1041|      8|}
_ZN8AffixMgr8encodeitER8AffEntryRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE:
 1043|     42|int AffixMgr::encodeit(AffEntry& entry, const std::string& cs) {
 1044|     42|  if (cs.compare(".") != 0) {
  ------------------
  |  Branch (1044:7): [True: 8, False: 34]
  ------------------
 1045|      8|    entry.numconds = (char)condlen(cs);
 1046|      8|    const size_t cslen = cs.size();
 1047|      8|    const size_t short_part = std::min<size_t>(MAXCONDLEN, cslen);
  ------------------
  |  |   90|      8|#define MAXCONDLEN 20
  ------------------
 1048|      8|    memcpy(entry.c.conds, cs.data(), short_part);
 1049|      8|    if (short_part < MAXCONDLEN) {
  ------------------
  |  |   90|      8|#define MAXCONDLEN 20
  ------------------
  |  Branch (1049:9): [True: 8, False: 0]
  ------------------
 1050|       |      //blank out the remaining space
 1051|      8|      memset(entry.c.conds + short_part, 0, MAXCONDLEN - short_part);
  ------------------
  |  |   90|      8|#define MAXCONDLEN 20
  ------------------
 1052|      8|    } else if (cs[MAXCONDLEN]) {
  ------------------
  |  |   90|      0|#define MAXCONDLEN 20
  ------------------
  |  Branch (1052:16): [True: 0, False: 0]
  ------------------
 1053|       |      //there is more conditions than fit in fixed space, so its
 1054|       |      //a long condition
 1055|      0|      entry.opts |= aeLONGCOND;
  ------------------
  |  |   69|      0|#define aeLONGCOND (1 << 4)
  ------------------
 1056|      0|      size_t remaining = cs.size() - MAXCONDLEN_1;
  ------------------
  |  |   91|      0|#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char*))
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXCONDLEN 20
  |  |  ------------------
  ------------------
 1057|      0|      entry.c.l.conds2 = new char[1 + remaining];
 1058|      0|      memcpy(entry.c.l.conds2, cs.data() + MAXCONDLEN_1, remaining);
  ------------------
  |  |   91|      0|#define MAXCONDLEN_1 (MAXCONDLEN - sizeof(char*))
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXCONDLEN 20
  |  |  ------------------
  ------------------
 1059|      0|      entry.c.l.conds2[remaining] = 0;
 1060|      0|    }
 1061|     34|  } else {
 1062|     34|    entry.numconds = 0;
 1063|     34|    entry.c.conds[0] = '\0';
 1064|     34|  }
 1065|     42|  return 0;
 1066|     42|}
_ZN8AffixMgr12prefix_checkERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiicR12AffixScratchtt:
 1084|   512M|                                      const FLAG avoidflag) {
 1085|   512M|  struct hentry* rv = nullptr;
 1086|       |
 1087|   512M|  pfx = nullptr;
 1088|   512M|  pfxappnd = nullptr;
 1089|   512M|  sfxappnd = nullptr;
 1090|   512M|  sfxextra = 0;
 1091|       |
 1092|       |  // first handle the special case of 0 length prefixes
 1093|   512M|  PfxEntry* pe = pStart[0];
 1094|   513M|  while (pe) {
  ------------------
  |  Branch (1094:10): [True: 1.33M, False: 512M]
  ------------------
 1095|  1.33M|    if (
 1096|       |        // fogemorpheme
 1097|  1.33M|        ((in_compound != IN_CPD_NOT) ||
  ------------------
  |  |   72|  1.33M|#define IN_CPD_NOT 0
  ------------------
  |  Branch (1097:10): [True: 0, False: 1.33M]
  ------------------
 1098|  1.33M|         !(pe->getCont() &&
  ------------------
  |  Branch (1098:12): [True: 1.33M, False: 0]
  ------------------
 1099|  1.33M|           (TESTAFF(pe->getCont(), onlyincompound, pe->getContLen())))) &&
  ------------------
  |  |   99|  1.33M|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1099:12): [True: 0, False: 1.33M]
  ------------------
 1100|       |        // permit prefixes in compounds
 1101|  1.33M|        ((in_compound != IN_CPD_END) ||
  ------------------
  |  |   74|  1.33M|#define IN_CPD_END 2
  ------------------
  |  Branch (1101:10): [True: 1.33M, False: 0]
  ------------------
 1102|      0|         (pe->getCont() &&
  ------------------
  |  Branch (1102:11): [True: 0, False: 0]
  ------------------
 1103|  1.33M|          (TESTAFF(pe->getCont(), compoundpermitflag, pe->getContLen()))))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1103:11): [True: 0, False: 0]
  ------------------
 1104|       |      // check prefix
 1105|  1.33M|      rv = pe->checkword(word, start, len, in_compound, needflag, scratch);
 1106|       |      // Skip a stem with the avoid flag and keep scanning the other prefixes.
 1107|  1.33M|      if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   96|  1.33M|#define FLAG_NULL 0x00
  ------------------
                    if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1107:11): [True: 0, False: 1.33M]
  |  Branch (1107:17): [True: 0, False: 0]
  ------------------
 1108|      0|        rv = nullptr;
 1109|  1.33M|      if (rv) {
  ------------------
  |  Branch (1109:11): [True: 0, False: 1.33M]
  ------------------
 1110|      0|        pfx = pe;  // BUG: pfx not stateless
 1111|      0|        return rv;
 1112|      0|      }
 1113|  1.33M|    }
 1114|  1.33M|    pe = pe->getNext();
 1115|  1.33M|  }
 1116|       |
 1117|       |  // now handle the general case
 1118|   512M|  unsigned char sp = word[start];
 1119|   512M|  PfxEntry* pptr = pStart[sp];
 1120|       |
 1121|   512M|  while (pptr) {
  ------------------
  |  Branch (1121:10): [True: 40.2k, False: 512M]
  ------------------
 1122|  40.2k|    if (isSubset(pptr->getKey(), word.c_str() + start)) {
  ------------------
  |  Branch (1122:9): [True: 29.8k, False: 10.3k]
  ------------------
 1123|  29.8k|      if (
 1124|       |          // fogemorpheme
 1125|  29.8k|          ((in_compound != IN_CPD_NOT) ||
  ------------------
  |  |   72|  29.8k|#define IN_CPD_NOT 0
  ------------------
  |  Branch (1125:12): [True: 0, False: 29.8k]
  ------------------
 1126|  29.8k|           !(pptr->getCont() &&
  ------------------
  |  Branch (1126:14): [True: 24.9k, False: 4.87k]
  ------------------
 1127|  24.9k|             (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen())))) &&
  ------------------
  |  |   99|  24.9k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1127:14): [True: 0, False: 24.9k]
  ------------------
 1128|       |          // permit prefixes in compounds
 1129|  29.8k|          ((in_compound != IN_CPD_END) ||
  ------------------
  |  |   74|  29.8k|#define IN_CPD_END 2
  ------------------
  |  Branch (1129:12): [True: 29.8k, False: 0]
  ------------------
 1130|      0|           (pptr->getCont() && (TESTAFF(pptr->getCont(), compoundpermitflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1130:13): [True: 0, False: 0]
  |  Branch (1130:32): [True: 0, False: 0]
  ------------------
 1131|  29.8k|                                        pptr->getContLen()))))) {
 1132|       |        // check prefix
 1133|  29.8k|        rv = pptr->checkword(word, start, len, in_compound, needflag, scratch);
 1134|  29.8k|        if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   96|  29.8k|#define FLAG_NULL 0x00
  ------------------
                      if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1134:13): [True: 0, False: 29.8k]
  |  Branch (1134:19): [True: 0, False: 0]
  ------------------
 1135|      0|          rv = nullptr;
 1136|  29.8k|        if (rv) {
  ------------------
  |  Branch (1136:13): [True: 0, False: 29.8k]
  ------------------
 1137|      0|          pfx = pptr;  // BUG: pfx not stateless
 1138|      0|          return rv;
 1139|      0|        }
 1140|  29.8k|      }
 1141|  29.8k|      pptr = pptr->getNextEQ();
 1142|  29.8k|    } else {
 1143|  10.3k|      pptr = pptr->getNextNE();
 1144|  10.3k|    }
 1145|  40.2k|  }
 1146|       |
 1147|   512M|  return nullptr;
 1148|   512M|}
_ZN8AffixMgr19prefix_check_twosfxERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiicR12AffixScratcht:
 1156|  15.7M|                                             const FLAG needflag) {
 1157|  15.7M|  struct hentry* rv = nullptr;
 1158|       |
 1159|  15.7M|  pfx = nullptr;
 1160|  15.7M|  sfxappnd = nullptr;
 1161|  15.7M|  sfxextra = 0;
 1162|       |
 1163|       |  // first handle the special case of 0 length prefixes
 1164|  15.7M|  PfxEntry* pe = pStart[0];
 1165|       |
 1166|  17.0M|  while (pe) {
  ------------------
  |  Branch (1166:10): [True: 1.33M, False: 15.7M]
  ------------------
 1167|  1.33M|    rv = pe->check_twosfx(word, start, len, in_compound, needflag, scratch);
 1168|  1.33M|    if (rv)
  ------------------
  |  Branch (1168:9): [True: 0, False: 1.33M]
  ------------------
 1169|      0|      return rv;
 1170|  1.33M|    pe = pe->getNext();
 1171|  1.33M|  }
 1172|       |
 1173|       |  // now handle the general case
 1174|  15.7M|  unsigned char sp = word[start];
 1175|  15.7M|  PfxEntry* pptr = pStart[sp];
 1176|       |
 1177|  15.7M|  while (pptr) {
  ------------------
  |  Branch (1177:10): [True: 35.3k, False: 15.7M]
  ------------------
 1178|  35.3k|    if (isSubset(pptr->getKey(), word.c_str() + start)) {
  ------------------
  |  Branch (1178:9): [True: 24.9k, False: 10.3k]
  ------------------
 1179|  24.9k|      rv = pptr->check_twosfx(word, start, len, in_compound, needflag, scratch);
 1180|  24.9k|      if (rv) {
  ------------------
  |  Branch (1180:11): [True: 0, False: 24.9k]
  ------------------
 1181|      0|        pfx = pptr;
 1182|      0|        return rv;
 1183|      0|      }
 1184|  24.9k|      pptr = pptr->getNextEQ();
 1185|  24.9k|    } else {
 1186|  10.3k|      pptr = pptr->getNextNE();
 1187|  10.3k|    }
 1188|  35.3k|  }
 1189|       |
 1190|  15.7M|  return nullptr;
 1191|  15.7M|}
_ZN8AffixMgr18prefix_check_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiicR12AffixScratcht:
 1199|  10.7k|                                         const FLAG needflag) {
 1200|       |
 1201|  10.7k|  std::string result;
 1202|       |
 1203|  10.7k|  pfx = nullptr;
 1204|  10.7k|  sfxappnd = nullptr;
 1205|  10.7k|  sfxextra = 0;
 1206|       |
 1207|       |  // first handle the special case of 0 length prefixes
 1208|  10.7k|  PfxEntry* pe = pStart[0];
 1209|  11.3k|  while (pe) {
  ------------------
  |  Branch (1209:10): [True: 575, False: 10.7k]
  ------------------
 1210|    575|    std::string st = pe->check_morph(word, start, len, in_compound, needflag, scratch);
 1211|    575|    if (!st.empty()) {
  ------------------
  |  Branch (1211:9): [True: 0, False: 575]
  ------------------
 1212|      0|      result.append(st);
 1213|      0|    }
 1214|    575|    pe = pe->getNext();
 1215|    575|  }
 1216|       |
 1217|       |  // now handle the general case
 1218|  10.7k|  unsigned char sp = word[start];
 1219|  10.7k|  PfxEntry* pptr = pStart[sp];
 1220|       |
 1221|  10.7k|  while (pptr) {
  ------------------
  |  Branch (1221:10): [True: 3, False: 10.7k]
  ------------------
 1222|      3|    if (isSubset(pptr->getKey(), word.c_str() + start)) {
  ------------------
  |  Branch (1222:9): [True: 1, False: 2]
  ------------------
 1223|      1|      std::string st = pptr->check_morph(word, start, len, in_compound, needflag, scratch);
 1224|      1|      if (!st.empty()) {
  ------------------
  |  Branch (1224:11): [True: 0, False: 1]
  ------------------
 1225|       |        // fogemorpheme
 1226|      0|        if ((in_compound != IN_CPD_NOT) ||
  ------------------
  |  |   72|      0|#define IN_CPD_NOT 0
  ------------------
  |  Branch (1226:13): [True: 0, False: 0]
  ------------------
 1227|      0|            !((pptr->getCont() && (TESTAFF(pptr->getCont(), onlyincompound,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1227:16): [True: 0, False: 0]
  |  Branch (1227:35): [True: 0, False: 0]
  ------------------
 1228|      0|                                           pptr->getContLen()))))) {
 1229|      0|          result.append(st);
 1230|      0|          pfx = pptr;
 1231|      0|        }
 1232|      0|      }
 1233|      1|      pptr = pptr->getNextEQ();
 1234|      2|    } else {
 1235|      2|      pptr = pptr->getNextNE();
 1236|      2|    }
 1237|      3|  }
 1238|       |
 1239|  10.7k|  return result;
 1240|  10.7k|}
_ZN8AffixMgr25prefix_check_twosfx_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiicR12AffixScratcht:
 1248|  3.36k|                                                const FLAG needflag) {
 1249|  3.36k|  std::string result;
 1250|       |
 1251|  3.36k|  pfx = nullptr;
 1252|  3.36k|  sfxappnd = nullptr;
 1253|  3.36k|  sfxextra = 0;
 1254|       |
 1255|       |  // first handle the special case of 0 length prefixes
 1256|  3.36k|  PfxEntry* pe = pStart[0];
 1257|  3.94k|  while (pe) {
  ------------------
  |  Branch (1257:10): [True: 575, False: 3.36k]
  ------------------
 1258|    575|    std::string st = pe->check_twosfx_morph(word, start, len, in_compound, needflag, scratch);
 1259|    575|    if (!st.empty()) {
  ------------------
  |  Branch (1259:9): [True: 0, False: 575]
  ------------------
 1260|      0|      result.append(st);
 1261|      0|    }
 1262|    575|    pe = pe->getNext();
 1263|    575|  }
 1264|       |
 1265|       |  // now handle the general case
 1266|  3.36k|  unsigned char sp = word[start];
 1267|  3.36k|  PfxEntry* pptr = pStart[sp];
 1268|       |
 1269|  3.37k|  while (pptr) {
  ------------------
  |  Branch (1269:10): [True: 2, False: 3.36k]
  ------------------
 1270|      2|    if (isSubset(pptr->getKey(), word.c_str() + start)) {
  ------------------
  |  Branch (1270:9): [True: 0, False: 2]
  ------------------
 1271|      0|      std::string st = pptr->check_twosfx_morph(word, start, len, in_compound, needflag, scratch);
 1272|      0|      if (!st.empty()) {
  ------------------
  |  Branch (1272:11): [True: 0, False: 0]
  ------------------
 1273|      0|        result.append(st);
 1274|      0|        pfx = pptr;
 1275|      0|      }
 1276|      0|      pptr = pptr->getNextEQ();
 1277|      2|    } else {
 1278|      2|      pptr = pptr->getNextNE();
 1279|      2|    }
 1280|      2|  }
 1281|       |
 1282|  3.36k|  return result;
 1283|  3.36k|}
_ZN8AffixMgr12get_syllableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1559|    442|short AffixMgr::get_syllable(const std::string& word) {
 1560|    442|  if (cpdmaxsyllable == 0)
  ------------------
  |  Branch (1560:7): [True: 0, False: 442]
  ------------------
 1561|      0|    return 0;
 1562|       |
 1563|    442|  short num = 0;
 1564|       |
 1565|    442|  if (!utf8) {
  ------------------
  |  Branch (1565:7): [True: 0, False: 442]
  ------------------
 1566|      0|    num = (short)std::count_if(word.begin(), word.end(),
 1567|      0|          [&](char c) {
 1568|      0|            return std::binary_search(cpdvowels.begin(), cpdvowels.end(), c);
 1569|      0|          });
 1570|    442|  } else if (!cpdvowels_utf16.empty()) {
  ------------------
  |  Branch (1570:14): [True: 442, False: 0]
  ------------------
 1571|    442|    std::vector<w_char> w;
 1572|    442|    u8_u16(w, word);
 1573|    442|    num = (short)std::count_if(w.begin(), w.end(),
 1574|    442|          [&](w_char wc) {
 1575|    442|            return std::binary_search(cpdvowels_utf16.begin(), cpdvowels_utf16.end(), wc);
 1576|    442|          });
 1577|    442|  }
 1578|       |
 1579|    442|  return num;
 1580|    442|}
_ZN8AffixMgr10setcminmaxEPmS0_PKcm:
 1582|  21.7M|void AffixMgr::setcminmax(size_t* cmin, size_t* cmax, const char* word, size_t len) {
 1583|  21.7M|  if (utf8) {
  ------------------
  |  Branch (1583:7): [True: 1.55M, False: 20.1M]
  ------------------
 1584|  1.55M|    int i;
 1585|  4.64M|    for (*cmin = 0, i = 0; (i < cpdmin) && *cmin < len; i++) {
  ------------------
  |  Branch (1585:28): [True: 3.11M, False: 1.53M]
  |  Branch (1585:44): [True: 3.08M, False: 24.4k]
  ------------------
 1586|  3.41M|      for ((*cmin)++; *cmin < len && is_utf8_cont(word[*cmin]); (*cmin)++)
  ------------------
  |  Branch (1586:23): [True: 3.37M, False: 42.2k]
  |  Branch (1586:38): [True: 328k, False: 3.04M]
  ------------------
 1587|   328k|        ;
 1588|  3.08M|    }
 1589|  3.11M|    for (*cmax = len, i = 0; (i < (cpdmin - 1)) && *cmax > 0; i++) {
  ------------------
  |  Branch (1589:30): [True: 1.55M, False: 1.55M]
  |  Branch (1589:52): [True: 1.55M, False: 3.01k]
  ------------------
 1590|  2.47M|      for ((*cmax)--; *cmax > 0 && is_utf8_cont(word[*cmax]); (*cmax)--)
  ------------------
  |  Branch (1590:23): [True: 2.45M, False: 21.4k]
  |  Branch (1590:36): [True: 923k, False: 1.53M]
  ------------------
 1591|   923k|        ;
 1592|  1.55M|    }
 1593|  20.1M|  } else {
 1594|  20.1M|    *cmin = cpdmin;
 1595|  20.1M|    *cmax = len - cpdmin + 1;
 1596|  20.1M|  }
 1597|  21.7M|}
_ZN8AffixMgr14compound_checkERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEssssPP6hentrySB_ccPiR12AffixScratch:
 1611|  21.7M|                                        AffixScratch& scratch) {
 1612|  21.7M|  short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2;
 1613|  21.7M|  hentry *rv = nullptr, *rv_first;
 1614|  21.7M|  std::string st;
 1615|  21.7M|  char ch = '\0', affixed;
 1616|  21.7M|  size_t cmin, cmax;
 1617|  21.7M|  int striple = 0, soldi = 0, oldcmin = 0, oldcmax = 0, oldlen = 0, checkedstriple = 0;
 1618|  21.7M|  hentry** oldwords = words;
 1619|  21.7M|  size_t scpd = 0, len = word.size();
 1620|       |
 1621|       |  // protect subsequent words[wnum + 1] reads and any recursion
 1622|  21.7M|  if (wnum + 1 >= maxwordnum)
  ------------------
  |  Branch (1622:7): [True: 0, False: 21.7M]
  ------------------
 1623|      0|    return nullptr;
 1624|       |
 1625|  21.7M|  int checked_prefix;
 1626|       |
 1627|       |  // add a time limit to handle possible
 1628|       |  // combinatorical explosion of the overlapping words
 1629|       |
 1630|  21.7M|  HUNSPELL_THREAD_LOCAL std::chrono::steady_clock::time_point clock_time_start;
  ------------------
  |  |   60|  21.7M|#  define HUNSPELL_THREAD_LOCAL thread_local
  ------------------
 1631|  21.7M|  HUNSPELL_THREAD_LOCAL bool timelimit_exceeded;
  ------------------
  |  |   60|  21.7M|#  define HUNSPELL_THREAD_LOCAL thread_local
  ------------------
 1632|       |
 1633|       |  // get the current time
 1634|  21.7M|  std::chrono::steady_clock::time_point clock_now = std::chrono::steady_clock::now();
 1635|       |
 1636|  21.7M|  if (wnum == 0) {
  ------------------
  |  Branch (1636:7): [True: 21.7M, False: 287]
  ------------------
 1637|       |      // set the start time
 1638|  21.7M|      clock_time_start = clock_now;
 1639|  21.7M|      timelimit_exceeded = false;
 1640|  21.7M|  }
 1641|    287|  else if (clock_now - clock_time_start > TIMELIMIT_MS)
  ------------------
  |  |  106|    287|#define TIMELIMIT_MS std::chrono::milliseconds(50)
  ------------------
  |  Branch (1641:12): [True: 0, False: 287]
  ------------------
 1642|      0|      timelimit_exceeded = true;
 1643|       |
 1644|  21.7M|  setcminmax(&cmin, &cmax, word.c_str(), len);
 1645|       |
 1646|  21.7M|  st.assign(word);
 1647|       |
 1648|   488M|  for (size_t i = cmin; i < cmax; ++i) {
  ------------------
  |  Branch (1648:25): [True: 467M, False: 20.8M]
  ------------------
 1649|       |    // go to end of the UTF-8 character
 1650|   467M|    if (utf8) {
  ------------------
  |  Branch (1650:9): [True: 35.4M, False: 432M]
  ------------------
 1651|  42.8M|      for (; is_utf8_cont(st[i]); i++)
  ------------------
  |  Branch (1651:14): [True: 7.34M, False: 35.4M]
  ------------------
 1652|  7.34M|        ;
 1653|  35.4M|      if (i >= cmax)
  ------------------
  |  Branch (1653:11): [True: 147k, False: 35.3M]
  ------------------
 1654|   147k|        return nullptr;
 1655|  35.4M|    }
 1656|       |
 1657|   467M|    words = oldwords;
 1658|   467M|    int onlycpdrule = (words) ? 1 : 0;
  ------------------
  |  Branch (1658:23): [True: 0, False: 467M]
  ------------------
 1659|       |
 1660|   467M|    do {  // onlycpdrule loop
 1661|       |
 1662|   467M|      oldnumsyllable = numsyllable;
 1663|   467M|      oldwordnum = wordnum;
 1664|   467M|      checked_prefix = 0;
 1665|       |
 1666|   467M|      do {  // simplified checkcompoundpattern loop
 1667|       |
 1668|   467M|        if (timelimit_exceeded ||
  ------------------
  |  Branch (1668:13): [True: 0, False: 467M]
  |  Branch (1668:13): [True: 0, False: 467M]
  ------------------
 1669|   467M|            std::chrono::steady_clock::now() - clock_time_start > TIMELIMIT_MS) {
  ------------------
  |  |  106|   467M|#define TIMELIMIT_MS std::chrono::milliseconds(50)
  ------------------
  |  Branch (1669:13): [True: 0, False: 467M]
  ------------------
 1670|      0|          timelimit_exceeded = true;
 1671|      0|          return nullptr;
 1672|      0|        }
 1673|       |
 1674|   467M|        if (scpd > 0) {
  ------------------
  |  Branch (1674:13): [True: 0, False: 467M]
  ------------------
 1675|      0|          for (; scpd <= checkcpdtable.size() &&
  ------------------
  |  Branch (1675:18): [True: 0, False: 0]
  ------------------
 1676|      0|                 (checkcpdtable[scpd - 1].pattern3.empty() ||
  ------------------
  |  Branch (1676:19): [True: 0, False: 0]
  ------------------
 1677|      0|                  i > word.size() ||
  ------------------
  |  Branch (1677:19): [True: 0, False: 0]
  ------------------
 1678|      0|                  word.compare(i, checkcpdtable[scpd - 1].pattern3.size(), checkcpdtable[scpd - 1].pattern3) != 0);
  ------------------
  |  Branch (1678:19): [True: 0, False: 0]
  ------------------
 1679|      0|               scpd++)
 1680|      0|            ;
 1681|       |
 1682|      0|          if (scpd > checkcpdtable.size())
  ------------------
  |  Branch (1682:15): [True: 0, False: 0]
  ------------------
 1683|      0|            break;  // break simplified checkcompoundpattern loop
 1684|      0|          st.replace(i, std::string::npos, checkcpdtable[scpd - 1].pattern);
 1685|      0|          soldi = i;
 1686|      0|          i += checkcpdtable[scpd - 1].pattern.size();
 1687|      0|          st.replace(i, std::string::npos, checkcpdtable[scpd - 1].pattern2);
 1688|      0|          st.replace(i + checkcpdtable[scpd - 1].pattern2.size(), std::string::npos,
 1689|      0|                 word.substr(soldi + checkcpdtable[scpd - 1].pattern3.size()));
 1690|       |
 1691|      0|          oldlen = len;
 1692|      0|          len += checkcpdtable[scpd - 1].pattern.size() +
 1693|      0|                 checkcpdtable[scpd - 1].pattern2.size() -
 1694|      0|                 checkcpdtable[scpd - 1].pattern3.size();
 1695|      0|          oldcmin = cmin;
 1696|      0|          oldcmax = cmax;
 1697|      0|          setcminmax(&cmin, &cmax, st.c_str(), len);
 1698|       |
 1699|      0|          cmax = len - cpdmin + 1;
 1700|      0|        }
 1701|       |
 1702|   467M|        if (i >= st.size())
  ------------------
  |  Branch (1702:13): [True: 710k, False: 466M]
  ------------------
 1703|   710k|          return nullptr;
 1704|       |
 1705|   466M|        ch = st[i];
 1706|   466M|        st[i] = '\0';
 1707|       |
 1708|   466M|        sfx = nullptr;
 1709|   466M|        pfx = nullptr;
 1710|       |
 1711|       |        // FIRST WORD
 1712|       |
 1713|   466M|        affixed = 1;
 1714|   466M|        rv = lookup(st.c_str(), i);  // perhaps without prefix
 1715|       |
 1716|       |        // forbid dictionary stems with COMPOUNDFORBIDFLAG in
 1717|       |        // compound words, overriding the effect of COMPOUNDPERMITFLAG
 1718|   466M|        if ((rv) && compoundforbidflag &&
  ------------------
  |  Branch (1718:13): [True: 2.57M, False: 464M]
  |  Branch (1718:21): [True: 107k, False: 2.46M]
  ------------------
 1719|   107k|                TESTAFF(rv->astr, compoundforbidflag, rv->alen) && !hu_mov_rule) {
  ------------------
  |  |   99|   466M|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 107k]
  |  |  ------------------
  ------------------
  |  Branch (1719:68): [True: 0, False: 0]
  ------------------
 1720|      0|            bool would_continue = !onlycpdrule && simplifiedcpd;
  ------------------
  |  Branch (1720:35): [True: 0, False: 0]
  |  Branch (1720:51): [True: 0, False: 0]
  ------------------
 1721|      0|            if (!scpd && would_continue) {
  ------------------
  |  Branch (1721:17): [True: 0, False: 0]
  |  Branch (1721:26): [True: 0, False: 0]
  ------------------
 1722|       |                // given the while conditions that continue jumps to, this situation
 1723|       |                // never ends
 1724|      0|                HUNSPELL_WARNING(stderr, "break infinite loop\n");
 1725|      0|                break;
 1726|      0|            }
 1727|       |
 1728|      0|            if (scpd > 0 && would_continue) {
  ------------------
  |  Branch (1728:17): [True: 0, False: 0]
  |  Branch (1728:29): [True: 0, False: 0]
  ------------------
 1729|       |                // under these conditions we loop again, but the assumption above
 1730|       |                // appears to be that cmin and cmax are the original values they
 1731|       |                // had in the outside loop
 1732|      0|                cmin = oldcmin;
 1733|      0|                cmax = oldcmax;
 1734|      0|            }
 1735|      0|            continue;
 1736|      0|        }
 1737|       |
 1738|       |        // search homonym with compound flag
 1739|   469M|        while ((rv) && !hu_mov_rule &&
  ------------------
  |  Branch (1739:16): [True: 2.57M, False: 466M]
  |  Branch (1739:24): [True: 2.57M, False: 425]
  ------------------
 1740|  2.57M|               ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
  ------------------
  |  |   99|   823k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 823k]
  |  |  ------------------
  ------------------
  |  Branch (1740:18): [True: 823k, False: 1.74M]
  ------------------
 1741|  2.57M|                !((compoundflag && !words && !onlycpdrule &&
  ------------------
  |  Branch (1741:20): [True: 2.57M, False: 0]
  |  Branch (1741:36): [True: 2.57M, False: 0]
  |  Branch (1741:46): [True: 2.57M, False: 0]
  ------------------
 1742|  2.57M|                   TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|  2.57M|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 516, False: 2.57M]
  |  |  ------------------
  ------------------
 1743|  2.57M|                  (compoundbegin && !wordnum && !onlycpdrule &&
  ------------------
  |  Branch (1743:20): [True: 0, False: 2.57M]
  |  Branch (1743:37): [True: 0, False: 0]
  |  Branch (1743:49): [True: 0, False: 0]
  ------------------
 1744|      0|                   TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1745|  2.57M|                  (compoundmiddle && wordnum && !words && !onlycpdrule &&
  ------------------
  |  Branch (1745:20): [True: 0, False: 2.57M]
  |  Branch (1745:38): [True: 0, False: 0]
  |  Branch (1745:49): [True: 0, False: 0]
  |  Branch (1745:59): [True: 0, False: 0]
  ------------------
 1746|      0|                   TESTAFF(rv->astr, compoundmiddle, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1747|  2.57M|                  (!defcpdtable.empty() && onlycpdrule &&
  ------------------
  |  Branch (1747:20): [True: 0, False: 2.57M]
  |  Branch (1747:44): [True: 0, False: 0]
  ------------------
 1748|      0|                   ((!words && !wordnum &&
  ------------------
  |  Branch (1748:22): [True: 0, False: 0]
  |  Branch (1748:32): [True: 0, False: 0]
  ------------------
 1749|      0|                     defcpd_check(&words, wnum, maxwordnum, rv, rwords, 0)) ||
  ------------------
  |  Branch (1749:22): [True: 0, False: 0]
  ------------------
 1750|      0|                    (words &&
  ------------------
  |  Branch (1750:22): [True: 0, False: 0]
  ------------------
 1751|      0|                     defcpd_check(&words, wnum, maxwordnum, rv, rwords, 0))))) ||
  ------------------
  |  Branch (1751:22): [True: 0, False: 0]
  ------------------
 1752|    516|                (scpd != 0 && checkcpdtable[scpd - 1].cond != FLAG_NULL &&
  ------------------
  |  |   96|    516|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1752:18): [True: 0, False: 516]
  |  Branch (1752:31): [True: 0, False: 0]
  ------------------
 1753|  2.57M|                 !TESTAFF(rv->astr, checkcpdtable[scpd - 1].cond, rv->alen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1753:18): [True: 0, False: 0]
  ------------------
 1754|  2.57M|          rv = rv->next_homonym;
 1755|  2.57M|        }
 1756|       |
 1757|   466M|        if (rv)
  ------------------
  |  Branch (1757:13): [True: 941, False: 466M]
  ------------------
 1758|    941|          affixed = 0;
 1759|       |
 1760|   466M|        if (!rv) {
  ------------------
  |  Branch (1760:13): [True: 466M, False: 941]
  ------------------
 1761|   466M|          if (onlycpdrule)
  ------------------
  |  Branch (1761:15): [True: 0, False: 466M]
  ------------------
 1762|      0|            break;
 1763|   466M|          if (compoundflag &&
  ------------------
  |  Branch (1763:15): [True: 466M, False: 0]
  ------------------
 1764|   466M|              !(rv = prefix_check(st, 0, i,
  ------------------
  |  Branch (1764:15): [True: 466M, False: 0]
  ------------------
 1765|   466M|                                  hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN,
  ------------------
  |  |   75|  99.0k|#define IN_CPD_OTHER 3
  ------------------
                                                hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN,
  ------------------
  |  |   73|   933M|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1765:35): [True: 99.0k, False: 466M]
  ------------------
 1766|   466M|                                  scratch, compoundflag))) {
 1767|   466M|            if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|   466M|#define FLAG_NULL 0x00
  ------------------
                          if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|  99.0k|#define IN_CPD_OTHER 3
  ------------------
                          if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|   933M|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1767:18): [True: 0, False: 466M]
  |  Branch (1767:93): [True: 99.0k, False: 466M]
  ------------------
 1768|   466M|                 (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch, compoundflag)))) &&
  ------------------
  |  Branch (1768:19): [True: 0, False: 466M]
  |  Branch (1768:43): [True: 0, False: 0]
  ------------------
 1769|      0|                !hu_mov_rule && sfx->getCont() &&
  ------------------
  |  Branch (1769:17): [True: 0, False: 0]
  |  Branch (1769:33): [True: 0, False: 0]
  ------------------
 1770|      0|                ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, sfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1770:19): [True: 0, False: 0]
  ------------------
 1771|      0|                 (compoundend && TESTAFF(sfx->getCont(), compoundend, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1771:19): [True: 0, False: 0]
  ------------------
 1772|      0|              rv = nullptr;
 1773|      0|            }
 1774|   466M|          }
 1775|       |
 1776|   466M|          if (rv ||
  ------------------
  |  Branch (1776:15): [True: 0, False: 466M]
  ------------------
 1777|   466M|              (((wordnum == 0) && compoundbegin &&
  ------------------
  |  Branch (1777:17): [True: 466M, False: 99.8k]
  |  Branch (1777:35): [True: 0, False: 466M]
  ------------------
 1778|      0|                ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
                              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1778:18): [True: 0, False: 0]
  |  Branch (1778:94): [True: 0, False: 0]
  ------------------
 1779|      0|                 (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch,
  ------------------
  |  Branch (1779:19): [True: 0, False: 0]
  |  Branch (1779:43): [True: 0, False: 0]
  ------------------
 1780|      0|                                                                    compoundbegin))) ||  // twofold suffixes + compound
 1781|      0|                 (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundbegin)))) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                               (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundbegin)))) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1781:18): [True: 0, False: 0]
  |  Branch (1781:47): [True: 0, False: 0]
  ------------------
 1782|   466M|               ((wordnum > 0) && compoundmiddle &&
  ------------------
  |  Branch (1782:17): [True: 714, False: 466M]
  |  Branch (1782:34): [True: 0, False: 714]
  ------------------
 1783|      0|                ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
                              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1783:18): [True: 0, False: 0]
  |  Branch (1783:95): [True: 0, False: 0]
  ------------------
 1784|      0|                 (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch,
  ------------------
  |  Branch (1784:19): [True: 0, False: 0]
  |  Branch (1784:43): [True: 0, False: 0]
  ------------------
 1785|      0|                                                                    compoundmiddle))) ||  // twofold suffixes + compound
 1786|      0|                 (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundmiddle))))))
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                               (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundmiddle))))))
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (1786:18): [True: 0, False: 0]
  |  Branch (1786:47): [True: 0, False: 0]
  ------------------
 1787|      0|            checked_prefix = 1;
 1788|       |          // else check forbiddenwords and needaffix
 1789|   466M|        } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|  1.09k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 545]
  |  |  ------------------
  ------------------
  |  Branch (1789:20): [True: 545, False: 396]
  |  Branch (1789:20): [True: 0, False: 941]
  ------------------
 1790|    545|                                TESTAFF(rv->astr, needaffix, rv->alen) ||
  ------------------
  |  |   99|  1.09k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 545]
  |  |  ------------------
  ------------------
 1791|    545|                                TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|  1.09k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 545]
  |  |  ------------------
  ------------------
 1792|    545|                                (is_sug && nosuggest &&
  ------------------
  |  Branch (1792:34): [True: 0, False: 545]
  |  Branch (1792:44): [True: 0, False: 0]
  ------------------
 1793|      0|                                 TESTAFF(rv->astr, nosuggest, rv->alen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1794|      0|          st[i] = ch;
 1795|       |          // continue;
 1796|      0|          break;
 1797|      0|        }
 1798|       |
 1799|       |        // check non_compound flag in suffix and prefix
 1800|   466M|        if ((rv) && !hu_mov_rule &&
  ------------------
  |  Branch (1800:13): [True: 941, False: 466M]
  |  Branch (1800:21): [True: 516, False: 425]
  ------------------
 1801|    516|            ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (1801:15): [True: 0, False: 516]
  |  Branch (1801:22): [True: 0, False: 0]
  ------------------
 1802|      0|              TESTAFF(pfx->getCont(), compoundforbidflag, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1803|    516|             (sfx && sfx->getCont() &&
  ------------------
  |  Branch (1803:15): [True: 0, False: 516]
  |  Branch (1803:22): [True: 0, False: 0]
  ------------------
 1804|      0|              TESTAFF(sfx->getCont(), compoundforbidflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1805|    516|                      sfx->getContLen())))) {
 1806|      0|          rv = nullptr;
 1807|      0|        }
 1808|       |
 1809|       |        // check compoundend flag in suffix and prefix
 1810|   466M|        if ((rv) && !checked_prefix && compoundend && !hu_mov_rule &&
  ------------------
  |  Branch (1810:13): [True: 941, False: 466M]
  |  Branch (1810:21): [True: 941, False: 0]
  |  Branch (1810:40): [True: 0, False: 941]
  |  Branch (1810:55): [True: 0, False: 0]
  ------------------
 1811|      0|            ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (1811:15): [True: 0, False: 0]
  |  Branch (1811:22): [True: 0, False: 0]
  ------------------
 1812|      0|              TESTAFF(pfx->getCont(), compoundend, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1813|      0|             (sfx && sfx->getCont() &&
  ------------------
  |  Branch (1813:15): [True: 0, False: 0]
  |  Branch (1813:22): [True: 0, False: 0]
  ------------------
 1814|      0|              TESTAFF(sfx->getCont(), compoundend, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1815|      0|          rv = nullptr;
 1816|      0|        }
 1817|       |
 1818|       |        // check compoundmiddle flag in suffix and prefix
 1819|   466M|        if ((rv) && !checked_prefix && (wordnum == 0) && compoundmiddle &&
  ------------------
  |  Branch (1819:13): [True: 941, False: 466M]
  |  Branch (1819:21): [True: 941, False: 0]
  |  Branch (1819:40): [True: 516, False: 425]
  |  Branch (1819:58): [True: 0, False: 516]
  ------------------
 1820|      0|            !hu_mov_rule &&
  ------------------
  |  Branch (1820:13): [True: 0, False: 0]
  ------------------
 1821|      0|            ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (1821:15): [True: 0, False: 0]
  |  Branch (1821:22): [True: 0, False: 0]
  ------------------
 1822|      0|              TESTAFF(pfx->getCont(), compoundmiddle, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1823|      0|             (sfx && sfx->getCont() &&
  ------------------
  |  Branch (1823:15): [True: 0, False: 0]
  |  Branch (1823:22): [True: 0, False: 0]
  ------------------
 1824|      0|              TESTAFF(sfx->getCont(), compoundmiddle, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1825|      0|          rv = nullptr;
 1826|      0|        }
 1827|       |
 1828|       |        // check forbiddenwords
 1829|   466M|        if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (1829:13): [True: 941, False: 466M]
  |  Branch (1829:13): [True: 0, False: 466M]
  |  Branch (1829:21): [True: 545, False: 396]
  ------------------
 1830|    545|            (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|  1.09k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 545]
  |  |  ------------------
  ------------------
 1831|    545|             TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|  1.09k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 545]
  |  |  ------------------
  ------------------
 1832|    545|             (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1832:15): [True: 0, False: 545]
  |  Branch (1832:25): [True: 0, False: 0]
  ------------------
 1833|      0|          return nullptr;
 1834|      0|        }
 1835|       |
 1836|       |        // increment word number, if the second root has a compoundroot flag
 1837|   466M|        if ((rv) && compoundroot &&
  ------------------
  |  Branch (1837:13): [True: 941, False: 466M]
  |  Branch (1837:21): [True: 0, False: 941]
  ------------------
 1838|      0|            (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1838:13): [True: 0, False: 0]
  ------------------
 1839|      0|          wordnum++;
 1840|      0|        }
 1841|       |
 1842|       |        // first word is acceptable in compound words?
 1843|   466M|        if (((rv) &&
  ------------------
  |  Branch (1843:13): [True: 545, False: 466M]
  |  Branch (1843:14): [True: 941, False: 466M]
  ------------------
 1844|    941|             (checked_prefix || (words && words[wnum]) ||
  ------------------
  |  Branch (1844:15): [True: 0, False: 941]
  |  Branch (1844:34): [True: 0, False: 941]
  |  Branch (1844:43): [True: 0, False: 0]
  ------------------
 1845|    941|              (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|    941|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 545, False: 396]
  |  |  ------------------
  ------------------
  |  Branch (1845:16): [True: 941, False: 0]
  ------------------
 1846|    396|              ((oldwordnum == 0) && compoundbegin &&
  ------------------
  |  Branch (1846:16): [True: 0, False: 396]
  |  Branch (1846:37): [True: 0, False: 0]
  ------------------
 1847|      0|               TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1848|    396|              ((oldwordnum > 0) && compoundmiddle &&
  ------------------
  |  Branch (1848:16): [True: 0, False: 396]
  |  Branch (1848:36): [True: 0, False: 0]
  ------------------
 1849|      0|               TESTAFF(rv->astr, compoundmiddle, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1850|       |
 1851|       |              // LANG_hu section: spec. Hungarian rule
 1852|    396|              || ((langnum == LANG_hu) && hu_mov_rule &&
  ------------------
  |  Branch (1852:19): [True: 396, False: 0]
  |  Branch (1852:43): [True: 396, False: 0]
  ------------------
 1853|    396|                  (TESTAFF(
  ------------------
  |  |   99|    792|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 396]
  |  |  ------------------
  ------------------
 1854|    396|                       rv->astr, 'F',
 1855|    396|                       rv->alen) ||  // XXX hardwired Hungarian dictionary codes
 1856|    396|                   TESTAFF(rv->astr, 'G', rv->alen) ||
  ------------------
  |  |   99|    792|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 396]
  |  |  ------------------
  ------------------
 1857|    396|                   TESTAFF(rv->astr, 'H', rv->alen)))
  ------------------
  |  |   99|    396|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 396]
  |  |  ------------------
  ------------------
 1858|       |              // END of LANG_hu section
 1859|    941|              ) &&
 1860|    545|             (
 1861|       |                 // test CHECKCOMPOUNDPATTERN conditions
 1862|    545|                 scpd == 0 || checkcpdtable[scpd - 1].cond == FLAG_NULL ||
  ------------------
  |  |   96|    545|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1862:18): [True: 545, False: 0]
  |  Branch (1862:31): [True: 0, False: 0]
  ------------------
 1863|      0|                 TESTAFF(rv->astr, checkcpdtable[scpd - 1].cond, rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1864|    545|             !((checkcompoundtriple && scpd == 0 &&
  ------------------
  |  Branch (1864:17): [True: 0, False: 545]
  |  Branch (1864:40): [True: 0, False: 0]
  ------------------
 1865|      0|                !words && i < word.size() && // test triple letters
  ------------------
  |  Branch (1865:17): [True: 0, False: 0]
  |  Branch (1865:27): [True: 0, False: 0]
  ------------------
 1866|      0|                (word[i - 1] == word[i]) &&
  ------------------
  |  Branch (1866:17): [True: 0, False: 0]
  ------------------
 1867|      0|                (((i > 1) && (word[i - 1] == word[i - 2])) ||
  ------------------
  |  Branch (1867:19): [True: 0, False: 0]
  |  Branch (1867:30): [True: 0, False: 0]
  ------------------
 1868|      0|                 ((word[i - 1] == word[i + 1]))  // may be word[i+1] == '\0'
  ------------------
  |  Branch (1868:18): [True: 0, False: 0]
  ------------------
 1869|      0|                 )) ||
 1870|    545|               (checkcompoundcase && scpd == 0 && !words && i < word.size() &&
  ------------------
  |  Branch (1870:17): [True: 0, False: 545]
  |  Branch (1870:38): [True: 0, False: 0]
  |  Branch (1870:51): [True: 0, False: 0]
  |  Branch (1870:61): [True: 0, False: 0]
  ------------------
 1871|      0|                cpdcase_check(word, i))))
  ------------------
  |  Branch (1871:17): [True: 0, False: 0]
  ------------------
 1872|       |            // LANG_hu section: spec. Hungarian rule
 1873|   466M|            || ((!rv) && (langnum == LANG_hu) && hu_mov_rule &&
  ------------------
  |  Branch (1873:17): [True: 466M, False: 396]
  |  Branch (1873:26): [True: 35.3M, False: 431M]
  |  Branch (1873:50): [True: 99.0k, False: 35.2M]
  ------------------
 1874|  99.0k|                (rv = affix_check(st, 0, i, scratch)) &&
  ------------------
  |  Branch (1874:17): [True: 0, False: 99.0k]
  ------------------
 1875|      0|                (sfx && sfx->getCont() &&
  ------------------
  |  Branch (1875:18): [True: 0, False: 0]
  |  Branch (1875:25): [True: 0, False: 0]
  ------------------
 1876|      0|                 (  // XXX hardwired Hungarian dic. codes
 1877|      0|                     TESTAFF(sfx->getCont(), (unsigned short)'x',
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1878|      0|                             sfx->getContLen()) ||
 1879|      0|                     TESTAFF(
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1880|      0|                         sfx->getCont(), (unsigned short)'%',
 1881|    545|                         sfx->getContLen()))))) {  // first word is ok condition
 1882|       |
 1883|       |          // LANG_hu section: spec. Hungarian rule
 1884|    545|          if (langnum == LANG_hu) {
  ------------------
  |  Branch (1884:15): [True: 221, False: 324]
  ------------------
 1885|       |            // calculate syllable number of the word
 1886|    221|            numsyllable += get_syllable(st.substr(0, i));
 1887|       |            // + 1 word, if syllable number of the prefix > 1 (hungarian
 1888|       |            // convention)
 1889|    221|            if (pfx && (get_syllable(pfx->getKey()) > 1))
  ------------------
  |  Branch (1889:17): [True: 0, False: 221]
  |  Branch (1889:17): [True: 0, False: 221]
  |  Branch (1889:24): [True: 0, False: 0]
  ------------------
 1890|      0|              wordnum++;
 1891|    221|          }
 1892|       |          // END of LANG_hu section
 1893|       |
 1894|       |          // NEXT WORD(S)
 1895|    545|          rv_first = rv;
 1896|    545|          st[i] = ch;
 1897|       |
 1898|    545|          do {  // striple loop
 1899|       |
 1900|       |            // check simplifiedtriple
 1901|    545|            if (simplifiedtriple) {
  ------------------
  |  Branch (1901:17): [True: 0, False: 545]
  ------------------
 1902|      0|              if (striple) {
  ------------------
  |  Branch (1902:19): [True: 0, False: 0]
  ------------------
 1903|      0|                checkedstriple = 1;
 1904|      0|                i--;  // check "fahrt" instead of "ahrt" in "Schiffahrt"
 1905|      0|              } else if (i > 2 && i <= word.size() && word[i - 1] == word[i - 2])
  ------------------
  |  Branch (1905:26): [True: 0, False: 0]
  |  Branch (1905:35): [True: 0, False: 0]
  |  Branch (1905:55): [True: 0, False: 0]
  ------------------
 1906|      0|                striple = 1;
 1907|      0|            }
 1908|       |
 1909|    545|            rv = lookup(st.c_str() + i, st.size() - i);  // perhaps without prefix
 1910|       |
 1911|       |            // search homonym with compound flag
 1912|    545|            while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1912:20): [True: 0, False: 545]
  |  Branch (1912:30): [True: 0, False: 0]
  ------------------
 1913|      0|                            !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1913:32): [True: 0, False: 0]
  |  Branch (1913:48): [True: 0, False: 0]
  ------------------
 1914|      0|                              (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1914:32): [True: 0, False: 0]
  |  Branch (1914:47): [True: 0, False: 0]
  ------------------
 1915|      0|                              (!defcpdtable.empty() && words && defcpd_check(&words, wnum + 1, maxwordnum, rv, nullptr, 1))) ||
  ------------------
  |  Branch (1915:32): [True: 0, False: 0]
  |  Branch (1915:56): [True: 0, False: 0]
  |  Branch (1915:65): [True: 0, False: 0]
  ------------------
 1916|      0|                            (scpd != 0 && checkcpdtable[scpd - 1].cond2 != FLAG_NULL &&
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1916:30): [True: 0, False: 0]
  |  Branch (1916:43): [True: 0, False: 0]
  ------------------
 1917|      0|                             !TESTAFF(rv->astr, checkcpdtable[scpd - 1].cond2, rv->alen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1917:30): [True: 0, False: 0]
  ------------------
 1918|      0|              rv = rv->next_homonym;
 1919|      0|            }
 1920|       |
 1921|       |            // check FORCEUCASE
 1922|    545|            if (rv && forceucase &&
  ------------------
  |  Branch (1922:17): [True: 0, False: 545]
  |  Branch (1922:23): [True: 0, False: 0]
  ------------------
 1923|      0|                (TESTAFF(rv->astr, forceucase, rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1923:17): [True: 0, False: 0]
  ------------------
 1924|      0|                !(info && *info & SPELL_ORIGCAP))
  ------------------
  |  |   83|      0|#define SPELL_ORIGCAP (1 << 5)
  ------------------
  |  Branch (1924:19): [True: 0, False: 0]
  |  Branch (1924:27): [True: 0, False: 0]
  ------------------
 1925|      0|              rv = nullptr;
 1926|       |
 1927|    545|            if (rv && words && words[wnum + 1])
  ------------------
  |  Branch (1927:17): [True: 0, False: 545]
  |  Branch (1927:23): [True: 0, False: 0]
  |  Branch (1927:32): [True: 0, False: 0]
  ------------------
 1928|      0|              return rv_first;
 1929|       |
 1930|    545|            oldnumsyllable2 = numsyllable;
 1931|    545|            oldwordnum2 = wordnum;
 1932|       |
 1933|       |            // LANG_hu section: spec. Hungarian rule, XXX hardwired dictionary
 1934|       |            // code
 1935|    545|            if ((rv) && (langnum == LANG_hu) &&
  ------------------
  |  Branch (1935:17): [True: 0, False: 545]
  |  Branch (1935:17): [True: 0, False: 545]
  |  Branch (1935:25): [True: 0, False: 0]
  ------------------
 1936|      0|                (TESTAFF(rv->astr, 'I', rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1936:17): [True: 0, False: 0]
  ------------------
 1937|      0|                !(TESTAFF(rv->astr, 'J', rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1937:17): [True: 0, False: 0]
  ------------------
 1938|      0|              numsyllable--;
 1939|      0|            }
 1940|       |            // END of LANG_hu section
 1941|       |
 1942|       |            // increment word number, if the second root has a compoundroot flag
 1943|    545|            if ((rv) && (compoundroot) &&
  ------------------
  |  Branch (1943:17): [True: 0, False: 545]
  |  Branch (1943:25): [True: 0, False: 0]
  ------------------
 1944|      0|                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (1944:17): [True: 0, False: 0]
  ------------------
 1945|      0|              wordnum++;
 1946|      0|            }
 1947|       |
 1948|       |            // check forbiddenwords
 1949|    545|            if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (1949:17): [True: 0, False: 545]
  |  Branch (1949:17): [True: 0, False: 545]
  |  Branch (1949:25): [True: 0, False: 0]
  ------------------
 1950|      0|                (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1951|      0|                 TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1952|      0|                 (is_sug && nosuggest &&
  ------------------
  |  Branch (1952:19): [True: 0, False: 0]
  |  Branch (1952:29): [True: 0, False: 0]
  ------------------
 1953|      0|                  TESTAFF(rv->astr, nosuggest, rv->alen))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1954|      0|              return nullptr;
 1955|       |
 1956|       |            // second word is acceptable, as a root?
 1957|       |            // hungarian conventions: compounding is acceptable,
 1958|       |            // when compound forms consist of 2 words, or if more,
 1959|       |            // then the syllable number of root words must be 6, or lesser.
 1960|       |
 1961|    545|            if ((rv) &&
  ------------------
  |  Branch (1961:17): [True: 0, False: 545]
  |  Branch (1961:17): [True: 0, False: 545]
  ------------------
 1962|      0|                ((compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1962:19): [True: 0, False: 0]
  ------------------
 1963|      0|                 (compoundend && TESTAFF(rv->astr, compoundend, rv->alen))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (1963:19): [True: 0, False: 0]
  ------------------
 1964|      0|                (((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) ||
  ------------------
  |  Branch (1964:19): [True: 0, False: 0]
  |  Branch (1964:41): [True: 0, False: 0]
  ------------------
 1965|      0|                 ((cpdmaxsyllable != 0) &&
  ------------------
  |  Branch (1965:19): [True: 0, False: 0]
  ------------------
 1966|      0|                  (numsyllable + get_syllable(std::string(HENTRY_WORD(rv), rv->blen)) <=
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  |  Branch (1966:19): [True: 0, False: 0]
  ------------------
 1967|      0|                   cpdmaxsyllable))) &&
 1968|      0|                (
 1969|       |                    // test CHECKCOMPOUNDPATTERN
 1970|      0|                    checkcpdtable.empty() || scpd != 0 ||
  ------------------
  |  Branch (1970:21): [True: 0, False: 0]
  |  Branch (1970:46): [True: 0, False: 0]
  ------------------
 1971|      0|                    (i < word.size() && !cpdpat_check(word, i, rv_first, rv, 0))) &&
  ------------------
  |  Branch (1971:22): [True: 0, False: 0]
  |  Branch (1971:41): [True: 0, False: 0]
  ------------------
 1972|      0|                ((!checkcompounddup || (rv != rv_first)))
  ------------------
  |  Branch (1972:19): [True: 0, False: 0]
  |  Branch (1972:40): [True: 0, False: 0]
  ------------------
 1973|       |                // test CHECKCOMPOUNDPATTERN conditions
 1974|      0|                &&
 1975|      0|                (scpd == 0 || checkcpdtable[scpd - 1].cond2 == FLAG_NULL ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1975:18): [True: 0, False: 0]
  |  Branch (1975:31): [True: 0, False: 0]
  ------------------
 1976|      0|                 TESTAFF(rv->astr, checkcpdtable[scpd - 1].cond2, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1977|       |              // forbid compound word, if it is a non-compound word with typical
 1978|       |              // fault
 1979|      0|              if ((checkcompoundrep && cpdrep_check(word, len, scratch, timelimit_exceeded, clock_time_start)) ||
  ------------------
  |  Branch (1979:20): [True: 0, False: 0]
  |  Branch (1979:40): [True: 0, False: 0]
  ------------------
 1980|      0|                  cpdwordpair_check(word, len, scratch, timelimit_exceeded, clock_time_start))
  ------------------
  |  Branch (1980:19): [True: 0, False: 0]
  ------------------
 1981|      0|                return nullptr;
 1982|      0|              return rv_first;
 1983|      0|            }
 1984|       |
 1985|    545|            numsyllable = oldnumsyllable2;
 1986|    545|            wordnum = oldwordnum2;
 1987|       |
 1988|       |            // perhaps second word has prefix or/and suffix
 1989|    545|            sfx = nullptr;
 1990|    545|            sfxflag = FLAG_NULL;
  ------------------
  |  |   96|    545|#define FLAG_NULL 0x00
  ------------------
 1991|    545|            rv = (compoundflag && !onlycpdrule && i < word.size()) ? affix_check(word, i, word.size() - i, scratch, compoundflag, IN_CPD_END)
  ------------------
  |  |   74|    545|#define IN_CPD_END 2
  ------------------
  |  Branch (1991:19): [True: 545, False: 0]
  |  Branch (1991:35): [True: 545, False: 0]
  |  Branch (1991:51): [True: 545, False: 0]
  ------------------
 1992|    545|                                                                   : nullptr;
 1993|    545|            if (!rv && compoundend && !onlycpdrule) {
  ------------------
  |  Branch (1993:17): [True: 545, False: 0]
  |  Branch (1993:24): [True: 0, False: 545]
  |  Branch (1993:39): [True: 0, False: 0]
  ------------------
 1994|      0|              sfx = nullptr;
 1995|      0|              pfx = nullptr;
 1996|      0|              if (i < word.size())
  ------------------
  |  Branch (1996:19): [True: 0, False: 0]
  ------------------
 1997|      0|                rv = affix_check(word, i, word.size() - i, scratch, compoundend, IN_CPD_END);
  ------------------
  |  |   74|      0|#define IN_CPD_END 2
  ------------------
 1998|      0|            }
 1999|       |
 2000|    545|            if (!rv && !defcpdtable.empty() && words) {
  ------------------
  |  Branch (2000:17): [True: 545, False: 0]
  |  Branch (2000:24): [True: 0, False: 545]
  |  Branch (2000:48): [True: 0, False: 0]
  ------------------
 2001|      0|              if (i < word.size())
  ------------------
  |  Branch (2001:19): [True: 0, False: 0]
  ------------------
 2002|      0|                rv = affix_check(word, i, word.size() - i, scratch, 0, IN_CPD_END);
  ------------------
  |  |   74|      0|#define IN_CPD_END 2
  ------------------
 2003|      0|              if (rv && defcpd_check(&words, wnum + 1, maxwordnum, rv, nullptr, 1))
  ------------------
  |  Branch (2003:19): [True: 0, False: 0]
  |  Branch (2003:25): [True: 0, False: 0]
  ------------------
 2004|      0|                return rv_first;
 2005|      0|              rv = nullptr;
 2006|      0|            }
 2007|       |
 2008|       |            // test CHECKCOMPOUNDPATTERN conditions (allowed forms)
 2009|    545|            if (rv &&
  ------------------
  |  Branch (2009:17): [True: 0, False: 545]
  ------------------
 2010|      0|                !(scpd == 0 || checkcpdtable[scpd - 1].cond2 == FLAG_NULL ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
  |  Branch (2010:19): [True: 0, False: 0]
  |  Branch (2010:32): [True: 0, False: 0]
  ------------------
 2011|      0|                  TESTAFF(rv->astr, checkcpdtable[scpd - 1].cond2, rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2012|      0|              rv = nullptr;
 2013|       |
 2014|       |            // test CHECKCOMPOUNDPATTERN conditions (forbidden compounds)
 2015|    545|            if (rv && !checkcpdtable.empty() && scpd == 0 &&
  ------------------
  |  Branch (2015:17): [True: 0, False: 545]
  |  Branch (2015:23): [True: 0, False: 0]
  |  Branch (2015:49): [True: 0, False: 0]
  ------------------
 2016|      0|                cpdpat_check(word, i, rv_first, rv, affixed))
  ------------------
  |  Branch (2016:17): [True: 0, False: 0]
  ------------------
 2017|      0|              rv = nullptr;
 2018|       |
 2019|       |            // check non_compound flag in suffix and prefix
 2020|    545|            if ((rv) && ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (2020:17): [True: 0, False: 545]
  |  Branch (2020:27): [True: 0, False: 0]
  |  Branch (2020:34): [True: 0, False: 0]
  ------------------
 2021|      0|                          TESTAFF(pfx->getCont(), compoundforbidflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2022|      0|                                  pfx->getContLen())) ||
 2023|      0|                         (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2023:27): [True: 0, False: 0]
  |  Branch (2023:34): [True: 0, False: 0]
  ------------------
 2024|      0|                          TESTAFF(sfx->getCont(), compoundforbidflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2025|      0|                                  sfx->getContLen())))) {
 2026|      0|              rv = nullptr;
 2027|      0|            }
 2028|       |
 2029|       |            // check FORCEUCASE
 2030|    545|            if (rv && forceucase &&
  ------------------
  |  Branch (2030:17): [True: 0, False: 545]
  |  Branch (2030:23): [True: 0, False: 0]
  ------------------
 2031|      0|                (TESTAFF(rv->astr, forceucase, rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2031:17): [True: 0, False: 0]
  ------------------
 2032|      0|                !(info && *info & SPELL_ORIGCAP))
  ------------------
  |  |   83|      0|#define SPELL_ORIGCAP (1 << 5)
  ------------------
  |  Branch (2032:19): [True: 0, False: 0]
  |  Branch (2032:27): [True: 0, False: 0]
  ------------------
 2033|      0|              rv = nullptr;
 2034|       |
 2035|       |            // check forbiddenwords
 2036|    545|            if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (2036:17): [True: 0, False: 545]
  |  Branch (2036:17): [True: 0, False: 545]
  |  Branch (2036:25): [True: 0, False: 0]
  ------------------
 2037|      0|                (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2038|      0|                 TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2039|      0|                 (is_sug && nosuggest &&
  ------------------
  |  Branch (2039:19): [True: 0, False: 0]
  |  Branch (2039:29): [True: 0, False: 0]
  ------------------
 2040|      0|                  TESTAFF(rv->astr, nosuggest, rv->alen))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2041|      0|              return nullptr;
 2042|       |
 2043|       |            // pfxappnd = prefix of word+i, or NULL
 2044|       |            // calculate syllable number of prefix.
 2045|       |            // hungarian convention: when syllable number of prefix is more,
 2046|       |            // than 1, the prefix+word counts as two words.
 2047|       |
 2048|    545|            if (langnum == LANG_hu) {
  ------------------
  |  Branch (2048:17): [True: 221, False: 324]
  ------------------
 2049|    221|              if (i < word.size()) {
  ------------------
  |  Branch (2049:19): [True: 221, False: 0]
  ------------------
 2050|       |                // calculate syllable number of the word
 2051|    221|                numsyllable += get_syllable(word.substr(i));
 2052|    221|              }
 2053|       |
 2054|       |              // - affix syllable num.
 2055|       |              // XXX only second suffix (inflections, not derivations)
 2056|    221|              if (sfxappnd) {
  ------------------
  |  Branch (2056:19): [True: 0, False: 221]
  ------------------
 2057|      0|                std::string tmp(sfxappnd);
 2058|      0|                reverseword(tmp);
 2059|      0|                numsyllable -= short(get_syllable(tmp) + sfxextra);
 2060|    221|              } else {
 2061|    221|                numsyllable -= short(sfxextra);
 2062|    221|              }
 2063|       |
 2064|       |              // + 1 word, if syllable number of the prefix > 1 (hungarian
 2065|       |              // convention)
 2066|    221|              if (pfx && (get_syllable(pfx->getKey()) > 1))
  ------------------
  |  Branch (2066:19): [True: 0, False: 221]
  |  Branch (2066:19): [True: 0, False: 221]
  |  Branch (2066:26): [True: 0, False: 0]
  ------------------
 2067|      0|                wordnum++;
 2068|       |
 2069|       |              // increment syllable num, if last word has a SYLLABLENUM flag
 2070|       |              // and the suffix is beginning `s'
 2071|       |
 2072|    221|              if (!cpdsyllablenum.empty()) {
  ------------------
  |  Branch (2072:19): [True: 0, False: 221]
  ------------------
 2073|      0|                switch (sfxflag) {
  ------------------
  |  Branch (2073:25): [True: 0, False: 0]
  ------------------
 2074|      0|                  case 'c': {
  ------------------
  |  Branch (2074:19): [True: 0, False: 0]
  ------------------
 2075|      0|                    numsyllable += 2;
 2076|      0|                    break;
 2077|      0|                  }
 2078|      0|                  case 'J': {
  ------------------
  |  Branch (2078:19): [True: 0, False: 0]
  ------------------
 2079|      0|                    numsyllable += 1;
 2080|      0|                    break;
 2081|      0|                  }
 2082|      0|                  case 'I': {
  ------------------
  |  Branch (2082:19): [True: 0, False: 0]
  ------------------
 2083|      0|                    if (rv && TESTAFF(rv->astr, 'J', rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2083:25): [True: 0, False: 0]
  |  Branch (2083:25): [True: 0, False: 0]
  ------------------
 2084|      0|                      numsyllable += 1;
 2085|      0|                    break;
 2086|      0|                  }
 2087|      0|                }
 2088|      0|              }
 2089|    221|            }
 2090|       |
 2091|       |            // increment word number, if the second word has a compoundroot flag
 2092|    545|            if ((rv) && (compoundroot) &&
  ------------------
  |  Branch (2092:17): [True: 0, False: 545]
  |  Branch (2092:25): [True: 0, False: 0]
  ------------------
 2093|      0|                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2093:17): [True: 0, False: 0]
  ------------------
 2094|      0|              wordnum++;
 2095|      0|            }
 2096|       |            // second word is acceptable, as a word with prefix or/and suffix?
 2097|       |            // hungarian conventions: compounding is acceptable,
 2098|       |            // when compound forms consist 2 word, otherwise
 2099|       |            // the syllable number of root words is 6, or lesser.
 2100|    545|            if ((rv) &&
  ------------------
  |  Branch (2100:17): [True: 0, False: 545]
  ------------------
 2101|      0|                (((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) ||
  ------------------
  |  Branch (2101:19): [True: 0, False: 0]
  |  Branch (2101:41): [True: 0, False: 0]
  ------------------
 2102|      0|                 ((cpdmaxsyllable != 0) && (numsyllable <= cpdmaxsyllable))) &&
  ------------------
  |  Branch (2102:19): [True: 0, False: 0]
  |  Branch (2102:44): [True: 0, False: 0]
  ------------------
 2103|      0|                ((!checkcompounddup || (rv != rv_first)))) {
  ------------------
  |  Branch (2103:19): [True: 0, False: 0]
  |  Branch (2103:40): [True: 0, False: 0]
  ------------------
 2104|       |              // forbid compound word, if it is a non-compound word with typical
 2105|       |              // fault
 2106|      0|              if ((checkcompoundrep && cpdrep_check(word, len, scratch, timelimit_exceeded, clock_time_start)) ||
  ------------------
  |  Branch (2106:20): [True: 0, False: 0]
  |  Branch (2106:40): [True: 0, False: 0]
  ------------------
 2107|      0|                  cpdwordpair_check(word, len, scratch, timelimit_exceeded, clock_time_start))
  ------------------
  |  Branch (2107:19): [True: 0, False: 0]
  ------------------
 2108|      0|                return nullptr;
 2109|      0|              return rv_first;
 2110|      0|            }
 2111|       |
 2112|    545|            numsyllable = oldnumsyllable2;
 2113|    545|            wordnum = oldwordnum2;
 2114|       |
 2115|       |            // perhaps second word is a compound word (recursive call)
 2116|       |            // (only if SPELL_COMPOUND_2 is not set and maxwordnum is not exceeded)
 2117|    545|            if ((!info || !(*info & SPELL_COMPOUND_2)) && wordnum + 2 < maxwordnum && wnum + 1 < maxwordnum) {
  ------------------
  |  |   85|    545|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  |  Branch (2117:18): [True: 0, False: 545]
  |  Branch (2117:27): [True: 287, False: 258]
  |  Branch (2117:59): [True: 287, False: 0]
  |  Branch (2117:87): [True: 287, False: 0]
  ------------------
 2118|    287|              rv = compound_check(st.substr(i), wordnum + 1,
 2119|    287|                                  numsyllable, maxwordnum, wnum + 1, words, rwords, 0,
 2120|    287|                                  is_sug, info, scratch);
 2121|       |
 2122|    287|              if (rv && !checkcpdtable.empty() && i < word.size() &&
  ------------------
  |  Branch (2122:19): [True: 0, False: 287]
  |  Branch (2122:25): [True: 0, False: 0]
  |  Branch (2122:51): [True: 0, False: 0]
  ------------------
 2123|      0|                  ((scpd == 0 &&
  ------------------
  |  Branch (2123:21): [True: 0, False: 0]
  ------------------
 2124|      0|                    cpdpat_check(word, i, rv_first, rv, affixed)) ||
  ------------------
  |  Branch (2124:21): [True: 0, False: 0]
  ------------------
 2125|      0|                   (scpd != 0 &&
  ------------------
  |  Branch (2125:21): [True: 0, False: 0]
  ------------------
 2126|      0|                    !cpdpat_check(word, i, rv_first, rv, affixed))))
  ------------------
  |  Branch (2126:21): [True: 0, False: 0]
  ------------------
 2127|      0|                rv = nullptr;
 2128|    287|            } else {
 2129|    258|              rv = nullptr;
 2130|    258|            }
 2131|    545|            if (rv) {
  ------------------
  |  Branch (2131:17): [True: 0, False: 545]
  ------------------
 2132|       |              // forbid compound word, if it is a non-compound word with typical
 2133|       |              // fault, or a dictionary word pair
 2134|       |
 2135|      0|              if (cpdwordpair_check(word, len, scratch, timelimit_exceeded, clock_time_start))
  ------------------
  |  Branch (2135:19): [True: 0, False: 0]
  ------------------
 2136|      0|                return nullptr;
 2137|       |
 2138|      0|              if (checkcompoundrep || forbiddenword) {
  ------------------
  |  Branch (2138:19): [True: 0, False: 0]
  |  Branch (2138:39): [True: 0, False: 0]
  ------------------
 2139|      0|                if (checkcompoundrep && cpdrep_check(word, len, scratch, timelimit_exceeded, clock_time_start))
  ------------------
  |  Branch (2139:21): [True: 0, False: 0]
  |  Branch (2139:41): [True: 0, False: 0]
  ------------------
 2140|      0|                  return nullptr;
 2141|       |
 2142|       |                // check first part
 2143|      0|                if (i < word.size() && word.compare(i, rv->blen, rv->word, rv->blen) == 0) {
  ------------------
  |  Branch (2143:21): [True: 0, False: 0]
  |  Branch (2143:40): [True: 0, False: 0]
  ------------------
 2144|      0|                  char r = st[i + rv->blen];
 2145|      0|                  st[i + rv->blen] = '\0';
 2146|       |
 2147|      0|                  if ((checkcompoundrep && cpdrep_check(st, i + rv->blen, scratch, timelimit_exceeded, clock_time_start)) ||
  ------------------
  |  Branch (2147:24): [True: 0, False: 0]
  |  Branch (2147:44): [True: 0, False: 0]
  ------------------
 2148|      0|                      cpdwordpair_check(st, i + rv->blen, scratch, timelimit_exceeded, clock_time_start)) {
  ------------------
  |  Branch (2148:23): [True: 0, False: 0]
  ------------------
 2149|      0|                    st[ + i + rv->blen] = r;
 2150|      0|                    continue;
 2151|      0|                  }
 2152|       |
 2153|      0|                  if (forbiddenword) {
  ------------------
  |  Branch (2153:23): [True: 0, False: 0]
  ------------------
 2154|      0|                    struct hentry* rv2 = lookup(word.c_str(), word.size());
 2155|      0|                    if (!rv2 && len <= word.size())
  ------------------
  |  Branch (2155:25): [True: 0, False: 0]
  |  Branch (2155:33): [True: 0, False: 0]
  ------------------
 2156|      0|                      rv2 = affix_check(word, 0, len, scratch);
 2157|      0|                    if (rv2 && rv2->astr &&
  ------------------
  |  Branch (2157:25): [True: 0, False: 0]
  |  Branch (2157:32): [True: 0, False: 0]
  ------------------
 2158|      0|                        TESTAFF(rv2->astr, forbiddenword, rv2->alen) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2159|      0|                        (strncmp(rv2->word, st.c_str(), i + rv->blen) == 0)) {
  ------------------
  |  Branch (2159:25): [True: 0, False: 0]
  ------------------
 2160|      0|                      return nullptr;
 2161|      0|                    }
 2162|      0|                  }
 2163|      0|                  st[i + rv->blen] = r;
 2164|      0|                }
 2165|      0|              }
 2166|      0|              return rv_first;
 2167|      0|            }
 2168|    545|          } while (striple && !checkedstriple);  // end of striple loop
  ------------------
  |  Branch (2168:20): [True: 0, False: 545]
  |  Branch (2168:31): [True: 0, False: 0]
  ------------------
 2169|       |
 2170|    545|          if (checkedstriple) {
  ------------------
  |  Branch (2170:15): [True: 0, False: 545]
  ------------------
 2171|      0|            i++;
 2172|      0|            checkedstriple = 0;
 2173|      0|            striple = 0;
 2174|      0|          }
 2175|       |
 2176|    545|        }  // first word is ok condition
 2177|       |
 2178|   466M|        if (soldi != 0) {
  ------------------
  |  Branch (2178:13): [True: 0, False: 466M]
  ------------------
 2179|      0|          i = soldi;
 2180|      0|          soldi = 0;
 2181|      0|          len = oldlen;
 2182|      0|          cmin = oldcmin;
 2183|      0|          cmax = oldcmax;
 2184|      0|        }
 2185|   466M|        scpd++;
 2186|       |
 2187|   466M|      } while (!onlycpdrule && simplifiedcpd &&
  ------------------
  |  Branch (2187:16): [True: 466M, False: 0]
  |  Branch (2187:32): [True: 0, False: 466M]
  ------------------
 2188|      0|               scpd <= checkcpdtable.size());  // end of simplifiedcpd loop
  ------------------
  |  Branch (2188:16): [True: 0, False: 0]
  ------------------
 2189|       |
 2190|   466M|      scpd = 0;
 2191|   466M|      wordnum = oldwordnum;
 2192|   466M|      numsyllable = oldnumsyllable;
 2193|       |
 2194|   466M|      if (soldi != 0) {
  ------------------
  |  Branch (2194:11): [True: 0, False: 466M]
  ------------------
 2195|      0|        i = soldi;
 2196|      0|        st.assign(word);  // XXX add more optim.
 2197|      0|        soldi = 0;
 2198|      0|        len = oldlen;
 2199|      0|        cmin = oldcmin;
 2200|      0|        cmax = oldcmax;
 2201|      0|      } else
 2202|   466M|        st[i] = ch;
 2203|       |
 2204|   466M|    } while (!defcpdtable.empty() && oldwordnum == 0 &&
  ------------------
  |  Branch (2204:14): [True: 0, False: 466M]
  |  Branch (2204:38): [True: 0, False: 0]
  ------------------
 2205|      0|             onlycpdrule++ < 1);  // end of onlycpd loop
  ------------------
  |  Branch (2205:14): [True: 0, False: 0]
  ------------------
 2206|   467M|  }
 2207|       |
 2208|  20.8M|  return nullptr;
 2209|  21.7M|}
_ZN8AffixMgr20compound_check_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEssssPP6hentrySB_cRS6_PS7_R12AffixScratch:
 2223|  1.75k|                                   AffixScratch& scratch) {
 2224|  1.75k|  short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2;
 2225|  1.75k|  hentry *rv = nullptr, *rv_first;
 2226|  1.75k|  std::string st, presult;
 2227|  1.75k|  char ch, affixed = 0;
 2228|  1.75k|  int checked_prefix, ok = 0;
 2229|  1.75k|  size_t cmin, cmax;
 2230|  1.75k|  hentry** oldwords = words;
 2231|  1.75k|  size_t len = word.size();
 2232|       |
 2233|       |  // protect subsequent words[wnum + 1] reads and any recursion
 2234|  1.75k|  if (wnum + 1 >= maxwordnum)
  ------------------
  |  Branch (2234:7): [True: 0, False: 1.75k]
  ------------------
 2235|      0|    return 0;
 2236|       |
 2237|       |  // add a time limit to handle possible
 2238|       |  // combinatorical explosion of the overlapping words
 2239|       |
 2240|  1.75k|  HUNSPELL_THREAD_LOCAL std::chrono::steady_clock::time_point clock_time_start;
  ------------------
  |  |   60|  1.75k|#  define HUNSPELL_THREAD_LOCAL thread_local
  ------------------
 2241|  1.75k|  HUNSPELL_THREAD_LOCAL bool timelimit_exceeded;
  ------------------
  |  |   60|  1.75k|#  define HUNSPELL_THREAD_LOCAL thread_local
  ------------------
 2242|       |
 2243|       |  // get the current time
 2244|  1.75k|  std::chrono::steady_clock::time_point clock_now = std::chrono::steady_clock::now();
 2245|       |
 2246|  1.75k|  if (wnum == 0) {
  ------------------
  |  Branch (2246:7): [True: 1.75k, False: 0]
  ------------------
 2247|       |      // set the start time
 2248|  1.75k|      clock_time_start = clock_now;
 2249|  1.75k|      timelimit_exceeded = false;
 2250|  1.75k|  }
 2251|      0|  else if (clock_now - clock_time_start > TIMELIMIT_MS)
  ------------------
  |  |  106|      0|#define TIMELIMIT_MS std::chrono::milliseconds(50)
  ------------------
  |  Branch (2251:12): [True: 0, False: 0]
  ------------------
 2252|      0|      timelimit_exceeded = true;
 2253|       |
 2254|  1.75k|  setcminmax(&cmin, &cmax, word.c_str(), len);
 2255|       |
 2256|  1.75k|  st.assign(word);
 2257|       |
 2258|  28.7k|  for (size_t i = cmin; i < cmax; ++i) {
  ------------------
  |  Branch (2258:25): [True: 27.1k, False: 1.56k]
  ------------------
 2259|       |    // go to end of the UTF-8 character
 2260|  27.1k|    if (utf8) {
  ------------------
  |  Branch (2260:9): [True: 7.63k, False: 19.5k]
  ------------------
 2261|  10.0k|      for (; is_utf8_cont(st[i]); i++)
  ------------------
  |  Branch (2261:14): [True: 2.37k, False: 7.63k]
  ------------------
 2262|  2.37k|        ;
 2263|  7.63k|      if (i >= cmax)
  ------------------
  |  Branch (2263:11): [True: 58, False: 7.57k]
  ------------------
 2264|     58|        return 0;
 2265|  7.63k|    }
 2266|       |
 2267|  27.1k|    words = oldwords;
 2268|  27.1k|    int onlycpdrule = (words) ? 1 : 0;
  ------------------
  |  Branch (2268:23): [True: 0, False: 27.1k]
  ------------------
 2269|       |
 2270|  27.1k|    do {  // onlycpdrule loop
 2271|       |
 2272|  27.1k|      if (timelimit_exceeded ||
  ------------------
  |  Branch (2272:11): [True: 0, False: 27.1k]
  |  Branch (2272:11): [True: 0, False: 27.1k]
  ------------------
 2273|  27.1k|          std::chrono::steady_clock::now() - clock_time_start > TIMELIMIT_MS) {
  ------------------
  |  |  106|  27.1k|#define TIMELIMIT_MS std::chrono::milliseconds(50)
  ------------------
  |  Branch (2273:11): [True: 0, False: 27.1k]
  ------------------
 2274|      0|        timelimit_exceeded = true;
 2275|      0|        return 0;
 2276|      0|      }
 2277|       |
 2278|  27.1k|      if (result.size() > MAXMORPHRESULT)
  ------------------
  |  |  111|  27.1k|#define MAXMORPHRESULT (4 * 1024 * 1024)
  ------------------
  |  Branch (2278:11): [True: 0, False: 27.1k]
  ------------------
 2279|      0|        return 0;
 2280|       |
 2281|  27.1k|      oldnumsyllable = numsyllable;
 2282|  27.1k|      oldwordnum = wordnum;
 2283|  27.1k|      checked_prefix = 0;
 2284|       |
 2285|  27.1k|      if (i >= st.size())
  ------------------
  |  Branch (2285:11): [True: 138, False: 26.9k]
  ------------------
 2286|    138|        return 0;
 2287|       |
 2288|  26.9k|      ch = st[i];
 2289|  26.9k|      st[i] = '\0';
 2290|  26.9k|      sfx = nullptr;
 2291|       |
 2292|       |      // FIRST WORD
 2293|       |
 2294|  26.9k|      affixed = 1;
 2295|       |
 2296|  26.9k|      presult.clear();
 2297|  26.9k|      if (partresult)
  ------------------
  |  Branch (2297:11): [True: 0, False: 26.9k]
  ------------------
 2298|      0|        presult.append(*partresult);
 2299|       |
 2300|  26.9k|      rv = lookup(st.c_str(), i);  // perhaps without prefix
 2301|       |
 2302|       |      // forbid dictionary stems with COMPOUNDFORBIDFLAG in
 2303|       |      // compound words, overriding the effect of COMPOUNDPERMITFLAG
 2304|  26.9k|      if ((rv) && compoundforbidflag &&
  ------------------
  |  Branch (2304:11): [True: 116, False: 26.8k]
  |  Branch (2304:19): [True: 68, False: 48]
  ------------------
 2305|     68|              TESTAFF(rv->astr, compoundforbidflag, rv->alen) && !hu_mov_rule)
  ------------------
  |  |   99|  27.0k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 68]
  |  |  ------------------
  ------------------
  |  Branch (2305:66): [True: 0, False: 0]
  ------------------
 2306|      0|          continue;
 2307|       |
 2308|       |      // search homonym with compound flag
 2309|  27.1k|      while ((rv) && !hu_mov_rule &&
  ------------------
  |  Branch (2309:14): [True: 116, False: 26.9k]
  |  Branch (2309:22): [True: 116, False: 0]
  ------------------
 2310|    116|             ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
  ------------------
  |  |   99|     16|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 16]
  |  |  ------------------
  ------------------
  |  Branch (2310:16): [True: 16, False: 100]
  ------------------
 2311|    116|              !((compoundflag && !words && !onlycpdrule &&
  ------------------
  |  Branch (2311:18): [True: 116, False: 0]
  |  Branch (2311:34): [True: 116, False: 0]
  |  Branch (2311:44): [True: 116, False: 0]
  ------------------
 2312|    116|                 TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|    116|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 116]
  |  |  ------------------
  ------------------
 2313|    116|                (compoundbegin && !wordnum && !onlycpdrule &&
  ------------------
  |  Branch (2313:18): [True: 0, False: 116]
  |  Branch (2313:35): [True: 0, False: 0]
  |  Branch (2313:47): [True: 0, False: 0]
  ------------------
 2314|      0|                 TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2315|    116|                (compoundmiddle && wordnum && !words && !onlycpdrule &&
  ------------------
  |  Branch (2315:18): [True: 0, False: 116]
  |  Branch (2315:36): [True: 0, False: 0]
  |  Branch (2315:47): [True: 0, False: 0]
  |  Branch (2315:57): [True: 0, False: 0]
  ------------------
 2316|      0|                 TESTAFF(rv->astr, compoundmiddle, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2317|    116|                (!defcpdtable.empty() && onlycpdrule &&
  ------------------
  |  Branch (2317:18): [True: 0, False: 116]
  |  Branch (2317:42): [True: 0, False: 0]
  ------------------
 2318|      0|                 ((!words && !wordnum &&
  ------------------
  |  Branch (2318:20): [True: 0, False: 0]
  |  Branch (2318:30): [True: 0, False: 0]
  ------------------
 2319|      0|                   defcpd_check(&words, wnum, maxwordnum, rv, rwords, 0)) ||
  ------------------
  |  Branch (2319:20): [True: 0, False: 0]
  ------------------
 2320|      0|                  (words &&
  ------------------
  |  Branch (2320:20): [True: 0, False: 0]
  ------------------
 2321|    116|                   defcpd_check(&words, wnum, maxwordnum, rv, rwords, 0))))))) {
  ------------------
  |  Branch (2321:20): [True: 0, False: 0]
  ------------------
 2322|    116|        rv = rv->next_homonym;
 2323|    116|      }
 2324|       |
 2325|       |
 2326|  26.9k|      if (rv)
  ------------------
  |  Branch (2326:11): [True: 0, False: 26.9k]
  ------------------
 2327|      0|        affixed = 0;
 2328|       |
 2329|  26.9k|      if (rv) {
  ------------------
  |  Branch (2329:11): [True: 0, False: 26.9k]
  ------------------
 2330|      0|        presult.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2331|      0|        presult.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2332|      0|        presult.append(st, 0, i);
 2333|      0|        if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (2333:13): [True: 0, False: 0]
  ------------------
 2334|      0|          presult.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2335|      0|          presult.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 2336|      0|          presult.append(st, 0, i);
 2337|      0|        }
 2338|      0|        if (HENTRY_DATA(rv)) {
  ------------------
  |  Branch (2338:13): [True: 0, False: 0]
  ------------------
 2339|      0|          presult.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2340|      0|          presult.append(HENTRY_DATA2(rv));
 2341|      0|        }
 2342|      0|      }
 2343|       |
 2344|  26.9k|      if (!rv) {
  ------------------
  |  Branch (2344:11): [True: 26.9k, False: 0]
  ------------------
 2345|  26.9k|        if (compoundflag &&
  ------------------
  |  Branch (2345:13): [True: 26.9k, False: 0]
  ------------------
 2346|  26.9k|            !(rv =
  ------------------
  |  Branch (2346:13): [True: 26.9k, False: 0]
  ------------------
 2347|  26.9k|                  prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN,
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                                prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN,
  ------------------
  |  |   73|  53.9k|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2347:42): [True: 0, False: 26.9k]
  ------------------
 2348|  26.9k|                               scratch, compoundflag))) {
 2349|  26.9k|          if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|  26.9k|#define FLAG_NULL 0x00
  ------------------
                        if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                        if (((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|  53.9k|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2349:16): [True: 0, False: 26.9k]
  |  Branch (2349:91): [True: 0, False: 26.9k]
  ------------------
 2350|  26.9k|               (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch, compoundflag)))) &&
  ------------------
  |  Branch (2350:17): [True: 0, False: 26.9k]
  |  Branch (2350:41): [True: 0, False: 0]
  ------------------
 2351|      0|              !hu_mov_rule && sfx->getCont() &&
  ------------------
  |  Branch (2351:15): [True: 0, False: 0]
  |  Branch (2351:31): [True: 0, False: 0]
  ------------------
 2352|      0|              ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, sfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2352:17): [True: 0, False: 0]
  ------------------
 2353|      0|               (compoundend && TESTAFF(sfx->getCont(), compoundend, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2353:17): [True: 0, False: 0]
  ------------------
 2354|      0|            rv = nullptr;
 2355|      0|          }
 2356|  26.9k|        }
 2357|       |
 2358|  26.9k|        if (rv ||
  ------------------
  |  Branch (2358:13): [True: 0, False: 26.9k]
  ------------------
 2359|  26.9k|            (((wordnum == 0) && compoundbegin &&
  ------------------
  |  Branch (2359:15): [True: 26.9k, False: 0]
  |  Branch (2359:33): [True: 0, False: 26.9k]
  ------------------
 2360|      0|              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
                            ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                            ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2360:16): [True: 0, False: 0]
  |  Branch (2360:92): [True: 0, False: 0]
  ------------------
 2361|      0|               (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch,
  ------------------
  |  Branch (2361:17): [True: 0, False: 0]
  |  Branch (2361:41): [True: 0, False: 0]
  ------------------
 2362|      0|                                                                  compoundbegin))) ||  // twofold suffix+compound
 2363|      0|               (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundbegin)))) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                             (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundbegin)))) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2363:16): [True: 0, False: 0]
  |  Branch (2363:45): [True: 0, False: 0]
  ------------------
 2364|  26.9k|             ((wordnum > 0) && compoundmiddle &&
  ------------------
  |  Branch (2364:15): [True: 0, False: 26.9k]
  |  Branch (2364:32): [True: 0, False: 0]
  ------------------
 2365|      0|              ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
                            ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                            ((rv = suffix_check(st, 0, i, 0, nullptr, scratch, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2365:16): [True: 0, False: 0]
  |  Branch (2365:93): [True: 0, False: 0]
  ------------------
 2366|      0|               (compoundmoresuffixes && (rv = suffix_check_twosfx(st, 0, i, 0, nullptr, scratch,
  ------------------
  |  Branch (2366:17): [True: 0, False: 0]
  |  Branch (2366:41): [True: 0, False: 0]
  ------------------
 2367|      0|                                                                  compoundmiddle))) ||  // twofold suffix+compound
 2368|      0|               (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundmiddle)))))) {
  ------------------
  |  |   75|      0|#define IN_CPD_OTHER 3
  ------------------
                             (rv = prefix_check(st, 0, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, scratch, compoundmiddle)))))) {
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2368:16): [True: 0, False: 0]
  |  Branch (2368:45): [True: 0, False: 0]
  ------------------
 2369|      0|          std::string p;
 2370|      0|          if (compoundflag)
  ------------------
  |  Branch (2370:15): [True: 0, False: 0]
  ------------------
 2371|      0|            p = affix_check_morph(st, 0, i, scratch, compoundflag);
 2372|      0|          if (p.empty()) {
  ------------------
  |  Branch (2372:15): [True: 0, False: 0]
  ------------------
 2373|      0|            if ((wordnum == 0) && compoundbegin) {
  ------------------
  |  Branch (2373:17): [True: 0, False: 0]
  |  Branch (2373:35): [True: 0, False: 0]
  ------------------
 2374|      0|              p = affix_check_morph(st, 0, i, scratch, compoundbegin);
 2375|      0|            } else if ((wordnum > 0) && compoundmiddle) {
  ------------------
  |  Branch (2375:24): [True: 0, False: 0]
  |  Branch (2375:41): [True: 0, False: 0]
  ------------------
 2376|      0|              p = affix_check_morph(st, 0, i, scratch, compoundmiddle);
 2377|      0|            }
 2378|      0|          }
 2379|      0|          if (!p.empty()) {
  ------------------
  |  Branch (2379:15): [True: 0, False: 0]
  ------------------
 2380|      0|            presult.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2381|      0|            presult.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2382|      0|            presult.append(st, 0, i);
 2383|      0|            line_uniq_app(p, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2384|      0|            if (!p.empty() && p[0] != MSEP_FLD)
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
  |  Branch (2384:17): [True: 0, False: 0]
  |  Branch (2384:31): [True: 0, False: 0]
  ------------------
 2385|      0|              presult.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2386|      0|            presult.append(p);
 2387|      0|          }
 2388|      0|          checked_prefix = 1;
 2389|      0|        }
 2390|       |        // else check forbiddenwords
 2391|  26.9k|      } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2391:18): [True: 0, False: 0]
  |  Branch (2391:18): [True: 0, False: 0]
  ------------------
 2392|      0|                              TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2393|      0|                              TESTAFF(rv->astr, needaffix, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2394|      0|        st[i] = ch;
 2395|      0|        continue;
 2396|      0|      }
 2397|       |
 2398|       |      // check non_compound flag in suffix and prefix
 2399|  26.9k|      if ((rv) && !hu_mov_rule &&
  ------------------
  |  Branch (2399:11): [True: 0, False: 26.9k]
  |  Branch (2399:19): [True: 0, False: 0]
  ------------------
 2400|      0|          ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (2400:13): [True: 0, False: 0]
  |  Branch (2400:20): [True: 0, False: 0]
  ------------------
 2401|      0|            TESTAFF(pfx->getCont(), compoundforbidflag, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2402|      0|           (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2402:13): [True: 0, False: 0]
  |  Branch (2402:20): [True: 0, False: 0]
  ------------------
 2403|      0|            TESTAFF(sfx->getCont(), compoundforbidflag, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2404|      0|        continue;
 2405|      0|      }
 2406|       |
 2407|       |      // check compoundend flag in suffix and prefix
 2408|  26.9k|      if ((rv) && !checked_prefix && compoundend && !hu_mov_rule &&
  ------------------
  |  Branch (2408:11): [True: 0, False: 26.9k]
  |  Branch (2408:19): [True: 0, False: 0]
  |  Branch (2408:38): [True: 0, False: 0]
  |  Branch (2408:53): [True: 0, False: 0]
  ------------------
 2409|      0|          ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (2409:13): [True: 0, False: 0]
  |  Branch (2409:20): [True: 0, False: 0]
  ------------------
 2410|      0|            TESTAFF(pfx->getCont(), compoundend, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2411|      0|           (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2411:13): [True: 0, False: 0]
  |  Branch (2411:20): [True: 0, False: 0]
  ------------------
 2412|      0|            TESTAFF(sfx->getCont(), compoundend, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2413|      0|        continue;
 2414|      0|      }
 2415|       |
 2416|       |      // check compoundmiddle flag in suffix and prefix
 2417|  26.9k|      if ((rv) && !checked_prefix && (wordnum == 0) && compoundmiddle &&
  ------------------
  |  Branch (2417:11): [True: 0, False: 26.9k]
  |  Branch (2417:19): [True: 0, False: 0]
  |  Branch (2417:38): [True: 0, False: 0]
  |  Branch (2417:56): [True: 0, False: 0]
  ------------------
 2418|      0|          !hu_mov_rule &&
  ------------------
  |  Branch (2418:11): [True: 0, False: 0]
  ------------------
 2419|      0|          ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (2419:13): [True: 0, False: 0]
  |  Branch (2419:20): [True: 0, False: 0]
  ------------------
 2420|      0|            TESTAFF(pfx->getCont(), compoundmiddle, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2421|      0|           (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2421:13): [True: 0, False: 0]
  |  Branch (2421:20): [True: 0, False: 0]
  ------------------
 2422|      0|            TESTAFF(sfx->getCont(), compoundmiddle, sfx->getContLen())))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2423|      0|        rv = nullptr;
 2424|      0|      }
 2425|       |
 2426|       |      // check forbiddenwords
 2427|  26.9k|      if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2427:11): [True: 0, False: 26.9k]
  |  Branch (2427:11): [True: 0, False: 26.9k]
  |  Branch (2427:19): [True: 0, False: 0]
  ------------------
 2428|      0|                                 TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2429|      0|        continue;
 2430|       |
 2431|       |      // increment word number, if the second root has a compoundroot flag
 2432|  26.9k|      if ((rv) && (compoundroot) &&
  ------------------
  |  Branch (2432:11): [True: 0, False: 26.9k]
  |  Branch (2432:19): [True: 0, False: 0]
  ------------------
 2433|      0|          (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2433:11): [True: 0, False: 0]
  ------------------
 2434|      0|        wordnum++;
 2435|      0|      }
 2436|       |
 2437|       |      // first word is acceptable in compound words?
 2438|  26.9k|      if (((rv) &&
  ------------------
  |  Branch (2438:11): [True: 0, False: 26.9k]
  |  Branch (2438:12): [True: 0, False: 26.9k]
  ------------------
 2439|      0|           (checked_prefix || (words && words[wnum]) || (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2439:13): [True: 0, False: 0]
  |  Branch (2439:32): [True: 0, False: 0]
  |  Branch (2439:41): [True: 0, False: 0]
  |  Branch (2439:58): [True: 0, False: 0]
  ------------------
 2440|      0|            ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2440:14): [True: 0, False: 0]
  |  Branch (2440:35): [True: 0, False: 0]
  ------------------
 2441|      0|            ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2441:14): [True: 0, False: 0]
  |  Branch (2441:34): [True: 0, False: 0]
  ------------------
 2442|       |            // LANG_hu section: spec. Hungarian rule
 2443|      0|            || ((langnum == LANG_hu) &&  // hu_mov_rule
  ------------------
  |  Branch (2443:17): [True: 0, False: 0]
  ------------------
 2444|      0|                hu_mov_rule &&
  ------------------
  |  Branch (2444:17): [True: 0, False: 0]
  ------------------
 2445|      0|                (TESTAFF(rv->astr, 'F', rv->alen) || TESTAFF(rv->astr, 'G', rv->alen) || TESTAFF(rv->astr, 'H', rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              (TESTAFF(rv->astr, 'F', rv->alen) || TESTAFF(rv->astr, 'G', rv->alen) || TESTAFF(rv->astr, 'H', rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
                              (TESTAFF(rv->astr, 'F', rv->alen) || TESTAFF(rv->astr, 'G', rv->alen) || TESTAFF(rv->astr, 'H', rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2446|       |            // END of LANG_hu section
 2447|      0|            ) &&
 2448|      0|           !((checkcompoundtriple && !words &&  // test triple letters
  ------------------
  |  Branch (2448:15): [True: 0, False: 0]
  |  Branch (2448:38): [True: 0, False: 0]
  ------------------
 2449|      0|              (word[i - 1] == word[i]) &&
  ------------------
  |  Branch (2449:15): [True: 0, False: 0]
  ------------------
 2450|      0|              (((i > 1) && (word[i - 1] == word[i - 2])) || ((word[i - 1] == word[i + 1]))  // may be word[i+1] == '\0'
  ------------------
  |  Branch (2450:17): [True: 0, False: 0]
  |  Branch (2450:28): [True: 0, False: 0]
  |  Branch (2450:61): [True: 0, False: 0]
  ------------------
 2451|      0|               )) ||
 2452|      0|             (
 2453|       |                 // test CHECKCOMPOUNDPATTERN
 2454|      0|                 !checkcpdtable.empty() && !words && cpdpat_check(word, i, rv, nullptr, affixed)) ||
  ------------------
  |  Branch (2454:18): [True: 0, False: 0]
  |  Branch (2454:44): [True: 0, False: 0]
  |  Branch (2454:54): [True: 0, False: 0]
  ------------------
 2455|      0|             (checkcompoundcase && !words && cpdcase_check(word, i))))
  ------------------
  |  Branch (2455:15): [True: 0, False: 0]
  |  Branch (2455:36): [True: 0, False: 0]
  |  Branch (2455:46): [True: 0, False: 0]
  ------------------
 2456|       |          // LANG_hu section: spec. Hungarian rule
 2457|  26.9k|          || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st, 0, i, scratch)) &&
  ------------------
  |  Branch (2457:15): [True: 26.9k, False: 0]
  |  Branch (2457:24): [True: 7.57k, False: 19.4k]
  |  Branch (2457:48): [True: 0, False: 7.57k]
  |  Branch (2457:63): [True: 0, False: 0]
  ------------------
 2458|      0|              (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2458:16): [True: 0, False: 0]
  |  Branch (2458:23): [True: 0, False: 0]
  ------------------
 2459|      0|               (TESTAFF(sfx->getCont(), (unsigned short)'x', sfx->getContLen()) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2460|      0|                TESTAFF(sfx->getCont(), (unsigned short)'%', sfx->getContLen()))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2461|       |          // END of LANG_hu section
 2462|  26.9k|      ) {
 2463|       |        // LANG_hu section: spec. Hungarian rule
 2464|      0|        if (langnum == LANG_hu) {
  ------------------
  |  Branch (2464:13): [True: 0, False: 0]
  ------------------
 2465|       |          // calculate syllable number of the word
 2466|      0|          numsyllable += get_syllable(st.substr(0, i));
 2467|       |
 2468|       |          // + 1 word, if syllable number of the prefix > 1 (hungarian
 2469|       |          // convention)
 2470|      0|          if (pfx && (get_syllable(pfx->getKey()) > 1))
  ------------------
  |  Branch (2470:15): [True: 0, False: 0]
  |  Branch (2470:15): [True: 0, False: 0]
  |  Branch (2470:22): [True: 0, False: 0]
  ------------------
 2471|      0|            wordnum++;
 2472|      0|        }
 2473|       |        // END of LANG_hu section
 2474|       |
 2475|       |        // NEXT WORD(S)
 2476|      0|        rv_first = rv;
 2477|      0|        rv = lookup(word.c_str() + i, word.size() - i);  // perhaps without prefix
 2478|       |
 2479|       |        // search homonym with compound flag
 2480|      0|        while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2480:16): [True: 0, False: 0]
  |  Branch (2480:26): [True: 0, False: 0]
  ------------------
 2481|      0|                        !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2481:28): [True: 0, False: 0]
  |  Branch (2481:44): [True: 0, False: 0]
  ------------------
 2482|      0|                          (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2482:28): [True: 0, False: 0]
  |  Branch (2482:43): [True: 0, False: 0]
  ------------------
 2483|      0|                          (!defcpdtable.empty() && words && defcpd_check(&words, wnum + 1, maxwordnum, rv, nullptr, 1))))) {
  ------------------
  |  Branch (2483:28): [True: 0, False: 0]
  |  Branch (2483:52): [True: 0, False: 0]
  |  Branch (2483:61): [True: 0, False: 0]
  ------------------
 2484|      0|          rv = rv->next_homonym;
 2485|      0|        }
 2486|       |
 2487|      0|        if (rv && words && words[wnum + 1]) {
  ------------------
  |  Branch (2487:13): [True: 0, False: 0]
  |  Branch (2487:19): [True: 0, False: 0]
  |  Branch (2487:28): [True: 0, False: 0]
  ------------------
 2488|      0|          result.append(presult);
 2489|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2490|      0|          result.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2491|      0|          result.append(word, i, word.size());
 2492|      0|          if (complexprefixes && HENTRY_DATA(rv))
  ------------------
  |  Branch (2492:15): [True: 0, False: 0]
  |  Branch (2492:34): [True: 0, False: 0]
  ------------------
 2493|      0|            result.append(HENTRY_DATA2(rv));
 2494|      0|          if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (2494:15): [True: 0, False: 0]
  ------------------
 2495|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2496|      0|            result.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 2497|      0|            result.append(HENTRY_WORD(rv));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 2498|      0|          }
 2499|       |          // store the pointer of the hash entry
 2500|      0|          if (!complexprefixes && HENTRY_DATA(rv)) {
  ------------------
  |  Branch (2500:15): [True: 0, False: 0]
  |  Branch (2500:35): [True: 0, False: 0]
  ------------------
 2501|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2502|      0|            result.append(HENTRY_DATA2(rv));
 2503|      0|          }
 2504|      0|          result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2505|      0|          return 0;
 2506|      0|        }
 2507|       |
 2508|      0|        oldnumsyllable2 = numsyllable;
 2509|      0|        oldwordnum2 = wordnum;
 2510|       |
 2511|       |        // LANG_hu section: spec. Hungarian rule
 2512|      0|        if ((rv) && (langnum == LANG_hu) &&
  ------------------
  |  Branch (2512:13): [True: 0, False: 0]
  |  Branch (2512:13): [True: 0, False: 0]
  |  Branch (2512:21): [True: 0, False: 0]
  ------------------
 2513|      0|            (TESTAFF(rv->astr, 'I', rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2513:13): [True: 0, False: 0]
  ------------------
 2514|      0|            !(TESTAFF(rv->astr, 'J', rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2514:13): [True: 0, False: 0]
  ------------------
 2515|      0|          numsyllable--;
 2516|      0|        }
 2517|       |        // END of LANG_hu section
 2518|       |        // increment word number, if the second root has a compoundroot flag
 2519|      0|        if ((rv) && (compoundroot) &&
  ------------------
  |  Branch (2519:13): [True: 0, False: 0]
  |  Branch (2519:21): [True: 0, False: 0]
  ------------------
 2520|      0|            (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2520:13): [True: 0, False: 0]
  ------------------
 2521|      0|          wordnum++;
 2522|      0|        }
 2523|       |
 2524|       |        // check forbiddenwords
 2525|      0|        if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (2525:13): [True: 0, False: 0]
  |  Branch (2525:13): [True: 0, False: 0]
  |  Branch (2525:21): [True: 0, False: 0]
  ------------------
 2526|      0|            (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2527|      0|             TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2528|      0|          st[i] = ch;
 2529|      0|          continue;
 2530|      0|        }
 2531|       |
 2532|       |        // second word is acceptable, as a root?
 2533|       |        // hungarian conventions: compounding is acceptable,
 2534|       |        // when compound forms consist of 2 words, or if more,
 2535|       |        // then the syllable number of root words must be 6, or lesser.
 2536|      0|        if ((rv) &&
  ------------------
  |  Branch (2536:13): [True: 0, False: 0]
  |  Branch (2536:13): [True: 0, False: 0]
  ------------------
 2537|      0|            ((compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2537:15): [True: 0, False: 0]
  ------------------
 2538|      0|             (compoundend && TESTAFF(rv->astr, compoundend, rv->alen))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2538:15): [True: 0, False: 0]
  ------------------
 2539|      0|            (((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) ||
  ------------------
  |  Branch (2539:15): [True: 0, False: 0]
  |  Branch (2539:37): [True: 0, False: 0]
  ------------------
 2540|      0|             ((cpdmaxsyllable != 0) &&
  ------------------
  |  Branch (2540:15): [True: 0, False: 0]
  ------------------
 2541|      0|              (numsyllable + get_syllable(std::string(HENTRY_WORD(rv), rv->blen)) <=
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  |  Branch (2541:15): [True: 0, False: 0]
  ------------------
 2542|      0|               cpdmaxsyllable))) &&
 2543|      0|            ((!checkcompounddup || (rv != rv_first)))) {
  ------------------
  |  Branch (2543:15): [True: 0, False: 0]
  |  Branch (2543:36): [True: 0, False: 0]
  ------------------
 2544|       |          // bad compound word
 2545|      0|          result.append(presult);
 2546|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2547|      0|          result.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2548|      0|          result.append(word, i, word.size());
 2549|       |
 2550|      0|          if (HENTRY_DATA(rv)) {
  ------------------
  |  Branch (2550:15): [True: 0, False: 0]
  ------------------
 2551|      0|            if (complexprefixes)
  ------------------
  |  Branch (2551:17): [True: 0, False: 0]
  ------------------
 2552|      0|              result.append(HENTRY_DATA2(rv));
 2553|      0|            if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (2553:17): [True: 0, False: 0]
  ------------------
 2554|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2555|      0|              result.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 2556|      0|              result.append(HENTRY_WORD(rv));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 2557|      0|            }
 2558|       |            // store the pointer of the hash entry
 2559|      0|            if (!complexprefixes) {
  ------------------
  |  Branch (2559:17): [True: 0, False: 0]
  ------------------
 2560|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2561|      0|              result.append(HENTRY_DATA2(rv));
 2562|      0|            }
 2563|      0|          }
 2564|      0|          result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2565|      0|          ok = 1;
 2566|      0|        }
 2567|       |
 2568|      0|        numsyllable = oldnumsyllable2;
 2569|      0|        wordnum = oldwordnum2;
 2570|       |
 2571|       |        // perhaps second word has prefix or/and suffix
 2572|      0|        sfx = nullptr;
 2573|      0|        sfxflag = FLAG_NULL;
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
 2574|       |
 2575|      0|        if (compoundflag && !onlycpdrule)
  ------------------
  |  Branch (2575:13): [True: 0, False: 0]
  |  Branch (2575:29): [True: 0, False: 0]
  ------------------
 2576|      0|          rv = affix_check(word, i, word.size() - i, scratch, compoundflag);
 2577|      0|        else
 2578|      0|          rv = nullptr;
 2579|       |
 2580|      0|        if (!rv && compoundend && !onlycpdrule) {
  ------------------
  |  Branch (2580:13): [True: 0, False: 0]
  |  Branch (2580:20): [True: 0, False: 0]
  |  Branch (2580:35): [True: 0, False: 0]
  ------------------
 2581|      0|          sfx = nullptr;
 2582|      0|          pfx = nullptr;
 2583|      0|          rv = affix_check(word, i, word.size() - i, scratch, compoundend);
 2584|      0|        }
 2585|       |
 2586|      0|        if (!rv && !defcpdtable.empty() && words) {
  ------------------
  |  Branch (2586:13): [True: 0, False: 0]
  |  Branch (2586:20): [True: 0, False: 0]
  |  Branch (2586:44): [True: 0, False: 0]
  ------------------
 2587|      0|          rv = affix_check(word, i, word.size() - i, scratch, 0, IN_CPD_END);
  ------------------
  |  |   74|      0|#define IN_CPD_END 2
  ------------------
 2588|      0|          if (rv && words && defcpd_check(&words, wnum + 1, maxwordnum, rv, nullptr, 1)) {
  ------------------
  |  Branch (2588:15): [True: 0, False: 0]
  |  Branch (2588:21): [True: 0, False: 0]
  |  Branch (2588:30): [True: 0, False: 0]
  ------------------
 2589|      0|            std::string m;
 2590|      0|            if (compoundflag)
  ------------------
  |  Branch (2590:17): [True: 0, False: 0]
  ------------------
 2591|      0|              m = affix_check_morph(word, i, word.size() - i, scratch, compoundflag);
 2592|      0|            if (m.empty() && compoundend) {
  ------------------
  |  Branch (2592:17): [True: 0, False: 0]
  |  Branch (2592:30): [True: 0, False: 0]
  ------------------
 2593|      0|              m = affix_check_morph(word, i, word.size() - i, scratch, compoundend);
 2594|      0|            }
 2595|      0|            result.append(presult);
 2596|      0|            if (!m.empty()) {
  ------------------
  |  Branch (2596:17): [True: 0, False: 0]
  ------------------
 2597|      0|              result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2598|      0|              result.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2599|      0|              result.append(word, i, word.size());
 2600|      0|              line_uniq_app(m, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2601|      0|              result.append(m);
 2602|      0|            }
 2603|      0|            result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2604|      0|            ok = 1;
 2605|      0|          }
 2606|      0|        }
 2607|       |
 2608|       |        // check non_compound flag in suffix and prefix
 2609|      0|        if ((rv) &&
  ------------------
  |  Branch (2609:13): [True: 0, False: 0]
  ------------------
 2610|      0|            ((pfx && pfx->getCont() &&
  ------------------
  |  Branch (2610:15): [True: 0, False: 0]
  |  Branch (2610:22): [True: 0, False: 0]
  ------------------
 2611|      0|              TESTAFF(pfx->getCont(), compoundforbidflag, pfx->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2612|      0|             (sfx && sfx->getCont() &&
  ------------------
  |  Branch (2612:15): [True: 0, False: 0]
  |  Branch (2612:22): [True: 0, False: 0]
  ------------------
 2613|      0|              TESTAFF(sfx->getCont(), compoundforbidflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2614|      0|                      sfx->getContLen())))) {
 2615|      0|          rv = nullptr;
 2616|      0|        }
 2617|       |
 2618|       |        // check forbiddenwords
 2619|      0|        if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (2619:13): [True: 0, False: 0]
  |  Branch (2619:13): [True: 0, False: 0]
  |  Branch (2619:21): [True: 0, False: 0]
  ------------------
 2620|      0|            (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2621|      0|             TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen)) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2622|      0|            (!TESTAFF(rv->astr, needaffix, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2622:13): [True: 0, False: 0]
  ------------------
 2623|      0|          st[i] = ch;
 2624|      0|          continue;
 2625|      0|        }
 2626|       |
 2627|      0|        if (langnum == LANG_hu) {
  ------------------
  |  Branch (2627:13): [True: 0, False: 0]
  ------------------
 2628|       |          // calculate syllable number of the word
 2629|      0|          numsyllable += get_syllable(word.c_str() + i);
 2630|       |
 2631|       |          // - affix syllable num.
 2632|       |          // XXX only second suffix (inflections, not derivations)
 2633|      0|          if (sfxappnd) {
  ------------------
  |  Branch (2633:15): [True: 0, False: 0]
  ------------------
 2634|      0|            std::string tmp(sfxappnd);
 2635|      0|            reverseword(tmp);
 2636|      0|            numsyllable -= short(get_syllable(tmp) + sfxextra);
 2637|      0|          } else {
 2638|      0|            numsyllable -= short(sfxextra);
 2639|      0|          }
 2640|       |
 2641|       |          // + 1 word, if syllable number of the prefix > 1 (hungarian
 2642|       |          // convention)
 2643|      0|          if (pfx && (get_syllable(pfx->getKey()) > 1))
  ------------------
  |  Branch (2643:15): [True: 0, False: 0]
  |  Branch (2643:15): [True: 0, False: 0]
  |  Branch (2643:22): [True: 0, False: 0]
  ------------------
 2644|      0|            wordnum++;
 2645|       |
 2646|       |          // increment syllable num, if last word has a SYLLABLENUM flag
 2647|       |          // and the suffix is beginning `s'
 2648|       |
 2649|      0|          if (!cpdsyllablenum.empty()) {
  ------------------
  |  Branch (2649:15): [True: 0, False: 0]
  ------------------
 2650|      0|            switch (sfxflag) {
  ------------------
  |  Branch (2650:21): [True: 0, False: 0]
  ------------------
 2651|      0|              case 'c': {
  ------------------
  |  Branch (2651:15): [True: 0, False: 0]
  ------------------
 2652|      0|                numsyllable += 2;
 2653|      0|                break;
 2654|      0|              }
 2655|      0|              case 'J': {
  ------------------
  |  Branch (2655:15): [True: 0, False: 0]
  ------------------
 2656|      0|                numsyllable += 1;
 2657|      0|                break;
 2658|      0|              }
 2659|      0|              case 'I': {
  ------------------
  |  Branch (2659:15): [True: 0, False: 0]
  ------------------
 2660|      0|                if (rv && TESTAFF(rv->astr, 'J', rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2660:21): [True: 0, False: 0]
  |  Branch (2660:21): [True: 0, False: 0]
  ------------------
 2661|      0|                  numsyllable += 1;
 2662|      0|                break;
 2663|      0|              }
 2664|      0|            }
 2665|      0|          }
 2666|      0|        }
 2667|       |
 2668|       |        // increment word number, if the second word has a compoundroot flag
 2669|      0|        if ((rv) && (compoundroot) &&
  ------------------
  |  Branch (2669:13): [True: 0, False: 0]
  |  Branch (2669:21): [True: 0, False: 0]
  ------------------
 2670|      0|            (TESTAFF(rv->astr, compoundroot, rv->alen))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2670:13): [True: 0, False: 0]
  ------------------
 2671|      0|          wordnum++;
 2672|      0|        }
 2673|       |        // second word is acceptable, as a word with prefix or/and suffix?
 2674|       |        // hungarian conventions: compounding is acceptable,
 2675|       |        // when compound forms consist 2 word, otherwise
 2676|       |        // the syllable number of root words is 6, or lesser.
 2677|      0|        if ((rv) &&
  ------------------
  |  Branch (2677:13): [True: 0, False: 0]
  ------------------
 2678|      0|            (((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) ||
  ------------------
  |  Branch (2678:15): [True: 0, False: 0]
  |  Branch (2678:37): [True: 0, False: 0]
  ------------------
 2679|      0|             ((cpdmaxsyllable != 0) && (numsyllable <= cpdmaxsyllable))) &&
  ------------------
  |  Branch (2679:15): [True: 0, False: 0]
  |  Branch (2679:40): [True: 0, False: 0]
  ------------------
 2680|      0|            ((!checkcompounddup || (rv != rv_first)))) {
  ------------------
  |  Branch (2680:15): [True: 0, False: 0]
  |  Branch (2680:36): [True: 0, False: 0]
  ------------------
 2681|      0|          std::string m;
 2682|      0|          if (compoundflag)
  ------------------
  |  Branch (2682:15): [True: 0, False: 0]
  ------------------
 2683|      0|            m = affix_check_morph(word, i, word.size() - i, scratch, compoundflag);
 2684|      0|          if (m.empty() && compoundend) {
  ------------------
  |  Branch (2684:15): [True: 0, False: 0]
  |  Branch (2684:28): [True: 0, False: 0]
  ------------------
 2685|      0|            m = affix_check_morph(word, i, word.size() - i, scratch, compoundend);
 2686|      0|          }
 2687|      0|          result.append(presult);
 2688|      0|          if (!m.empty()) {
  ------------------
  |  Branch (2688:15): [True: 0, False: 0]
  ------------------
 2689|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2690|      0|            result.append(MORPH_PART);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
 2691|      0|            result.append(word, i, word.size());
 2692|      0|            line_uniq_app(m, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2693|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2694|      0|            result.append(m);
 2695|      0|          }
 2696|      0|          result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2697|      0|          ok = 1;
 2698|      0|        }
 2699|       |
 2700|      0|        numsyllable = oldnumsyllable2;
 2701|      0|        wordnum = oldwordnum2;
 2702|       |
 2703|       |        // perhaps second word is a compound word (recursive call)
 2704|      0|        if ((wordnum + 2 < maxwordnum) && (wnum + 1 < maxwordnum) && (ok == 0)) {
  ------------------
  |  Branch (2704:13): [True: 0, False: 0]
  |  Branch (2704:43): [True: 0, False: 0]
  |  Branch (2704:70): [True: 0, False: 0]
  ------------------
 2705|      0|          compound_check_morph(word.substr(i), wordnum + 1,
 2706|      0|                               numsyllable, maxwordnum, wnum + 1, words, rwords, 0,
 2707|      0|                               result, &presult, scratch);
 2708|      0|        } else {
 2709|      0|          rv = nullptr;
 2710|      0|        }
 2711|      0|      }
 2712|  26.9k|      st[i] = ch;
 2713|  26.9k|      wordnum = oldwordnum;
 2714|  26.9k|      numsyllable = oldnumsyllable;
 2715|       |
 2716|  26.9k|    } while (!defcpdtable.empty() && oldwordnum == 0 &&
  ------------------
  |  Branch (2716:14): [True: 0, False: 26.9k]
  |  Branch (2716:38): [True: 0, False: 0]
  ------------------
 2717|      0|             onlycpdrule++ < 1);  // end of onlycpd loop
  ------------------
  |  Branch (2717:14): [True: 0, False: 0]
  ------------------
 2718|  27.1k|  }
 2719|  1.56k|  return 0;
 2720|  1.75k|}
_ZN8AffixMgr12suffix_checkERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntryR12AffixScratchttct:
 2744|   512M|                                      const FLAG avoidflag) {
 2745|   512M|  struct hentry* rv = nullptr;
 2746|   512M|  PfxEntry* ep = ppfx;
 2747|       |
 2748|       |  // first handle the special case of 0 length suffixes
 2749|   512M|  SfxEntry* se = sStart[0];
 2750|       |
 2751|   512M|  while (se) {
  ------------------
  |  Branch (2751:10): [True: 0, False: 512M]
  ------------------
 2752|      0|    if (!cclass || se->getCont()) {
  ------------------
  |  Branch (2752:9): [True: 0, False: 0]
  |  Branch (2752:20): [True: 0, False: 0]
  ------------------
 2753|       |      // suffixes are not allowed in beginning of compounds
 2754|      0|      if ((((in_compound != IN_CPD_BEGIN)) ||  // && !cclass
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2754:12): [True: 0, False: 0]
  ------------------
 2755|       |           // except when signed with compoundpermitflag flag
 2756|      0|           (se->getCont() && compoundpermitflag &&
  ------------------
  |  Branch (2756:13): [True: 0, False: 0]
  |  Branch (2756:30): [True: 0, False: 0]
  ------------------
 2757|      0|            TESTAFF(se->getCont(), compoundpermitflag, se->getContLen()))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2758|      0|          (!circumfix ||
  ------------------
  |  Branch (2758:12): [True: 0, False: 0]
  ------------------
 2759|       |           // no circumfix flag in prefix and suffix
 2760|      0|           ((!ppfx || !(ep->getCont()) ||
  ------------------
  |  Branch (2760:14): [True: 0, False: 0]
  |  Branch (2760:23): [True: 0, False: 0]
  ------------------
 2761|      0|             !TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2761:14): [True: 0, False: 0]
  ------------------
 2762|      0|            (!se->getCont() ||
  ------------------
  |  Branch (2762:14): [True: 0, False: 0]
  ------------------
 2763|      0|             !(TESTAFF(se->getCont(), circumfix, se->getContLen())))) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2763:14): [True: 0, False: 0]
  ------------------
 2764|       |           // circumfix flag in prefix AND suffix
 2765|      0|           ((ppfx && (ep->getCont()) &&
  ------------------
  |  Branch (2765:14): [True: 0, False: 0]
  |  Branch (2765:22): [True: 0, False: 0]
  ------------------
 2766|      0|             TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2767|      0|            (se->getCont() &&
  ------------------
  |  Branch (2767:14): [True: 0, False: 0]
  ------------------
 2768|      0|             (TESTAFF(se->getCont(), circumfix, se->getContLen()))))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2768:14): [True: 0, False: 0]
  ------------------
 2769|       |          // fogemorpheme
 2770|      0|          (in_compound ||
  ------------------
  |  Branch (2770:12): [True: 0, False: 0]
  ------------------
 2771|      0|           !(se->getCont() &&
  ------------------
  |  Branch (2771:14): [True: 0, False: 0]
  ------------------
 2772|      0|             (TESTAFF(se->getCont(), onlyincompound, se->getContLen())))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2772:14): [True: 0, False: 0]
  ------------------
 2773|       |          // needaffix on prefix or first suffix
 2774|      0|          (cclass ||
  ------------------
  |  Branch (2774:12): [True: 0, False: 0]
  ------------------
 2775|      0|           !(se->getCont() &&
  ------------------
  |  Branch (2775:14): [True: 0, False: 0]
  ------------------
 2776|      0|             TESTAFF(se->getCont(), needaffix, se->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2777|      0|           (ppfx &&
  ------------------
  |  Branch (2777:13): [True: 0, False: 0]
  ------------------
 2778|      0|            !((ep->getCont()) &&
  ------------------
  |  Branch (2778:15): [True: 0, False: 0]
  ------------------
 2779|      0|              TESTAFF(ep->getCont(), needaffix, ep->getContLen()))))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2780|      0|        rv = se->checkword(word, start, len, sfxopts, ppfx,
 2781|      0|                           (FLAG)cclass, needflag,
 2782|      0|                           (in_compound ? 0 : onlyincompound),
  ------------------
  |  Branch (2782:29): [True: 0, False: 0]
  ------------------
 2783|      0|                           scratch);
 2784|       |        // Skip a stem with the avoid flag and keep scanning the other suffixes.
 2785|      0|        if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
                      if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2785:13): [True: 0, False: 0]
  |  Branch (2785:19): [True: 0, False: 0]
  ------------------
 2786|      0|          rv = nullptr;
 2787|      0|        if (rv) {
  ------------------
  |  Branch (2787:13): [True: 0, False: 0]
  ------------------
 2788|      0|          sfx = se;  // BUG: sfx not stateless
 2789|      0|          return rv;
 2790|      0|        }
 2791|      0|      }
 2792|      0|    }
 2793|      0|    se = se->getNext();
 2794|      0|  }
 2795|       |
 2796|       |  // now handle the general case
 2797|   512M|  if (len == 0)
  ------------------
  |  Branch (2797:7): [True: 41.6k, False: 512M]
  ------------------
 2798|  41.6k|    return nullptr;  // FULLSTRIP
 2799|   512M|  unsigned char sp = word[start + len - 1];
 2800|   512M|  SfxEntry* sptr = sStart[sp];
 2801|       |
 2802|   512M|  while (sptr) {
  ------------------
  |  Branch (2802:10): [True: 357k, False: 512M]
  ------------------
 2803|   357k|    if (isRevSubset(sptr->getKey(), word.c_str() + start + len - 1, len)) {
  ------------------
  |  Branch (2803:9): [True: 300k, False: 56.7k]
  ------------------
 2804|       |      // suffixes are not allowed in beginning of compounds
 2805|   300k|      if ((((in_compound != IN_CPD_BEGIN)) ||  // && !cclass
  ------------------
  |  |   73|   300k|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (2805:12): [True: 73.5k, False: 227k]
  ------------------
 2806|       |           // except when signed with compoundpermitflag flag
 2807|   227k|           (sptr->getCont() && compoundpermitflag &&
  ------------------
  |  Branch (2807:13): [True: 227k, False: 0]
  |  Branch (2807:32): [True: 0, False: 227k]
  ------------------
 2808|      0|            TESTAFF(sptr->getCont(), compoundpermitflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2809|   227k|                    sptr->getContLen()))) &&
 2810|  73.5k|          (!circumfix ||
  ------------------
  |  Branch (2810:12): [True: 73.5k, False: 0]
  ------------------
 2811|       |           // no circumfix flag in prefix and suffix
 2812|      0|           ((!ppfx || !(ep->getCont()) ||
  ------------------
  |  Branch (2812:14): [True: 0, False: 0]
  |  Branch (2812:23): [True: 0, False: 0]
  ------------------
 2813|      0|             !TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2813:14): [True: 0, False: 0]
  ------------------
 2814|      0|            (!sptr->getCont() ||
  ------------------
  |  Branch (2814:14): [True: 0, False: 0]
  ------------------
 2815|      0|             !(TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())))) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2815:14): [True: 0, False: 0]
  ------------------
 2816|       |           // circumfix flag in prefix AND suffix
 2817|      0|           ((ppfx && (ep->getCont()) &&
  ------------------
  |  Branch (2817:14): [True: 0, False: 0]
  |  Branch (2817:22): [True: 0, False: 0]
  ------------------
 2818|      0|             TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2819|      0|            (sptr->getCont() &&
  ------------------
  |  Branch (2819:14): [True: 0, False: 0]
  ------------------
 2820|      0|             (TESTAFF(sptr->getCont(), circumfix, sptr->getContLen()))))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2820:14): [True: 0, False: 0]
  ------------------
 2821|       |          // fogemorpheme
 2822|  73.5k|          (in_compound ||
  ------------------
  |  Branch (2822:12): [True: 0, False: 73.5k]
  ------------------
 2823|  73.5k|           !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound,
  ------------------
  |  |   99|  28.9k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (2823:15): [True: 28.9k, False: 44.5k]
  |  Branch (2823:34): [True: 0, False: 28.9k]
  ------------------
 2824|  28.9k|                                          sptr->getContLen()))))) &&
 2825|       |          // needaffix on prefix or first suffix
 2826|  73.5k|          (cclass ||
  ------------------
  |  Branch (2826:12): [True: 3.42k, False: 70.1k]
  ------------------
 2827|  70.1k|           !(sptr->getCont() &&
  ------------------
  |  Branch (2827:14): [True: 28.9k, False: 41.1k]
  ------------------
 2828|  28.9k|             TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) ||
  ------------------
  |  |   99|  28.9k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 28.9k]
  |  |  ------------------
  ------------------
 2829|      0|           (ppfx &&
  ------------------
  |  Branch (2829:13): [True: 0, False: 0]
  ------------------
 2830|      0|            !((ep->getCont()) &&
  ------------------
  |  Branch (2830:15): [True: 0, False: 0]
  ------------------
 2831|      0|              TESTAFF(ep->getCont(), needaffix, ep->getContLen())))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2832|  73.5k|        if (in_compound != IN_CPD_END || ppfx ||
  ------------------
  |  |   74|   147k|#define IN_CPD_END 2
  ------------------
  |  Branch (2832:13): [True: 73.5k, False: 0]
  |  Branch (2832:42): [True: 0, False: 0]
  ------------------
 2833|      0|            !(sptr->getCont() &&
  ------------------
  |  Branch (2833:15): [True: 0, False: 0]
  ------------------
 2834|  73.5k|              TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2835|  73.5k|          rv = sptr->checkword(word, start, len, sfxopts, ppfx,
 2836|  73.5k|                               cclass, needflag,
 2837|  73.5k|                               (in_compound ? 0 : onlyincompound),
  ------------------
  |  Branch (2837:33): [True: 0, False: 73.5k]
  ------------------
 2838|  73.5k|                               scratch);
 2839|  73.5k|          if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   96|  73.5k|#define FLAG_NULL 0x00
  ------------------
                        if (rv && avoidflag != FLAG_NULL && TESTAFF(rv->astr, avoidflag, rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2839:15): [True: 0, False: 73.5k]
  |  Branch (2839:21): [True: 0, False: 0]
  ------------------
 2840|      0|            rv = nullptr;
 2841|  73.5k|          if (rv) {
  ------------------
  |  Branch (2841:15): [True: 0, False: 73.5k]
  ------------------
 2842|      0|            sfx = sptr;                 // BUG: sfx not stateless
 2843|      0|            sfxflag = sptr->getFlag();  // BUG: sfxflag not stateless
 2844|      0|            if (!sptr->getCont())
  ------------------
  |  Branch (2844:17): [True: 0, False: 0]
  ------------------
 2845|      0|              sfxappnd = sptr->getKey();  // BUG: sfxappnd not stateless
 2846|       |            // LANG_hu section: spec. Hungarian rule
 2847|      0|            else if (langnum == LANG_hu && sptr->getKeyLen() &&
  ------------------
  |  Branch (2847:22): [True: 0, False: 0]
  |  Branch (2847:44): [True: 0, False: 0]
  ------------------
 2848|      0|                     sptr->getKey()[0] == 'i' && sptr->getKey()[1] != 'y' &&
  ------------------
  |  Branch (2848:22): [True: 0, False: 0]
  |  Branch (2848:50): [True: 0, False: 0]
  ------------------
 2849|      0|                     sptr->getKey()[1] != 't') {
  ------------------
  |  Branch (2849:22): [True: 0, False: 0]
  ------------------
 2850|      0|              sfxextra = 1;
 2851|      0|            }
 2852|       |            // END of LANG_hu section
 2853|      0|            return rv;
 2854|      0|          }
 2855|  73.5k|        }
 2856|   300k|      sptr = sptr->getNextEQ();
 2857|   300k|    } else {
 2858|  56.7k|      sptr = sptr->getNextNE();
 2859|  56.7k|    }
 2860|   357k|  }
 2861|       |
 2862|   512M|  return nullptr;
 2863|   512M|}
_ZN8AffixMgr19suffix_check_twosfxERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntryR12AffixScratcht:
 2872|  15.7M|                                             const FLAG needflag) {
 2873|  15.7M|  struct hentry* rv = nullptr;
 2874|       |
 2875|       |  // first handle the special case of 0 length suffixes
 2876|  15.7M|  SfxEntry* se = sStart[0];
 2877|  15.7M|  while (se) {
  ------------------
  |  Branch (2877:10): [True: 0, False: 15.7M]
  ------------------
 2878|      0|    if (contclasses[se->getFlag()]) {
  ------------------
  |  Branch (2878:9): [True: 0, False: 0]
  ------------------
 2879|      0|      rv = se->check_twosfx(word, start, len, sfxopts, ppfx, needflag, scratch);
 2880|      0|      if (rv)
  ------------------
  |  Branch (2880:11): [True: 0, False: 0]
  ------------------
 2881|      0|        return rv;
 2882|      0|    }
 2883|      0|    se = se->getNext();
 2884|      0|  }
 2885|       |
 2886|       |  // now handle the general case
 2887|  15.7M|  if (len == 0)
  ------------------
  |  Branch (2887:7): [True: 12.7k, False: 15.7M]
  ------------------
 2888|  12.7k|    return nullptr;  // FULLSTRIP
 2889|  15.7M|  unsigned char sp = word[start + len - 1];
 2890|  15.7M|  SfxEntry* sptr = sStart[sp];
 2891|       |
 2892|  15.8M|  while (sptr) {
  ------------------
  |  Branch (2892:10): [True: 115k, False: 15.7M]
  ------------------
 2893|   115k|    if (isRevSubset(sptr->getKey(), word.c_str() + start + len - 1, len)) {
  ------------------
  |  Branch (2893:9): [True: 65.4k, False: 50.5k]
  ------------------
 2894|  65.4k|      if (contclasses[sptr->getFlag()]) {
  ------------------
  |  Branch (2894:11): [True: 36.4k, False: 28.9k]
  ------------------
 2895|  36.4k|        rv = sptr->check_twosfx(word, start, len, sfxopts, ppfx, needflag, scratch);
 2896|  36.4k|        if (rv) {
  ------------------
  |  Branch (2896:13): [True: 0, False: 36.4k]
  ------------------
 2897|      0|          sfxflag = sptr->getFlag();  // BUG: sfxflag not stateless
 2898|      0|          if (!sptr->getCont())
  ------------------
  |  Branch (2898:15): [True: 0, False: 0]
  ------------------
 2899|      0|            sfxappnd = sptr->getKey();  // BUG: sfxappnd not stateless
 2900|      0|          return rv;
 2901|      0|        }
 2902|  36.4k|      }
 2903|  65.4k|      sptr = sptr->getNextEQ();
 2904|  65.4k|    } else {
 2905|  50.5k|      sptr = sptr->getNextNE();
 2906|  50.5k|    }
 2907|   115k|  }
 2908|       |
 2909|  15.7M|  return nullptr;
 2910|  15.7M|}
_ZN8AffixMgr25suffix_check_twosfx_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntryR12AffixScratcht:
 2919|  3.36k|                                                const FLAG needflag) {
 2920|  3.36k|  std::string result;
 2921|  3.36k|  std::string result2;
 2922|  3.36k|  std::string result3;
 2923|       |
 2924|       |  // first handle the special case of 0 length suffixes
 2925|  3.36k|  SfxEntry* se = sStart[0];
 2926|  3.36k|  while (se) {
  ------------------
  |  Branch (2926:10): [True: 0, False: 3.36k]
  ------------------
 2927|      0|    if (contclasses[se->getFlag()]) {
  ------------------
  |  Branch (2927:9): [True: 0, False: 0]
  ------------------
 2928|      0|      std::string st = se->check_twosfx_morph(word, start, len, sfxopts, ppfx, needflag, scratch);
 2929|      0|      if (!st.empty()) {
  ------------------
  |  Branch (2929:11): [True: 0, False: 0]
  ------------------
 2930|      0|        if (ppfx) {
  ------------------
  |  Branch (2930:13): [True: 0, False: 0]
  ------------------
 2931|      0|          if (ppfx->getMorph()) {
  ------------------
  |  Branch (2931:15): [True: 0, False: 0]
  ------------------
 2932|      0|            result.append(ppfx->getMorph());
 2933|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2934|      0|          } else
 2935|      0|            debugflag(result, ppfx->getFlag());
 2936|      0|        }
 2937|      0|        result.append(st);
 2938|      0|        if (se->getMorph()) {
  ------------------
  |  Branch (2938:13): [True: 0, False: 0]
  ------------------
 2939|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2940|      0|          result.append(se->getMorph());
 2941|      0|        } else
 2942|      0|          debugflag(result, se->getFlag());
 2943|      0|        result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2944|      0|      }
 2945|      0|    }
 2946|      0|    se = se->getNext();
 2947|      0|  }
 2948|       |
 2949|       |  // now handle the general case
 2950|  3.36k|  if (len == 0)
  ------------------
  |  Branch (2950:7): [True: 0, False: 3.36k]
  ------------------
 2951|      0|    return { };  // FULLSTRIP
 2952|  3.36k|  unsigned char sp = word[start + len - 1];
 2953|  3.36k|  SfxEntry* sptr = sStart[sp];
 2954|       |
 2955|  3.37k|  while (sptr) {
  ------------------
  |  Branch (2955:10): [True: 5, False: 3.36k]
  ------------------
 2956|      5|    if (isRevSubset(sptr->getKey(), word.c_str() + start + len - 1, len)) {
  ------------------
  |  Branch (2956:9): [True: 1, False: 4]
  ------------------
 2957|      1|      if (contclasses[sptr->getFlag()]) {
  ------------------
  |  Branch (2957:11): [True: 0, False: 1]
  ------------------
 2958|      0|        std::string st = sptr->check_twosfx_morph(word, start, len, sfxopts, ppfx, needflag, scratch);
 2959|      0|        if (!st.empty()) {
  ------------------
  |  Branch (2959:13): [True: 0, False: 0]
  ------------------
 2960|      0|          sfxflag = sptr->getFlag();  // BUG: sfxflag not stateless
 2961|      0|          if (!sptr->getCont())
  ------------------
  |  Branch (2961:15): [True: 0, False: 0]
  ------------------
 2962|      0|            sfxappnd = sptr->getKey();  // BUG: sfxappnd not stateless
 2963|      0|          result2.assign(st);
 2964|       |
 2965|      0|          result3.clear();
 2966|       |
 2967|      0|          if (sptr->getMorph()) {
  ------------------
  |  Branch (2967:15): [True: 0, False: 0]
  ------------------
 2968|      0|            result3.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 2969|      0|            result3.append(sptr->getMorph());
 2970|      0|          } else
 2971|      0|            debugflag(result3, sptr->getFlag());
 2972|      0|          strlinecat(result2, result3);
 2973|      0|          result2.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2974|      0|          result.append(result2);
 2975|      0|        }
 2976|      0|      }
 2977|      1|      sptr = sptr->getNextEQ();
 2978|      4|    } else {
 2979|      4|      sptr = sptr->getNextNE();
 2980|      4|    }
 2981|      5|  }
 2982|       |
 2983|  3.36k|  return result;
 2984|  3.36k|}
_ZN8AffixMgr18suffix_check_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiiP8PfxEntryR12AffixScratchttc:
 2994|  10.7k|                                         char in_compound) {
 2995|  10.7k|  std::string result;
 2996|       |
 2997|  10.7k|  struct hentry* rv = nullptr;
 2998|       |
 2999|  10.7k|  PfxEntry* ep = ppfx;
 3000|       |
 3001|       |  // first handle the special case of 0 length suffixes
 3002|  10.7k|  SfxEntry* se = sStart[0];
 3003|  10.7k|  while (se) {
  ------------------
  |  Branch (3003:10): [True: 0, False: 10.7k]
  ------------------
 3004|      0|    if (!cclass || se->getCont()) {
  ------------------
  |  Branch (3004:9): [True: 0, False: 0]
  |  Branch (3004:20): [True: 0, False: 0]
  ------------------
 3005|       |      // suffixes are not allowed in beginning of compounds
 3006|      0|      if (((((in_compound != IN_CPD_BEGIN)) ||  // && !cclass
  ------------------
  |  |   73|      0|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (3006:13): [True: 0, False: 0]
  ------------------
 3007|       |            // except when signed with compoundpermitflag flag
 3008|      0|            (se->getCont() && compoundpermitflag &&
  ------------------
  |  Branch (3008:14): [True: 0, False: 0]
  |  Branch (3008:31): [True: 0, False: 0]
  ------------------
 3009|      0|             TESTAFF(se->getCont(), compoundpermitflag, se->getContLen()))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3010|      0|           (!circumfix ||
  ------------------
  |  Branch (3010:13): [True: 0, False: 0]
  ------------------
 3011|       |            // no circumfix flag in prefix and suffix
 3012|      0|            ((!ppfx || !(ep->getCont()) ||
  ------------------
  |  Branch (3012:15): [True: 0, False: 0]
  |  Branch (3012:24): [True: 0, False: 0]
  ------------------
 3013|      0|              !TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3013:15): [True: 0, False: 0]
  ------------------
 3014|      0|             (!se->getCont() ||
  ------------------
  |  Branch (3014:15): [True: 0, False: 0]
  ------------------
 3015|      0|              !(TESTAFF(se->getCont(), circumfix, se->getContLen())))) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3015:15): [True: 0, False: 0]
  ------------------
 3016|       |            // circumfix flag in prefix AND suffix
 3017|      0|            ((ppfx && (ep->getCont()) &&
  ------------------
  |  Branch (3017:15): [True: 0, False: 0]
  |  Branch (3017:23): [True: 0, False: 0]
  ------------------
 3018|      0|              TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3019|      0|             (se->getCont() &&
  ------------------
  |  Branch (3019:15): [True: 0, False: 0]
  ------------------
 3020|      0|              (TESTAFF(se->getCont(), circumfix, se->getContLen()))))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3020:15): [True: 0, False: 0]
  ------------------
 3021|       |           // fogemorpheme
 3022|      0|           (in_compound ||
  ------------------
  |  Branch (3022:13): [True: 0, False: 0]
  ------------------
 3023|      0|            !((se->getCont() &&
  ------------------
  |  Branch (3023:16): [True: 0, False: 0]
  ------------------
 3024|      0|               (TESTAFF(se->getCont(), onlyincompound, se->getContLen()))))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3024:16): [True: 0, False: 0]
  ------------------
 3025|       |           // needaffix on prefix or first suffix
 3026|      0|           (cclass ||
  ------------------
  |  Branch (3026:13): [True: 0, False: 0]
  ------------------
 3027|      0|            !(se->getCont() &&
  ------------------
  |  Branch (3027:15): [True: 0, False: 0]
  ------------------
 3028|      0|              TESTAFF(se->getCont(), needaffix, se->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3029|      0|            (ppfx &&
  ------------------
  |  Branch (3029:14): [True: 0, False: 0]
  ------------------
 3030|      0|             !((ep->getCont()) &&
  ------------------
  |  Branch (3030:16): [True: 0, False: 0]
  ------------------
 3031|      0|               TESTAFF(ep->getCont(), needaffix, ep->getContLen()))))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3032|      0|        rv = se->checkword(word, start, len, sfxopts, ppfx, cclass,
 3033|      0|                           needflag, FLAG_NULL, scratch);
  ------------------
  |  |   96|      0|#define FLAG_NULL 0x00
  ------------------
 3034|      0|      while (rv) {
  ------------------
  |  Branch (3034:14): [True: 0, False: 0]
  ------------------
 3035|      0|        if (ppfx) {
  ------------------
  |  Branch (3035:13): [True: 0, False: 0]
  ------------------
 3036|      0|          if (ppfx->getMorph()) {
  ------------------
  |  Branch (3036:15): [True: 0, False: 0]
  ------------------
 3037|      0|            result.append(ppfx->getMorph());
 3038|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3039|      0|          } else
 3040|      0|            debugflag(result, ppfx->getFlag());
 3041|      0|        }
 3042|      0|        if (complexprefixes && HENTRY_DATA(rv))
  ------------------
  |  Branch (3042:13): [True: 0, False: 0]
  |  Branch (3042:32): [True: 0, False: 0]
  ------------------
 3043|      0|          result.append(HENTRY_DATA2(rv));
 3044|      0|        if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (3044:13): [True: 0, False: 0]
  ------------------
 3045|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3046|      0|          result.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 3047|      0|          result.append(HENTRY_WORD(rv));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 3048|      0|        }
 3049|       |
 3050|      0|        if (!complexprefixes && HENTRY_DATA(rv)) {
  ------------------
  |  Branch (3050:13): [True: 0, False: 0]
  |  Branch (3050:33): [True: 0, False: 0]
  ------------------
 3051|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3052|      0|          result.append(HENTRY_DATA2(rv));
 3053|      0|        }
 3054|      0|        if (se->getMorph()) {
  ------------------
  |  Branch (3054:13): [True: 0, False: 0]
  ------------------
 3055|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3056|      0|          result.append(se->getMorph());
 3057|      0|        } else
 3058|      0|          debugflag(result, se->getFlag());
 3059|      0|        result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 3060|      0|        rv = se->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag);
 3061|      0|      }
 3062|      0|    }
 3063|      0|    se = se->getNext();
 3064|      0|  }
 3065|       |
 3066|       |  // now handle the general case
 3067|  10.7k|  if (len == 0)
  ------------------
  |  Branch (3067:7): [True: 0, False: 10.7k]
  ------------------
 3068|      0|    return { };  // FULLSTRIP
 3069|  10.7k|  unsigned char sp = word[start + len - 1];
 3070|  10.7k|  SfxEntry* sptr = sStart[sp];
 3071|       |
 3072|  10.7k|  while (sptr) {
  ------------------
  |  Branch (3072:10): [True: 6, False: 10.7k]
  ------------------
 3073|      6|    if (isRevSubset(sptr->getKey(), word.c_str() + start + len - 1, len)) {
  ------------------
  |  Branch (3073:9): [True: 2, False: 4]
  ------------------
 3074|       |      // suffixes are not allowed in beginning of compounds
 3075|      2|      if (((((in_compound != IN_CPD_BEGIN)) ||  // && !cclass
  ------------------
  |  |   73|      2|#define IN_CPD_BEGIN 1
  ------------------
  |  Branch (3075:13): [True: 2, False: 0]
  ------------------
 3076|       |            // except when signed with compoundpermitflag flag
 3077|      0|            (sptr->getCont() && compoundpermitflag &&
  ------------------
  |  Branch (3077:14): [True: 0, False: 0]
  |  Branch (3077:33): [True: 0, False: 0]
  ------------------
 3078|      0|             TESTAFF(sptr->getCont(), compoundpermitflag,
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3079|      0|                     sptr->getContLen()))) &&
 3080|      2|           (!circumfix ||
  ------------------
  |  Branch (3080:13): [True: 2, False: 0]
  ------------------
 3081|       |            // no circumfix flag in prefix and suffix
 3082|      0|            ((!ppfx || !(ep->getCont()) ||
  ------------------
  |  Branch (3082:15): [True: 0, False: 0]
  |  Branch (3082:24): [True: 0, False: 0]
  ------------------
 3083|      0|              !TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3083:15): [True: 0, False: 0]
  ------------------
 3084|      0|             (!sptr->getCont() ||
  ------------------
  |  Branch (3084:15): [True: 0, False: 0]
  ------------------
 3085|      0|              !(TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())))) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3085:15): [True: 0, False: 0]
  ------------------
 3086|       |            // circumfix flag in prefix AND suffix
 3087|      0|            ((ppfx && (ep->getCont()) &&
  ------------------
  |  Branch (3087:15): [True: 0, False: 0]
  |  Branch (3087:23): [True: 0, False: 0]
  ------------------
 3088|      0|              TESTAFF(ep->getCont(), circumfix, ep->getContLen())) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3089|      0|             (sptr->getCont() &&
  ------------------
  |  Branch (3089:15): [True: 0, False: 0]
  ------------------
 3090|      0|              (TESTAFF(sptr->getCont(), circumfix, sptr->getContLen()))))) &&
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3090:15): [True: 0, False: 0]
  ------------------
 3091|       |           // fogemorpheme
 3092|      2|           (in_compound ||
  ------------------
  |  Branch (3092:13): [True: 0, False: 2]
  ------------------
 3093|      2|            !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound,
  ------------------
  |  |   99|      1|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  ------------------
  |  Branch (3093:16): [True: 1, False: 1]
  |  Branch (3093:35): [True: 0, False: 1]
  ------------------
 3094|      1|                                           sptr->getContLen()))))) &&
 3095|       |           // needaffix on first suffix
 3096|      2|           (cclass ||
  ------------------
  |  Branch (3096:13): [True: 0, False: 2]
  ------------------
 3097|      2|            !(sptr->getCont() &&
  ------------------
  |  Branch (3097:15): [True: 1, False: 1]
  ------------------
 3098|      1|              TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())))))
  ------------------
  |  |   99|      1|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 1]
  |  |  ------------------
  ------------------
 3099|      2|        rv = sptr->checkword(word, start, len, sfxopts, ppfx, cclass,
 3100|      2|                             needflag, FLAG_NULL, scratch);
  ------------------
  |  |   96|      2|#define FLAG_NULL 0x00
  ------------------
 3101|      2|      while (rv) {
  ------------------
  |  Branch (3101:14): [True: 0, False: 2]
  ------------------
 3102|      0|        if (ppfx) {
  ------------------
  |  Branch (3102:13): [True: 0, False: 0]
  ------------------
 3103|      0|          if (ppfx->getMorph()) {
  ------------------
  |  Branch (3103:15): [True: 0, False: 0]
  ------------------
 3104|      0|            result.append(ppfx->getMorph());
 3105|      0|            result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3106|      0|          } else
 3107|      0|            debugflag(result, ppfx->getFlag());
 3108|      0|        }
 3109|      0|        if (complexprefixes && HENTRY_DATA(rv))
  ------------------
  |  Branch (3109:13): [True: 0, False: 0]
  |  Branch (3109:32): [True: 0, False: 0]
  ------------------
 3110|      0|          result.append(HENTRY_DATA2(rv));
 3111|      0|        if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
  |  Branch (3111:13): [True: 0, False: 0]
  ------------------
 3112|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3113|      0|          result.append(MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 3114|      0|          result.append(HENTRY_WORD(rv));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 3115|      0|        }
 3116|       |
 3117|      0|        if (!complexprefixes && HENTRY_DATA(rv)) {
  ------------------
  |  Branch (3117:13): [True: 0, False: 0]
  |  Branch (3117:33): [True: 0, False: 0]
  ------------------
 3118|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3119|      0|          result.append(HENTRY_DATA2(rv));
 3120|      0|        }
 3121|       |
 3122|      0|        if (sptr->getMorph()) {
  ------------------
  |  Branch (3122:13): [True: 0, False: 0]
  ------------------
 3123|      0|          result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 3124|      0|          result.append(sptr->getMorph());
 3125|      0|        } else
 3126|      0|          debugflag(result, sptr->getFlag());
 3127|      0|        result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 3128|      0|        rv = sptr->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag);
 3129|      0|      }
 3130|      2|      sptr = sptr->getNextEQ();
 3131|      4|    } else {
 3132|      4|      sptr = sptr->getNextNE();
 3133|      4|    }
 3134|      6|  }
 3135|       |
 3136|  10.7k|  return result;
 3137|  10.7k|}
_ZN8AffixMgr11affix_checkERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiR12AffixScratchtct:
 3146|  15.8M|                                     const FLAG avoidflag) {
 3147|       |
 3148|       |  // check all prefixes (also crossed with suffixes if allowed)
 3149|  15.8M|  struct hentry* rv = prefix_check(word, start, len, in_compound, scratch, needflag, avoidflag);
 3150|  15.8M|  if (rv)
  ------------------
  |  Branch (3150:7): [True: 0, False: 15.8M]
  ------------------
 3151|      0|    return rv;
 3152|       |
 3153|       |  // if still not found check all suffixes
 3154|  15.8M|  rv = suffix_check(word, start, len, 0, nullptr, scratch, FLAG_NULL, needflag, in_compound, avoidflag);
  ------------------
  |  |   96|  15.8M|#define FLAG_NULL 0x00
  ------------------
 3155|       |
 3156|  15.8M|  if (havecontclass) {
  ------------------
  |  Branch (3156:7): [True: 5.32M, False: 10.5M]
  ------------------
 3157|  5.32M|    sfx = nullptr;
 3158|  5.32M|    pfx = nullptr;
 3159|       |
 3160|  5.32M|    if (rv)
  ------------------
  |  Branch (3160:9): [True: 0, False: 5.32M]
  ------------------
 3161|      0|      return rv;
 3162|       |    // if still not found check all two-level suffixes
 3163|  5.32M|    rv = suffix_check_twosfx(word, start, len, 0, nullptr, scratch, needflag);
 3164|       |
 3165|  5.32M|    if (rv)
  ------------------
  |  Branch (3165:9): [True: 0, False: 5.32M]
  ------------------
 3166|      0|      return rv;
 3167|       |    // if still not found check all two-level suffixes
 3168|  5.32M|    rv = prefix_check_twosfx(word, start, len, IN_CPD_NOT, scratch, needflag);
  ------------------
  |  |   72|  5.32M|#define IN_CPD_NOT 0
  ------------------
 3169|  5.32M|  }
 3170|       |
 3171|  15.8M|  return rv;
 3172|  15.8M|}
_ZN8AffixMgr17affix_check_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiR12AffixScratchtc:
 3180|  10.7k|                                  char in_compound) {
 3181|  10.7k|  std::string result;
 3182|       |
 3183|       |  // check all prefixes (also crossed with suffixes if allowed)
 3184|  10.7k|  std::string st = prefix_check_morph(word, start, len, in_compound, scratch);
 3185|  10.7k|  if (!st.empty()) {
  ------------------
  |  Branch (3185:7): [True: 0, False: 10.7k]
  ------------------
 3186|      0|    result.append(st);
 3187|      0|  }
 3188|       |
 3189|       |  // if still not found check all suffixes
 3190|  10.7k|  st = suffix_check_morph(word, start, len, 0, nullptr, scratch, '\0', needflag, in_compound);
 3191|  10.7k|  if (!st.empty()) {
  ------------------
  |  Branch (3191:7): [True: 0, False: 10.7k]
  ------------------
 3192|      0|    result.append(st);
 3193|      0|  }
 3194|       |
 3195|  10.7k|  if (havecontclass) {
  ------------------
  |  Branch (3195:7): [True: 3.36k, False: 7.42k]
  ------------------
 3196|  3.36k|    sfx = nullptr;
 3197|  3.36k|    pfx = nullptr;
 3198|       |    // if still not found check all two-level suffixes
 3199|  3.36k|    st = suffix_check_twosfx_morph(word, start, len, 0, nullptr, scratch, needflag);
 3200|  3.36k|    if (!st.empty()) {
  ------------------
  |  Branch (3200:9): [True: 0, False: 3.36k]
  ------------------
 3201|      0|      result.append(st);
 3202|      0|    }
 3203|       |
 3204|       |    // if still not found check all two-level suffixes
 3205|  3.36k|    st = prefix_check_twosfx_morph(word, start, len, IN_CPD_NOT, scratch, needflag);
  ------------------
  |  |   72|  3.36k|#define IN_CPD_NOT 0
  ------------------
 3206|  3.36k|    if (!st.empty()) {
  ------------------
  |  Branch (3206:9): [True: 0, False: 3.36k]
  ------------------
 3207|      0|      result.append(st);
 3208|      0|    }
 3209|  3.36k|  }
 3210|       |
 3211|  10.7k|  return result;
 3212|  10.7k|}
_ZN8AffixMgr15expand_rootwordEP9guesswordiPKciPKttS3_iS3_:
 3408|   529k|                              const char* phon) {
 3409|   529k|  int nh = 0;
 3410|       |  // first add root word to list
 3411|   529k|  if ((nh < maxn) &&
  ------------------
  |  Branch (3411:7): [True: 529k, False: 0]
  ------------------
 3412|   529k|      !(al && ((needaffix && TESTAFF(ap, needaffix, al)) ||
  ------------------
  |  |   99|  4.29k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 2.14k, False: 2.14k]
  |  |  ------------------
  ------------------
  |  Branch (3412:9): [True: 93.2k, False: 436k]
  |  Branch (3412:17): [True: 4.29k, False: 88.9k]
  ------------------
 3413|   527k|               (onlyincompound && TESTAFF(ap, onlyincompound, al))))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (3413:17): [True: 0, False: 91.1k]
  ------------------
 3414|   527k|    wlst[nh].word = mystrdup(ts);
 3415|   527k|    wlst[nh].allow = false;
 3416|   527k|    wlst[nh].orig = nullptr;
 3417|   527k|    nh++;
 3418|       |    // add special phonetic version
 3419|   527k|    if (phon && (nh < maxn)) {
  ------------------
  |  Branch (3419:9): [True: 817, False: 526k]
  |  Branch (3419:17): [True: 817, False: 0]
  ------------------
 3420|    817|      wlst[nh].word = mystrdup(phon);
 3421|    817|      wlst[nh].allow = false;
 3422|    817|      wlst[nh].orig = mystrdup(ts);
 3423|    817|      nh++;
 3424|    817|    }
 3425|   527k|  }
 3426|       |
 3427|       |  // handle suffixes
 3428|   634k|  for (int i = 0; i < al; i++) {
  ------------------
  |  Branch (3428:19): [True: 104k, False: 529k]
  ------------------
 3429|   104k|    const auto c = (unsigned char)(ap[i] & 0x00FF);
 3430|   104k|    SfxEntry* sptr = sFlag[c];
 3431|   166k|    while (sptr) {
  ------------------
  |  Branch (3431:12): [True: 62.1k, False: 104k]
  ------------------
 3432|  62.1k|      if ((sptr->getFlag() == ap[i]) &&
  ------------------
  |  Branch (3432:11): [True: 62.1k, False: 0]
  ------------------
 3433|  62.1k|          (!sptr->getKeyLen() ||
  ------------------
  |  Branch (3433:12): [True: 0, False: 62.1k]
  ------------------
 3434|  62.1k|           ((badl > sptr->getKeyLen()) &&
  ------------------
  |  Branch (3434:13): [True: 34.6k, False: 27.4k]
  ------------------
 3435|  34.6k|            (strcmp(sptr->getAffix(), bad + badl - sptr->getKeyLen()) == 0))) &&
  ------------------
  |  Branch (3435:13): [True: 28, False: 34.6k]
  ------------------
 3436|       |          // check needaffix flag
 3437|     28|          !(sptr->getCont() &&
  ------------------
  |  Branch (3437:13): [True: 15, False: 13]
  ------------------
 3438|     15|            ((needaffix &&
  ------------------
  |  Branch (3438:15): [True: 10, False: 5]
  ------------------
 3439|     10|              TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) ||
  ------------------
  |  |   99|     10|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 10]
  |  |  ------------------
  ------------------
 3440|     15|             (circumfix &&
  ------------------
  |  Branch (3440:15): [True: 0, False: 15]
  ------------------
 3441|      0|              TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3442|     15|             (onlyincompound &&
  ------------------
  |  Branch (3442:15): [True: 0, False: 15]
  ------------------
 3443|     28|              TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3444|     28|        std::string newword = sptr->add(ts, wl);
 3445|     28|        if (!newword.empty()) {
  ------------------
  |  Branch (3445:13): [True: 28, False: 0]
  ------------------
 3446|     28|          if (nh < maxn) {
  ------------------
  |  Branch (3446:15): [True: 28, False: 0]
  ------------------
 3447|     28|            wlst[nh].word = mystrdup(newword.c_str());
 3448|     28|            wlst[nh].allow = sptr->allowCross();
 3449|     28|            wlst[nh].orig = nullptr;
 3450|     28|            nh++;
 3451|       |            // add special phonetic version
 3452|     28|            if (phon && (nh < maxn)) {
  ------------------
  |  Branch (3452:17): [True: 0, False: 28]
  |  Branch (3452:25): [True: 0, False: 0]
  ------------------
 3453|      0|              std::string prefix(phon);
 3454|      0|              std::string key(sptr->getKey());
 3455|      0|              reverseword(key);
 3456|      0|              prefix.append(key);
 3457|      0|              wlst[nh].word = mystrdup(prefix.c_str());
 3458|      0|              wlst[nh].allow = false;
 3459|      0|              wlst[nh].orig = mystrdup(newword.c_str());
 3460|      0|              nh++;
 3461|      0|            }
 3462|     28|          }
 3463|     28|        }
 3464|     28|      }
 3465|  62.1k|      sptr = sptr->getFlgNxt();
 3466|  62.1k|    }
 3467|   104k|  }
 3468|       |
 3469|   529k|  int n = nh;
 3470|       |
 3471|       |  // handle cross products of prefixes and suffixes
 3472|   530k|  for (int j = 1; j < n; j++)
  ------------------
  |  Branch (3472:19): [True: 835, False: 529k]
  ------------------
 3473|    835|    if (wlst[j].allow) {
  ------------------
  |  Branch (3473:9): [True: 18, False: 817]
  ------------------
 3474|     54|      for (int k = 0; k < al; k++) {
  ------------------
  |  Branch (3474:23): [True: 36, False: 18]
  ------------------
 3475|     36|        const auto c = (unsigned char)(ap[k] & 0x00FF);
 3476|     36|        PfxEntry* cptr = pFlag[c];
 3477|     36|        while (cptr) {
  ------------------
  |  Branch (3477:16): [True: 0, False: 36]
  ------------------
 3478|      0|          if ((cptr->getFlag() == ap[k]) && cptr->allowCross() &&
  ------------------
  |  Branch (3478:15): [True: 0, False: 0]
  |  Branch (3478:45): [True: 0, False: 0]
  ------------------
 3479|      0|              (!cptr->getKeyLen() ||
  ------------------
  |  Branch (3479:16): [True: 0, False: 0]
  ------------------
 3480|      0|               ((badl > cptr->getKeyLen()) &&
  ------------------
  |  Branch (3480:17): [True: 0, False: 0]
  ------------------
 3481|      0|                (strncmp(cptr->getKey(), bad, cptr->getKeyLen()) == 0)))) {
  ------------------
  |  Branch (3481:17): [True: 0, False: 0]
  ------------------
 3482|      0|            int l1 = strlen(wlst[j].word);
 3483|      0|            std::string newword = cptr->add(wlst[j].word, l1);
 3484|      0|            if (!newword.empty()) {
  ------------------
  |  Branch (3484:17): [True: 0, False: 0]
  ------------------
 3485|      0|              if (nh < maxn) {
  ------------------
  |  Branch (3485:19): [True: 0, False: 0]
  ------------------
 3486|      0|                wlst[nh].word = mystrdup(newword.c_str());
 3487|      0|                wlst[nh].allow = cptr->allowCross();
 3488|      0|                wlst[nh].orig = nullptr;
 3489|      0|                nh++;
 3490|      0|              }
 3491|      0|            }
 3492|      0|          }
 3493|      0|          cptr = cptr->getFlgNxt();
 3494|      0|        }
 3495|     36|      }
 3496|     18|    }
 3497|       |
 3498|       |  // now handle pure prefixes
 3499|   634k|  for (int m = 0; m < al; m++) {
  ------------------
  |  Branch (3499:19): [True: 104k, False: 529k]
  ------------------
 3500|   104k|    const auto c = (unsigned char)(ap[m] & 0x00FF);
 3501|   104k|    PfxEntry* ptr = pFlag[c];
 3502|   105k|    while (ptr) {
  ------------------
  |  Branch (3502:12): [True: 831, False: 104k]
  ------------------
 3503|    831|      if ((ptr->getFlag() == ap[m]) &&
  ------------------
  |  Branch (3503:11): [True: 831, False: 0]
  ------------------
 3504|    831|          (!ptr->getKeyLen() ||
  ------------------
  |  Branch (3504:12): [True: 0, False: 831]
  ------------------
 3505|    831|           ((badl > ptr->getKeyLen()) &&
  ------------------
  |  Branch (3505:13): [True: 831, False: 0]
  ------------------
 3506|    831|            (strncmp(ptr->getKey(), bad, ptr->getKeyLen()) == 0))) &&
  ------------------
  |  Branch (3506:13): [True: 11, False: 820]
  ------------------
 3507|       |          // check needaffix flag
 3508|     11|          !(ptr->getCont() &&
  ------------------
  |  Branch (3508:13): [True: 0, False: 11]
  ------------------
 3509|      0|            ((needaffix &&
  ------------------
  |  Branch (3509:15): [True: 0, False: 0]
  ------------------
 3510|      0|              TESTAFF(ptr->getCont(), needaffix, ptr->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3511|      0|             (circumfix &&
  ------------------
  |  Branch (3511:15): [True: 0, False: 0]
  ------------------
 3512|      0|              TESTAFF(ptr->getCont(), circumfix, ptr->getContLen())) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3513|      0|             (onlyincompound &&
  ------------------
  |  Branch (3513:15): [True: 0, False: 0]
  ------------------
 3514|     11|              TESTAFF(ptr->getCont(), onlyincompound, ptr->getContLen()))))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3515|     11|        std::string newword = ptr->add(ts, wl);
 3516|     11|        if (!newword.empty()) {
  ------------------
  |  Branch (3516:13): [True: 11, False: 0]
  ------------------
 3517|     11|          if (nh < maxn) {
  ------------------
  |  Branch (3517:15): [True: 11, False: 0]
  ------------------
 3518|     11|            wlst[nh].word = mystrdup(newword.c_str());
 3519|     11|            wlst[nh].allow = ptr->allowCross();
 3520|     11|            wlst[nh].orig = nullptr;
 3521|     11|            nh++;
 3522|     11|          }
 3523|     11|        }
 3524|     11|      }
 3525|    831|      ptr = ptr->getFlgNxt();
 3526|    831|    }
 3527|   104k|  }
 3528|       |
 3529|   529k|  return nh;
 3530|   529k|}
_ZNK8AffixMgr12get_reptableEv:
 3533|   362k|const std::vector<replentry>& AffixMgr::get_reptable() const {
 3534|   362k|  return pHMgr->get_reptable();
 3535|   362k|}
_ZNK8AffixMgr14get_iconvtableEv:
 3538|  13.3M|RepList* AffixMgr::get_iconvtable() const {
 3539|  13.3M|  if (!iconvtable)
  ------------------
  |  Branch (3539:7): [True: 12.9M, False: 418k]
  ------------------
 3540|  12.9M|    return nullptr;
 3541|   418k|  return iconvtable;
 3542|  13.3M|}
_ZNK8AffixMgr14get_oconvtableEv:
 3545|  96.1k|RepList* AffixMgr::get_oconvtable() const {
 3546|  96.1k|  if (!oconvtable)
  ------------------
  |  Branch (3546:7): [True: 90.9k, False: 5.15k]
  ------------------
 3547|  90.9k|    return nullptr;
 3548|  5.15k|  return oconvtable;
 3549|  96.1k|}
_ZNK8AffixMgr14get_phonetableEv:
 3552|  59.9k|struct phonetable* AffixMgr::get_phonetable() const {
 3553|  59.9k|  if (!phone)
  ------------------
  |  Branch (3553:7): [True: 56.4k, False: 3.42k]
  ------------------
 3554|  56.4k|    return nullptr;
 3555|  3.42k|  return phone;
 3556|  59.9k|}
_ZNK8AffixMgr12get_maptableEv:
 3559|   362k|const std::vector<mapentry>& AffixMgr::get_maptable() const {
 3560|   362k|  return maptable;
 3561|   362k|}
_ZNK8AffixMgr14get_breaktableEv:
 3564|     38|const std::vector<std::string>& AffixMgr::get_breaktable() const {
 3565|     38|  return breaktable;
 3566|     38|}
_ZN8AffixMgr12get_encodingEv:
 3569|     78|const std::string& AffixMgr::get_encoding() {
 3570|     78|  if (encoding.empty())
  ------------------
  |  Branch (3570:7): [True: 20, False: 58]
  ------------------
 3571|     20|    encoding = SPELL_ENCODING;
  ------------------
  |  |   99|     20|#define SPELL_ENCODING "ISO8859-1"
  ------------------
 3572|     78|  return encoding;
 3573|     78|}
_ZNK8AffixMgr11get_langnumEv:
 3576|     76|int AffixMgr::get_langnum() const {
 3577|     76|  return langnum;
 3578|     76|}
_ZNK8AffixMgr19get_complexprefixesEv:
 3581|     76|int AffixMgr::get_complexprefixes() const {
 3582|     76|  return complexprefixes;
 3583|     76|}
_ZNK8AffixMgr13get_fullstripEv:
 3586|  6.89k|int AffixMgr::get_fullstrip() const {
 3587|  6.89k|  return fullstrip;
 3588|  6.89k|}
_ZNK8AffixMgr12get_keepcaseEv:
 3590|  98.8k|FLAG AffixMgr::get_keepcase() const {
 3591|  98.8k|  return keepcase;
 3592|  98.8k|}
_ZNK8AffixMgr14get_forceucaseEv:
 3594|  20.5k|FLAG AffixMgr::get_forceucase() const {
 3595|  20.5k|  return forceucase;
 3596|  20.5k|}
_ZNK8AffixMgr8get_warnEv:
 3598|   119k|FLAG AffixMgr::get_warn() const {
 3599|   119k|  return warn;
 3600|   119k|}
_ZNK8AffixMgr14get_forbidwarnEv:
 3602|      6|int AffixMgr::get_forbidwarn() const {
 3603|      6|  return forbidwarn;
 3604|      6|}
_ZNK8AffixMgr15get_checksharpsEv:
 3606|   323k|int AffixMgr::get_checksharps() const {
 3607|   323k|  return checksharps;
 3608|   323k|}
_ZNK8AffixMgr10get_ignoreEv:
 3615|  29.2M|const char* AffixMgr::get_ignore() const {
 3616|  29.2M|  if (ignorechars.empty())
  ------------------
  |  Branch (3616:7): [True: 26.4M, False: 2.84M]
  ------------------
 3617|  26.4M|    return nullptr;
 3618|  2.84M|  return ignorechars.c_str();
 3619|  29.2M|}
_ZNK8AffixMgr16get_ignore_utf16Ev:
 3622|   684k|const std::vector<w_char>& AffixMgr::get_ignore_utf16() const {
 3623|   684k|  return ignorechars_utf16;
 3624|   684k|}
_ZN8AffixMgr14get_key_stringEv:
 3627|     38|const std::string& AffixMgr::get_key_string() {
 3628|     38|  if (keystring.empty())
  ------------------
  |  Branch (3628:7): [True: 38, False: 0]
  ------------------
 3629|     38|    keystring = SPELL_KEYSTRING;
  ------------------
  |  |  100|     38|#define SPELL_KEYSTRING "qwertyuiop|asdfghjkl|zxcvbnm"
  ------------------
 3630|     38|  return keystring;
 3631|     38|}
_ZNK8AffixMgr14get_try_stringEv:
 3634|     38|const std::string& AffixMgr::get_try_string() const {
 3635|     38|  return trystring;
 3636|     38|}
_ZNK8AffixMgr12get_compoundEv:
 3648|  71.6M|int AffixMgr::get_compound() const {
 3649|  71.6M|  return compoundflag || compoundbegin || !defcpdtable.empty();
  ------------------
  |  Branch (3649:10): [True: 17.8M, False: 53.8M]
  |  Branch (3649:26): [True: 0, False: 53.8M]
  |  Branch (3649:43): [True: 0, False: 53.8M]
  ------------------
 3650|  71.6M|}
_ZNK8AffixMgr16get_compoundflagEv:
 3653|  60.8k|FLAG AffixMgr::get_compoundflag() const {
 3654|  60.8k|  return compoundflag;
 3655|  60.8k|}
_ZNK8AffixMgr17get_forbiddenwordEv:
 3658|   155k|FLAG AffixMgr::get_forbiddenword() const {
 3659|   155k|  return forbiddenword;
 3660|   155k|}
_ZNK8AffixMgr13get_nosuggestEv:
 3663|  60.1k|FLAG AffixMgr::get_nosuggest() const {
 3664|  60.1k|  return nosuggest;
 3665|  60.1k|}
_ZNK8AffixMgr18get_nongramsuggestEv:
 3668|  59.9k|FLAG AffixMgr::get_nongramsuggest() const {
 3669|  59.9k|  return nongramsuggest;
 3670|  59.9k|}
_ZNK8AffixMgr15get_substandardEv:
 3673|    258|FLAG AffixMgr::get_substandard() const {
 3674|    258|  return substandard;
 3675|    258|}
_ZNK8AffixMgr13get_needaffixEv:
 3678|    960|FLAG AffixMgr::get_needaffix() const {
 3679|    960|  return needaffix;
 3680|    960|}
_ZNK8AffixMgr18get_onlyincompoundEv:
 3688|  60.5k|FLAG AffixMgr::get_onlyincompound() const {
 3689|  60.5k|  return onlyincompound;
 3690|  60.5k|}
_ZN8AffixMgr6lookupEPKcm:
 3698|   496M|struct hentry* AffixMgr::lookup(const char* word, size_t len) {
 3699|   496M|  struct hentry* he = nullptr;
 3700|   993M|  for (size_t i = 0; i < alldic.size() && !he; ++i) {
  ------------------
  |  Branch (3700:22): [True: 496M, False: 496M]
  |  Branch (3700:43): [True: 496M, False: 0]
  ------------------
 3701|   496M|    he = alldic[i]->lookup(word, len);
 3702|   496M|  }
 3703|   496M|  return he;
 3704|   496M|}
_ZNK8AffixMgr14have_contclassEv:
 3707|  29.4M|int AffixMgr::have_contclass() const {
 3708|  29.4M|  return havecontclass;
 3709|  29.4M|}
_ZNK8AffixMgr8get_utf8Ev:
 3712|     76|int AffixMgr::get_utf8() const {
 3713|     76|  return utf8;
 3714|     76|}
_ZNK8AffixMgr16get_maxngramsugsEv:
 3716|  67.2k|int AffixMgr::get_maxngramsugs() const {
 3717|  67.2k|  return maxngramsugs;
 3718|  67.2k|}
_ZNK8AffixMgr14get_maxcpdsugsEv:
 3720|     38|int AffixMgr::get_maxcpdsugs() const {
 3721|     38|  return maxcpdsugs;
 3722|     38|}
_ZNK8AffixMgr11get_maxdiffEv:
 3724|  45.9k|int AffixMgr::get_maxdiff() const {
 3725|  45.9k|  return maxdiff;
 3726|  45.9k|}
_ZNK8AffixMgr15get_onlymaxdiffEv:
 3728|  7.67k|int AffixMgr::get_onlymaxdiff() const {
 3729|  7.67k|  return onlymaxdiff;
 3730|  7.67k|}
_ZNK8AffixMgr15get_nosplitsugsEv:
 3733|     38|int AffixMgr::get_nosplitsugs() const {
 3734|     38|  return nosplitsugs;
 3735|     38|}
_ZNK8AffixMgr16get_sugswithdotsEv:
 3738|  3.67k|int AffixMgr::get_sugswithdots() const {
 3739|  3.67k|  return sugswithdots;
 3740|  3.67k|}
_ZN8AffixMgr10parse_flagERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPtP7FileMgr:
 3743|     22|bool AffixMgr::parse_flag(const std::string& line, unsigned short* out, FileMgr* af) {
 3744|     22|  if (*out != FLAG_NULL && !(*out >= DEFAULTFLAGS)) {
  ------------------
  |  |   96|     44|#define FLAG_NULL 0x00
  ------------------
                if (*out != FLAG_NULL && !(*out >= DEFAULTFLAGS)) {
  ------------------
  |  |  126|      2|#define DEFAULTFLAGS 65510
  ------------------
  |  Branch (3744:7): [True: 2, False: 20]
  |  Branch (3744:28): [True: 0, False: 2]
  ------------------
 3745|      0|    HUNSPELL_WARNING(
 3746|      0|        stderr,
 3747|      0|        "error: line %d: multiple definitions of an affix file parameter\n",
 3748|      0|        af->getlinenum());
 3749|      0|    return false;
 3750|      0|  }
 3751|     22|  std::string s;
 3752|     22|  if (!parse_string(line, s, af->getlinenum()))
  ------------------
  |  Branch (3752:7): [True: 0, False: 22]
  ------------------
 3753|      0|    return false;
 3754|     22|  *out = pHMgr->decode_flag(s);
 3755|     22|  return true;
 3756|     22|}
_ZN8AffixMgr9parse_numERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPiP7FileMgr:
 3759|     10|bool AffixMgr::parse_num(const std::string& line, int* out, FileMgr* af) {
 3760|     10|  if (*out != -1) {
  ------------------
  |  Branch (3760:7): [True: 0, False: 10]
  ------------------
 3761|      0|    HUNSPELL_WARNING(
 3762|      0|        stderr,
 3763|      0|        "error: line %d: multiple definitions of an affix file parameter\n",
 3764|      0|        af->getlinenum());
 3765|      0|    return false;
 3766|      0|  }
 3767|     10|  std::string s;
 3768|     10|  if (!parse_string(line, s, af->getlinenum()))
  ------------------
  |  Branch (3768:7): [True: 0, False: 10]
  ------------------
 3769|      0|    return false;
 3770|     10|  *out = atoi(s.c_str());
 3771|     10|  return true;
 3772|     10|}
_ZN8AffixMgr17parse_cpdsyllableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 3775|      2|bool AffixMgr::parse_cpdsyllable(const std::string& line, FileMgr* af) {
 3776|      2|  int i = 0;
 3777|      2|  int np = 0;
 3778|      2|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 3779|      8|  while (start_piece != line.end()) {
  ------------------
  |  Branch (3779:10): [True: 6, False: 2]
  ------------------
 3780|      6|    switch (i) {
 3781|      2|      case 0: {
  ------------------
  |  Branch (3781:7): [True: 2, False: 4]
  ------------------
 3782|      2|        np++;
 3783|      2|        break;
 3784|      0|      }
 3785|      2|      case 1: {
  ------------------
  |  Branch (3785:7): [True: 2, False: 4]
  ------------------
 3786|      2|        cpdmaxsyllable = atoi(std::string(start_piece, iter).c_str());
 3787|      2|        np++;
 3788|      2|        break;
 3789|      0|      }
 3790|      2|      case 2: {
  ------------------
  |  Branch (3790:7): [True: 2, False: 4]
  ------------------
 3791|      2|        if (!utf8) {
  ------------------
  |  Branch (3791:13): [True: 0, False: 2]
  ------------------
 3792|      0|          cpdvowels.assign(start_piece, iter);
 3793|      0|          std::sort(cpdvowels.begin(), cpdvowels.end());
 3794|      2|        } else {
 3795|      2|          std::string piece(start_piece, iter);
 3796|      2|          u8_u16(cpdvowels_utf16, piece);
 3797|      2|          std::sort(cpdvowels_utf16.begin(), cpdvowels_utf16.end());
 3798|      2|        }
 3799|      2|        np++;
 3800|      2|        break;
 3801|      0|      }
 3802|      0|      default:
  ------------------
  |  Branch (3802:7): [True: 0, False: 6]
  ------------------
 3803|      0|        break;
 3804|      6|    }
 3805|      6|    ++i;
 3806|      6|    start_piece = mystrsep(line, iter);
 3807|      6|  }
 3808|      2|  if (np < 2) {
  ------------------
  |  Branch (3808:7): [True: 0, False: 2]
  ------------------
 3809|      0|    HUNSPELL_WARNING(stderr,
 3810|      0|                     "error: line %d: missing compoundsyllable information\n",
 3811|      0|                     af->getlinenum());
 3812|      0|    return false;
 3813|      0|  }
 3814|      2|  if (np == 2)
  ------------------
  |  Branch (3814:7): [True: 0, False: 2]
  ------------------
 3815|      0|    cpdvowels = "AEIOUaeiou";
 3816|      2|  return true;
 3817|      2|}
_ZN8AffixMgr15parse_convtableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgrPP7RepListS8_:
 3822|      4|                              const std::string& keyword) {
 3823|      4|  if (*rl) {
  ------------------
  |  Branch (3823:7): [True: 0, False: 4]
  ------------------
 3824|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 3825|      0|                     af->getlinenum());
 3826|      0|    return false;
 3827|      0|  }
 3828|      4|  int i = 0;
 3829|      4|  int np = 0;
 3830|      4|  int numrl = 0;
 3831|      4|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 3832|     18|  while (start_piece != line.end()) {
  ------------------
  |  Branch (3832:10): [True: 14, False: 4]
  ------------------
 3833|     14|    switch (i) {
 3834|      4|      case 0: {
  ------------------
  |  Branch (3834:7): [True: 4, False: 10]
  ------------------
 3835|      4|        np++;
 3836|      4|        break;
 3837|      0|      }
 3838|      4|      case 1: {
  ------------------
  |  Branch (3838:7): [True: 4, False: 10]
  ------------------
 3839|      4|        numrl = atoi(std::string(start_piece, iter).c_str());
 3840|      4|        if (numrl < 1) {
  ------------------
  |  Branch (3840:13): [True: 0, False: 4]
  ------------------
 3841|      0|          HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n",
 3842|      0|                           af->getlinenum());
 3843|      0|          return false;
 3844|      0|        }
 3845|      4|        *rl = new RepList(numrl);
 3846|      4|        if (!*rl)
  ------------------
  |  Branch (3846:13): [True: 0, False: 4]
  ------------------
 3847|      0|          return false;
 3848|      4|        np++;
 3849|      4|        break;
 3850|      4|      }
 3851|      6|      default:
  ------------------
  |  Branch (3851:7): [True: 6, False: 8]
  ------------------
 3852|      6|        break;
 3853|     14|    }
 3854|     14|    ++i;
 3855|     14|    start_piece = mystrsep(line, iter);
 3856|     14|  }
 3857|      4|  if (np != 2) {
  ------------------
  |  Branch (3857:7): [True: 0, False: 4]
  ------------------
 3858|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 3859|      0|                     af->getlinenum());
 3860|      0|    return false;
 3861|      0|  }
 3862|       |
 3863|       |  /* now parse the num lines to read in the remainder of the table */
 3864|     26|  for (int j = 0; j < numrl; j++) {
  ------------------
  |  Branch (3864:19): [True: 22, False: 4]
  ------------------
 3865|     22|    std::string nl;
 3866|     22|    if (!af->getline(nl))
  ------------------
  |  Branch (3866:9): [True: 0, False: 22]
  ------------------
 3867|      0|      return false;
 3868|     22|    mychomp(nl);
 3869|     22|    i = 0;
 3870|     22|    std::string pattern;
 3871|     22|    std::string pattern2;
 3872|     22|    iter = nl.begin();
 3873|     22|    start_piece = mystrsep(nl, iter);
 3874|    130|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (3874:12): [True: 108, False: 22]
  ------------------
 3875|    108|      {
 3876|    108|        switch (i) {
 3877|     22|          case 0: {
  ------------------
  |  Branch (3877:11): [True: 22, False: 86]
  ------------------
 3878|     22|            if (nl.compare(start_piece - nl.begin(), keyword.size(), keyword, 0, keyword.size()) != 0) {
  ------------------
  |  Branch (3878:17): [True: 0, False: 22]
  ------------------
 3879|      0|              HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 3880|      0|                               af->getlinenum());
 3881|      0|              delete *rl;
 3882|      0|              *rl = nullptr;
 3883|      0|              return false;
 3884|      0|            }
 3885|     22|            break;
 3886|     22|          }
 3887|     22|          case 1: {
  ------------------
  |  Branch (3887:11): [True: 22, False: 86]
  ------------------
 3888|     22|            pattern.assign(start_piece, iter);
 3889|     22|            break;
 3890|     22|          }
 3891|     22|          case 2: {
  ------------------
  |  Branch (3891:11): [True: 22, False: 86]
  ------------------
 3892|     22|            pattern2.assign(start_piece, iter);
 3893|     22|            break;
 3894|     22|          }
 3895|     42|          default:
  ------------------
  |  Branch (3895:11): [True: 42, False: 66]
  ------------------
 3896|     42|            break;
 3897|    108|        }
 3898|    108|        ++i;
 3899|    108|      }
 3900|      0|      start_piece = mystrsep(nl, iter);
 3901|    108|    }
 3902|     22|    if (pattern.empty() || pattern2.empty()) {
  ------------------
  |  Branch (3902:9): [True: 0, False: 22]
  |  Branch (3902:28): [True: 0, False: 22]
  ------------------
 3903|      0|      HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 3904|      0|                       af->getlinenum());
 3905|      0|      return false;
 3906|      0|    }
 3907|       |
 3908|     22|    (*rl)->add(pattern, pattern2);
 3909|     22|  }
 3910|      4|  return true;
 3911|      4|}
_ZN8AffixMgr16parse_phonetableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 3914|      2|bool AffixMgr::parse_phonetable(const std::string& line, FileMgr* af) {
 3915|      2|  if (phone) {
  ------------------
  |  Branch (3915:7): [True: 0, False: 2]
  ------------------
 3916|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 3917|      0|                     af->getlinenum());
 3918|      0|    return false;
 3919|      0|  }
 3920|      2|  std::unique_ptr<phonetable> new_phone;
 3921|      2|  int num = -1;
 3922|      2|  int i = 0;
 3923|      2|  int np = 0;
 3924|      2|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 3925|      6|  while (start_piece != line.end()) {
  ------------------
  |  Branch (3925:10): [True: 4, False: 2]
  ------------------
 3926|      4|    switch (i) {
 3927|      2|      case 0: {
  ------------------
  |  Branch (3927:7): [True: 2, False: 2]
  ------------------
 3928|      2|        np++;
 3929|      2|        break;
 3930|      0|      }
 3931|      2|      case 1: {
  ------------------
  |  Branch (3931:7): [True: 2, False: 2]
  ------------------
 3932|      2|        num = atoi(std::string(start_piece, iter).c_str());
 3933|      2|        if (num < 1) {
  ------------------
  |  Branch (3933:13): [True: 0, False: 2]
  ------------------
 3934|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
 3935|      0|                           af->getlinenum());
 3936|      0|          return false;
 3937|      0|        }
 3938|      2|        new_phone = std::make_unique<phonetable>();
 3939|      2|        new_phone->utf8 = (char)utf8;
 3940|      2|        np++;
 3941|      2|        break;
 3942|      2|      }
 3943|      0|      default:
  ------------------
  |  Branch (3943:7): [True: 0, False: 4]
  ------------------
 3944|      0|        break;
 3945|      4|    }
 3946|      4|    ++i;
 3947|      4|    start_piece = mystrsep(line, iter);
 3948|      4|  }
 3949|      2|  if (np != 2) {
  ------------------
  |  Branch (3949:7): [True: 0, False: 2]
  ------------------
 3950|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 3951|      0|                     af->getlinenum());
 3952|      0|    return false;
 3953|      0|  }
 3954|       |
 3955|       |  /* now parse the phone->num lines to read in the remainder of the table */
 3956|    212|  for (int j = 0; j < num; ++j) {
  ------------------
  |  Branch (3956:19): [True: 210, False: 2]
  ------------------
 3957|    210|    std::string nl;
 3958|    210|    if (!af->getline(nl))
  ------------------
  |  Branch (3958:9): [True: 0, False: 210]
  ------------------
 3959|      0|      return false;
 3960|    210|    mychomp(nl);
 3961|    210|    i = 0;
 3962|    210|    const size_t old_size = new_phone->rules.size();
 3963|    210|    iter = nl.begin();
 3964|    210|    start_piece = mystrsep(nl, iter);
 3965|    840|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (3965:12): [True: 630, False: 210]
  ------------------
 3966|    630|      {
 3967|    630|        switch (i) {
 3968|    210|          case 0: {
  ------------------
  |  Branch (3968:11): [True: 210, False: 420]
  ------------------
 3969|    210|            if (nl.compare(start_piece - nl.begin(), 5, "PHONE", 5) != 0) {
  ------------------
  |  Branch (3969:17): [True: 0, False: 210]
  ------------------
 3970|      0|              HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 3971|      0|                               af->getlinenum());
 3972|      0|              return false;
 3973|      0|            }
 3974|    210|            break;
 3975|    210|          }
 3976|    210|          case 1: {
  ------------------
  |  Branch (3976:11): [True: 210, False: 420]
  ------------------
 3977|    210|            new_phone->rules.emplace_back(start_piece, iter);
 3978|    210|            break;
 3979|    210|          }
 3980|    210|          case 2: {
  ------------------
  |  Branch (3980:11): [True: 210, False: 420]
  ------------------
 3981|    210|            new_phone->rules.emplace_back(start_piece, iter);
 3982|    210|            mystrrep(new_phone->rules.back(), "_", "");
 3983|    210|            break;
 3984|    210|          }
 3985|      0|          default:
  ------------------
  |  Branch (3985:11): [True: 0, False: 630]
  ------------------
 3986|      0|            break;
 3987|    630|        }
 3988|    630|        ++i;
 3989|    630|      }
 3990|      0|      start_piece = mystrsep(nl, iter);
 3991|    630|    }
 3992|    210|    if (new_phone->rules.size() != old_size + 2) {
  ------------------
  |  Branch (3992:9): [True: 0, False: 210]
  ------------------
 3993|      0|      HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 3994|      0|                       af->getlinenum());
 3995|      0|      return false;
 3996|      0|    }
 3997|    210|  }
 3998|      2|  new_phone->rules.emplace_back("");
 3999|      2|  new_phone->rules.emplace_back("");
 4000|      2|  init_phonet_hash(*new_phone);
 4001|      2|  phone = new_phone.release();
 4002|      2|  return true;
 4003|      2|}
_ZN8AffixMgr19parse_checkcpdtableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 4006|      2|bool AffixMgr::parse_checkcpdtable(const std::string& line, FileMgr* af) {
 4007|      2|  if (parsedcheckcpd) {
  ------------------
  |  Branch (4007:7): [True: 0, False: 2]
  ------------------
 4008|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 4009|      0|                     af->getlinenum());
 4010|      0|    return false;
 4011|      0|  }
 4012|      2|  parsedcheckcpd = true;
 4013|      2|  int numcheckcpd = -1;
 4014|      2|  int i = 0;
 4015|      2|  int np = 0;
 4016|      2|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 4017|      6|  while (start_piece != line.end()) {
  ------------------
  |  Branch (4017:10): [True: 4, False: 2]
  ------------------
 4018|      4|    switch (i) {
 4019|      2|      case 0: {
  ------------------
  |  Branch (4019:7): [True: 2, False: 2]
  ------------------
 4020|      2|        np++;
 4021|      2|        break;
 4022|      0|      }
 4023|      2|      case 1: {
  ------------------
  |  Branch (4023:7): [True: 2, False: 2]
  ------------------
 4024|      2|        numcheckcpd = atoi(std::string(start_piece, iter).c_str());
 4025|      2|        if (numcheckcpd < 1) {
  ------------------
  |  Branch (4025:13): [True: 0, False: 2]
  ------------------
 4026|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
 4027|      0|                           af->getlinenum());
 4028|      0|          return false;
 4029|      0|        }
 4030|      2|        checkcpdtable.reserve(std::min(numcheckcpd, 16384));
 4031|      2|        np++;
 4032|      2|        break;
 4033|      2|      }
 4034|      0|      default:
  ------------------
  |  Branch (4034:7): [True: 0, False: 4]
  ------------------
 4035|      0|        break;
 4036|      4|    }
 4037|      4|    ++i;
 4038|      4|    start_piece = mystrsep(line, iter);
 4039|      4|  }
 4040|      2|  if (np != 2) {
  ------------------
  |  Branch (4040:7): [True: 0, False: 2]
  ------------------
 4041|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 4042|      0|                     af->getlinenum());
 4043|      0|    return false;
 4044|      0|  }
 4045|       |
 4046|       |  /* now parse the numcheckcpd lines to read in the remainder of the table */
 4047|      6|  for (int j = 0; j < numcheckcpd; ++j) {
  ------------------
  |  Branch (4047:19): [True: 4, False: 2]
  ------------------
 4048|      4|    std::string nl;
 4049|      4|    if (!af->getline(nl))
  ------------------
  |  Branch (4049:9): [True: 0, False: 4]
  ------------------
 4050|      0|      return false;
 4051|      4|    mychomp(nl);
 4052|      4|    i = 0;
 4053|      4|    checkcpdtable.emplace_back();
 4054|      4|    iter = nl.begin();
 4055|      4|    start_piece = mystrsep(nl, iter);
 4056|     16|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (4056:12): [True: 12, False: 4]
  ------------------
 4057|     12|      switch (i) {
 4058|      4|        case 0: {
  ------------------
  |  Branch (4058:9): [True: 4, False: 8]
  ------------------
 4059|      4|          if (nl.compare(start_piece - nl.begin(), 20, "CHECKCOMPOUNDPATTERN", 20) != 0) {
  ------------------
  |  Branch (4059:15): [True: 0, False: 4]
  ------------------
 4060|      0|            HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4061|      0|                             af->getlinenum());
 4062|      0|            checkcpdtable.clear();
 4063|      0|            return false;
 4064|      0|          }
 4065|      4|          break;
 4066|      4|        }
 4067|      4|        case 1: {
  ------------------
  |  Branch (4067:9): [True: 4, False: 8]
  ------------------
 4068|      4|          checkcpdtable.back().pattern.assign(start_piece, iter);
 4069|      4|          size_t slash_pos = checkcpdtable.back().pattern.find('/');
 4070|      4|          if (slash_pos != std::string::npos) {
  ------------------
  |  Branch (4070:15): [True: 0, False: 4]
  ------------------
 4071|      0|            std::string chunk(checkcpdtable.back().pattern, slash_pos + 1);
 4072|      0|            checkcpdtable.back().pattern.resize(slash_pos);
 4073|      0|            checkcpdtable.back().cond = pHMgr->decode_flag(chunk);
 4074|      0|          }
 4075|      4|          break;
 4076|      4|        }
 4077|      4|        case 2: {
  ------------------
  |  Branch (4077:9): [True: 4, False: 8]
  ------------------
 4078|      4|          checkcpdtable.back().pattern2.assign(start_piece, iter);
 4079|      4|          size_t slash_pos = checkcpdtable.back().pattern2.find('/');
 4080|      4|          if (slash_pos != std::string::npos) {
  ------------------
  |  Branch (4080:15): [True: 0, False: 4]
  ------------------
 4081|      0|            std::string chunk(checkcpdtable.back().pattern2, slash_pos + 1);
 4082|      0|            checkcpdtable.back().pattern2.resize(slash_pos);
 4083|      0|            checkcpdtable.back().cond2 = pHMgr->decode_flag(chunk);
 4084|      0|          }
 4085|      4|          break;
 4086|      4|        }
 4087|      0|        case 3: {
  ------------------
  |  Branch (4087:9): [True: 0, False: 12]
  ------------------
 4088|      0|          checkcpdtable.back().pattern3.assign(start_piece, iter);
 4089|      0|          simplifiedcpd = 1;
 4090|      0|          break;
 4091|      4|        }
 4092|      0|        default:
  ------------------
  |  Branch (4092:9): [True: 0, False: 12]
  ------------------
 4093|      0|          break;
 4094|     12|      }
 4095|     12|      i++;
 4096|     12|      start_piece = mystrsep(nl, iter);
 4097|     12|    }
 4098|      4|  }
 4099|      2|  return true;
 4100|      2|}
_ZN8AffixMgr14parse_maptableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 4204|      2|bool AffixMgr::parse_maptable(const std::string& line, FileMgr* af) {
 4205|      2|  if (parsedmaptable) {
  ------------------
  |  Branch (4205:7): [True: 0, False: 2]
  ------------------
 4206|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 4207|      0|                     af->getlinenum());
 4208|      0|    return false;
 4209|      0|  }
 4210|      2|  parsedmaptable = true;
 4211|      2|  int nummap = -1;
 4212|      2|  int i = 0;
 4213|      2|  int np = 0;
 4214|      2|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 4215|      6|  while (start_piece != line.end()) {
  ------------------
  |  Branch (4215:10): [True: 4, False: 2]
  ------------------
 4216|      4|    switch (i) {
 4217|      2|      case 0: {
  ------------------
  |  Branch (4217:7): [True: 2, False: 2]
  ------------------
 4218|      2|        np++;
 4219|      2|        break;
 4220|      0|      }
 4221|      2|      case 1: {
  ------------------
  |  Branch (4221:7): [True: 2, False: 2]
  ------------------
 4222|      2|        nummap = atoi(std::string(start_piece, iter).c_str());
 4223|      2|        if (nummap < 1) {
  ------------------
  |  Branch (4223:13): [True: 0, False: 2]
  ------------------
 4224|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
 4225|      0|                           af->getlinenum());
 4226|      0|          return false;
 4227|      0|        }
 4228|      2|        maptable.reserve(std::min(nummap, 16384));
 4229|      2|        np++;
 4230|      2|        break;
 4231|      2|      }
 4232|      0|      default:
  ------------------
  |  Branch (4232:7): [True: 0, False: 4]
  ------------------
 4233|      0|        break;
 4234|      4|    }
 4235|      4|    ++i;
 4236|      4|    start_piece = mystrsep(line, iter);
 4237|      4|  }
 4238|      2|  if (np != 2) {
  ------------------
  |  Branch (4238:7): [True: 0, False: 2]
  ------------------
 4239|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 4240|      0|                     af->getlinenum());
 4241|      0|    return false;
 4242|      0|  }
 4243|       |
 4244|       |  /* now parse the nummap lines to read in the remainder of the table */
 4245|      8|  for (int j = 0; j < nummap; ++j) {
  ------------------
  |  Branch (4245:19): [True: 6, False: 2]
  ------------------
 4246|      6|    std::string nl;
 4247|      6|    if (!af->getline(nl))
  ------------------
  |  Branch (4247:9): [True: 0, False: 6]
  ------------------
 4248|      0|      return false;
 4249|      6|    mychomp(nl);
 4250|      6|    i = 0;
 4251|      6|    maptable.emplace_back();
 4252|      6|    iter = nl.begin();
 4253|      6|    start_piece = mystrsep(nl, iter);
 4254|     18|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (4254:12): [True: 12, False: 6]
  ------------------
 4255|     12|      switch (i) {
 4256|      6|        case 0: {
  ------------------
  |  Branch (4256:9): [True: 6, False: 6]
  ------------------
 4257|      6|          if (nl.compare(start_piece - nl.begin(), 3, "MAP", 3) != 0) {
  ------------------
  |  Branch (4257:15): [True: 0, False: 6]
  ------------------
 4258|      0|            HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4259|      0|                             af->getlinenum());
 4260|      0|            nummap = 0;
 4261|      0|            return false;
 4262|      0|          }
 4263|      6|          break;
 4264|      6|        }
 4265|      6|        case 1: {
  ------------------
  |  Branch (4265:9): [True: 6, False: 6]
  ------------------
 4266|     22|          for (auto k = start_piece; k != iter; ++k) {
  ------------------
  |  Branch (4266:38): [True: 16, False: 6]
  ------------------
 4267|     16|            auto chb = k, che = k + 1;
 4268|     16|            if (*k == '(') {
  ------------------
  |  Branch (4268:17): [True: 2, False: 14]
  ------------------
 4269|      2|              auto parpos = std::find(k, iter, ')');
 4270|      2|              if (parpos != iter) {
  ------------------
  |  Branch (4270:19): [True: 2, False: 0]
  ------------------
 4271|      2|                chb = k + 1;
 4272|      2|                che = parpos;
 4273|      2|                k = parpos;
 4274|      2|              }
 4275|     14|            } else {
 4276|     14|              if (utf8 && (*k & 0xc0) == 0xc0) {
  ------------------
  |  Branch (4276:19): [True: 14, False: 0]
  |  Branch (4276:27): [True: 10, False: 4]
  ------------------
 4277|     10|                ++k;
 4278|     20|                while (k != iter && is_utf8_cont(*k))
  ------------------
  |  Branch (4278:24): [True: 18, False: 2]
  |  Branch (4278:37): [True: 10, False: 8]
  ------------------
 4279|     10|                    ++k;
 4280|     10|                che = k;
 4281|     10|                --k;
 4282|     10|              }
 4283|     14|            }
 4284|     16|            if (chb == che) {
  ------------------
  |  Branch (4284:17): [True: 0, False: 16]
  ------------------
 4285|      0|              HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4286|      0|                              af->getlinenum());
 4287|      0|            }
 4288|       |
 4289|     16|            maptable.back().emplace_back(chb, che);
 4290|     16|          }
 4291|      6|          break;
 4292|      6|        }
 4293|      0|        default:
  ------------------
  |  Branch (4293:9): [True: 0, False: 12]
  ------------------
 4294|      0|          break;
 4295|     12|      }
 4296|     12|      ++i;
 4297|     12|      start_piece = mystrsep(nl, iter);
 4298|     12|    }
 4299|      6|    if (maptable.back().empty()) {
  ------------------
  |  Branch (4299:9): [True: 0, False: 6]
  ------------------
 4300|      0|      HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4301|      0|                       af->getlinenum());
 4302|      0|      return false;
 4303|      0|    }
 4304|      6|  }
 4305|      2|  return true;
 4306|      2|}
_ZN8AffixMgr16parse_breaktableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 4309|      4|bool AffixMgr::parse_breaktable(const std::string& line, FileMgr* af) {
 4310|      4|  if (parsedbreaktable) {
  ------------------
  |  Branch (4310:7): [True: 0, False: 4]
  ------------------
 4311|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 4312|      0|                     af->getlinenum());
 4313|      0|    return false;
 4314|      0|  }
 4315|      4|  parsedbreaktable = true;
 4316|      4|  int numbreak = -1;
 4317|      4|  int i = 0;
 4318|      4|  int np = 0;
 4319|      4|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 4320|     12|  while (start_piece != line.end()) {
  ------------------
  |  Branch (4320:10): [True: 8, False: 4]
  ------------------
 4321|      8|    switch (i) {
 4322|      4|      case 0: {
  ------------------
  |  Branch (4322:7): [True: 4, False: 4]
  ------------------
 4323|      4|        np++;
 4324|      4|        break;
 4325|      0|      }
 4326|      4|      case 1: {
  ------------------
  |  Branch (4326:7): [True: 4, False: 4]
  ------------------
 4327|      4|        numbreak = atoi(std::string(start_piece, iter).c_str());
 4328|      4|        if (numbreak < 0) {
  ------------------
  |  Branch (4328:13): [True: 0, False: 4]
  ------------------
 4329|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
 4330|      0|                           af->getlinenum());
 4331|      0|          return false;
 4332|      0|        }
 4333|      4|        if (numbreak == 0)
  ------------------
  |  Branch (4333:13): [True: 0, False: 4]
  ------------------
 4334|      0|          return true;
 4335|      4|        breaktable.reserve(std::min(numbreak, 16384));
 4336|      4|        np++;
 4337|      4|        break;
 4338|      4|      }
 4339|      0|      default:
  ------------------
  |  Branch (4339:7): [True: 0, False: 8]
  ------------------
 4340|      0|        break;
 4341|      8|    }
 4342|      8|    ++i;
 4343|      8|    start_piece = mystrsep(line, iter);
 4344|      8|  }
 4345|      4|  if (np != 2) {
  ------------------
  |  Branch (4345:7): [True: 0, False: 4]
  ------------------
 4346|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 4347|      0|                     af->getlinenum());
 4348|      0|    return false;
 4349|      0|  }
 4350|       |
 4351|       |  /* now parse the numbreak lines to read in the remainder of the table */
 4352|     10|  for (int j = 0; j < numbreak; ++j) {
  ------------------
  |  Branch (4352:19): [True: 6, False: 4]
  ------------------
 4353|      6|    std::string nl;
 4354|      6|    if (!af->getline(nl))
  ------------------
  |  Branch (4354:9): [True: 0, False: 6]
  ------------------
 4355|      0|      return false;
 4356|      6|    mychomp(nl);
 4357|      6|    i = 0;
 4358|      6|    iter = nl.begin();
 4359|      6|    start_piece = mystrsep(nl, iter);
 4360|     18|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (4360:12): [True: 12, False: 6]
  ------------------
 4361|     12|      switch (i) {
 4362|      6|        case 0: {
  ------------------
  |  Branch (4362:9): [True: 6, False: 6]
  ------------------
 4363|      6|          if (nl.compare(start_piece - nl.begin(), 5, "BREAK", 5) != 0) {
  ------------------
  |  Branch (4363:15): [True: 0, False: 6]
  ------------------
 4364|      0|            HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4365|      0|                             af->getlinenum());
 4366|      0|            numbreak = 0;
 4367|      0|            return false;
 4368|      0|          }
 4369|      6|          break;
 4370|      6|        }
 4371|      6|        case 1: {
  ------------------
  |  Branch (4371:9): [True: 6, False: 6]
  ------------------
 4372|      6|          breaktable.emplace_back(start_piece, iter);
 4373|      6|          break;
 4374|      6|        }
 4375|      0|        default:
  ------------------
  |  Branch (4375:9): [True: 0, False: 12]
  ------------------
 4376|      0|          break;
 4377|     12|      }
 4378|     12|      ++i;
 4379|     12|      start_piece = mystrsep(nl, iter);
 4380|     12|    }
 4381|      6|  }
 4382|       |
 4383|      4|  if (breaktable.size() != static_cast<size_t>(numbreak)) {
  ------------------
  |  Branch (4383:7): [True: 0, False: 4]
  ------------------
 4384|      0|    HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 4385|      0|                     af->getlinenum());
 4386|      0|    return false;
 4387|      0|  }
 4388|       |
 4389|      4|  return true;
 4390|      4|}
_ZN8AffixMgr17reverse_conditionERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 4392|     38|void AffixMgr::reverse_condition(std::string& piece) {
 4393|     38|  if (piece.empty())
  ------------------
  |  Branch (4393:7): [True: 0, False: 38]
  ------------------
 4394|      0|      return;
 4395|       |
 4396|     38|  int neg = 0;
 4397|       |  // iterate backwards; k wraps to npos (SIZE_MAX) when decremented past 0
 4398|     92|  for (size_t k = piece.size() - 1; k != std::string::npos; --k) {
  ------------------
  |  Branch (4398:37): [True: 54, False: 38]
  ------------------
 4399|     54|    switch (piece[k]) {
 4400|      2|      case '[': {
  ------------------
  |  Branch (4400:7): [True: 2, False: 52]
  ------------------
 4401|      2|        if (neg)
  ------------------
  |  Branch (4401:13): [True: 0, False: 2]
  ------------------
 4402|      0|          piece[k + 1] = '[';
 4403|      2|        else
 4404|      2|          piece[k] = ']';
 4405|      2|        break;
 4406|      0|      }
 4407|      2|      case ']': {
  ------------------
  |  Branch (4407:7): [True: 2, False: 52]
  ------------------
 4408|      2|        piece[k] = '[';
 4409|      2|        if (neg)
  ------------------
  |  Branch (4409:13): [True: 0, False: 2]
  ------------------
 4410|      0|          piece[k + 1] = '^';
 4411|      2|        neg = 0;
 4412|      2|        break;
 4413|      0|      }
 4414|      0|      case '^': {
  ------------------
  |  Branch (4414:7): [True: 0, False: 54]
  ------------------
 4415|      0|        if (piece[k + 1] == ']')
  ------------------
  |  Branch (4415:13): [True: 0, False: 0]
  ------------------
 4416|      0|          neg = 1;
 4417|      0|        else if (neg)
  ------------------
  |  Branch (4417:18): [True: 0, False: 0]
  ------------------
 4418|      0|          piece[k + 1] = piece[k];
 4419|      0|        break;
 4420|      0|      }
 4421|     50|      default: {
  ------------------
  |  Branch (4421:7): [True: 50, False: 4]
  ------------------
 4422|     50|        if (neg)
  ------------------
  |  Branch (4422:13): [True: 0, False: 50]
  ------------------
 4423|      0|          piece[k + 1] = piece[k];
 4424|     50|      }
 4425|     54|    }
 4426|     54|  }
 4427|     38|}
_ZN8AffixMgr11parse_affixERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEcP7FileMgrPc:
 4481|     26|                          char* dupflags) {
 4482|     26|  int numents = 0;  // number of AffEntry structures to parse
 4483|       |
 4484|     26|  unsigned short aflag = 0;  // affix char identifier
 4485|       |
 4486|     26|  char ff = 0;
 4487|     26|  entries_container affentries(at, this);
 4488|       |
 4489|     26|  int i = 0;
 4490|       |
 4491|       |// checking lines with bad syntax
 4492|       |#ifdef DEBUG
 4493|       |  int basefieldnum = 0;
 4494|       |#endif
 4495|       |
 4496|       |  // split affix header line into pieces
 4497|       |
 4498|     26|  int np = 0;
 4499|     26|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 4500|    130|  while (start_piece != line.end()) {
  ------------------
  |  Branch (4500:10): [True: 104, False: 26]
  ------------------
 4501|    104|    switch (i) {
 4502|       |      // piece 1 - is type of affix
 4503|     26|      case 0: {
  ------------------
  |  Branch (4503:7): [True: 26, False: 78]
  ------------------
 4504|     26|        np++;
 4505|     26|        break;
 4506|      0|      }
 4507|       |
 4508|       |      // piece 2 - is affix char
 4509|     26|      case 1: {
  ------------------
  |  Branch (4509:7): [True: 26, False: 78]
  ------------------
 4510|     26|        np++;
 4511|     26|        aflag = pHMgr->decode_flag(std::string(start_piece, iter));
 4512|     26|        if (((at == 'S') && (dupflags[aflag] & dupSFX)) ||
  ------------------
  |  |   88|     18|#define dupSFX (1 << 0)
  ------------------
  |  Branch (4512:14): [True: 18, False: 8]
  |  Branch (4512:29): [True: 0, False: 18]
  ------------------
 4513|     26|            ((at == 'P') && (dupflags[aflag] & dupPFX))) {
  ------------------
  |  |   89|      8|#define dupPFX (1 << 1)
  ------------------
  |  Branch (4513:14): [True: 8, False: 18]
  |  Branch (4513:29): [True: 0, False: 8]
  ------------------
 4514|      0|          HUNSPELL_WARNING(
 4515|      0|              stderr,
 4516|      0|              "error: line %d: multiple definitions of an affix flag\n",
 4517|      0|              af->getlinenum());
 4518|      0|        }
 4519|     26|        dupflags[aflag] += (char)((at == 'S') ? dupSFX : dupPFX);
  ------------------
  |  |   88|     18|#define dupSFX (1 << 0)
  ------------------
                      dupflags[aflag] += (char)((at == 'S') ? dupSFX : dupPFX);
  ------------------
  |  |   89|      8|#define dupPFX (1 << 1)
  ------------------
  |  Branch (4519:35): [True: 18, False: 8]
  ------------------
 4520|     26|        break;
 4521|      0|      }
 4522|       |      // piece 3 - is cross product indicator
 4523|     26|      case 2: {
  ------------------
  |  Branch (4523:7): [True: 26, False: 78]
  ------------------
 4524|     26|        np++;
 4525|     26|        if (*start_piece == 'Y')
  ------------------
  |  Branch (4525:13): [True: 26, False: 0]
  ------------------
 4526|     26|          ff = aeXPRODUCT;
  ------------------
  |  |   65|     26|#define aeXPRODUCT (1 << 0)
  ------------------
 4527|     26|        break;
 4528|      0|      }
 4529|       |
 4530|       |      // piece 4 - is number of affentries
 4531|     26|      case 3: {
  ------------------
  |  Branch (4531:7): [True: 26, False: 78]
  ------------------
 4532|     26|        np++;
 4533|     26|        numents = atoi(std::string(start_piece, iter).c_str());
 4534|     26|        if ((numents <= 0) || ((std::numeric_limits<size_t>::max() /
  ------------------
  |  Branch (4534:13): [True: 0, False: 26]
  |  Branch (4534:31): [True: 0, False: 26]
  ------------------
 4535|     26|                                sizeof(AffEntry)) < static_cast<size_t>(numents))) {
 4536|      0|          std::string err = pHMgr->encode_flag(aflag);
 4537|      0|          HUNSPELL_WARNING(stderr, "error: line %d: affix %s: bad entry number\n",
 4538|      0|                           af->getlinenum(), err.c_str());
 4539|      0|          return false;
 4540|      0|        }
 4541|       |
 4542|     26|        char opts = ff;
 4543|     26|        if (utf8)
  ------------------
  |  Branch (4543:13): [True: 6, False: 20]
  ------------------
 4544|      6|          opts |= aeUTF8;
  ------------------
  |  |   66|      6|#define aeUTF8 (1 << 1)
  ------------------
 4545|     26|        if (pHMgr->is_aliasf())
  ------------------
  |  Branch (4545:13): [True: 4, False: 22]
  ------------------
 4546|      4|          opts |= aeALIASF;
  ------------------
  |  |   67|      4|#define aeALIASF (1 << 2)
  ------------------
 4547|     26|        if (pHMgr->is_aliasm())
  ------------------
  |  Branch (4547:13): [True: 0, False: 26]
  ------------------
 4548|      0|          opts |= aeALIASM;
  ------------------
  |  |   68|      0|#define aeALIASM (1 << 3)
  ------------------
 4549|     26|        affentries.initialize(numents, opts, aflag);
 4550|     26|      }
 4551|       |
 4552|     26|      default:
  ------------------
  |  Branch (4552:7): [True: 0, False: 104]
  ------------------
 4553|     26|        break;
 4554|    104|    }
 4555|    104|    ++i;
 4556|    104|    start_piece = mystrsep(line, iter);
 4557|    104|  }
 4558|       |  // check to make sure we parsed enough pieces
 4559|     26|  if (np != 4) {
  ------------------
  |  Branch (4559:7): [True: 0, False: 26]
  ------------------
 4560|      0|    std::string err = pHMgr->encode_flag(aflag);
 4561|      0|    HUNSPELL_WARNING(stderr, "error: line %d: affix %s: missing data\n",
 4562|      0|                     af->getlinenum(), err.c_str());
 4563|      0|    return false;
 4564|      0|  }
 4565|       |
 4566|       |  // now parse numents affentries for this affix
 4567|     26|  AffEntry* entry = affentries.first_entry();
 4568|     68|  for (int ent = 0; ent < numents; ++ent) {
  ------------------
  |  Branch (4568:21): [True: 42, False: 26]
  ------------------
 4569|     42|    std::string nl;
 4570|     42|    if (!af->getline(nl))
  ------------------
  |  Branch (4570:9): [True: 0, False: 42]
  ------------------
 4571|      0|      return false;
 4572|     42|    mychomp(nl);
 4573|       |
 4574|     42|    iter = nl.begin();
 4575|     42|    i = 0;
 4576|     42|    np = 0;
 4577|       |
 4578|       |    // split line into pieces
 4579|     42|    start_piece = mystrsep(nl, iter);
 4580|    258|    while (start_piece != nl.end()) {
  ------------------
  |  Branch (4580:12): [True: 216, False: 42]
  ------------------
 4581|    216|      switch (i) {
 4582|       |        // piece 1 - is type
 4583|     42|        case 0: {
  ------------------
  |  Branch (4583:9): [True: 42, False: 174]
  ------------------
 4584|     42|          np++;
 4585|     42|          if (ent != 0)
  ------------------
  |  Branch (4585:15): [True: 16, False: 26]
  ------------------
 4586|     16|            entry = affentries.add_entry((char)(aeXPRODUCT | aeUTF8 | aeALIASF | aeALIASM));
  ------------------
  |  |   65|     16|#define aeXPRODUCT (1 << 0)
  ------------------
                          entry = affentries.add_entry((char)(aeXPRODUCT | aeUTF8 | aeALIASF | aeALIASM));
  ------------------
  |  |   66|     16|#define aeUTF8 (1 << 1)
  ------------------
                          entry = affentries.add_entry((char)(aeXPRODUCT | aeUTF8 | aeALIASF | aeALIASM));
  ------------------
  |  |   67|     16|#define aeALIASF (1 << 2)
  ------------------
                          entry = affentries.add_entry((char)(aeXPRODUCT | aeUTF8 | aeALIASF | aeALIASM));
  ------------------
  |  |   68|     16|#define aeALIASM (1 << 3)
  ------------------
 4587|     42|          break;
 4588|      0|        }
 4589|       |
 4590|       |        // piece 2 - is affix char
 4591|     42|        case 1: {
  ------------------
  |  Branch (4591:9): [True: 42, False: 174]
  ------------------
 4592|     42|          np++;
 4593|     42|          std::string chunk(start_piece, iter);
 4594|     42|          if (pHMgr->decode_flag(chunk) != aflag) {
  ------------------
  |  Branch (4594:15): [True: 0, False: 42]
  ------------------
 4595|      0|            std::string err = pHMgr->encode_flag(aflag);
 4596|      0|            HUNSPELL_WARNING(stderr,
 4597|      0|                             "error: line %d: affix %s is corrupt\n",
 4598|      0|                             af->getlinenum(), err.c_str());
 4599|      0|            return false;
 4600|      0|          }
 4601|       |
 4602|     42|          if (ent != 0) {
  ------------------
  |  Branch (4602:15): [True: 16, False: 26]
  ------------------
 4603|     16|            AffEntry* start_entry = affentries.first_entry();
 4604|     16|            entry->aflag = start_entry->aflag;
 4605|     16|          }
 4606|     42|          break;
 4607|     42|        }
 4608|       |
 4609|       |        // piece 3 - is string to strip or 0 for null
 4610|     42|        case 2: {
  ------------------
  |  Branch (4610:9): [True: 42, False: 174]
  ------------------
 4611|     42|          np++;
 4612|     42|          entry->strip = std::string(start_piece, iter);
 4613|     42|          if (complexprefixes) {
  ------------------
  |  Branch (4613:15): [True: 4, False: 38]
  ------------------
 4614|      4|            if (utf8)
  ------------------
  |  Branch (4614:17): [True: 0, False: 4]
  ------------------
 4615|      0|              reverseword_utf(entry->strip);
 4616|      4|            else
 4617|      4|              reverseword(entry->strip);
 4618|      4|          }
 4619|     42|          if (entry->strip.compare("0") == 0) {
  ------------------
  |  Branch (4619:15): [True: 36, False: 6]
  ------------------
 4620|     36|            entry->strip.clear();
 4621|     36|          }
 4622|     42|          break;
 4623|     42|        }
 4624|       |
 4625|       |        // piece 4 - is affix string or 0 for null
 4626|     42|        case 3: {
  ------------------
  |  Branch (4626:9): [True: 42, False: 174]
  ------------------
 4627|     42|          entry->morphcode = nullptr;
 4628|     42|          entry->contclass = nullptr;
 4629|     42|          entry->contclasslen = 0;
 4630|     42|          np++;
 4631|     42|          std::string::const_iterator dash = std::find(start_piece, iter, '/');
 4632|     42|          if (dash != iter) {
  ------------------
  |  Branch (4632:15): [True: 18, False: 24]
  ------------------
 4633|     18|            entry->appnd = std::string(start_piece, dash);
 4634|     18|            std::string dash_str(dash + 1, iter);
 4635|       |
 4636|     18|            if (!ignorechars.empty() && !has_no_ignored_chars(entry->appnd, ignorechars)) {
  ------------------
  |  Branch (4636:17): [True: 2, False: 16]
  |  Branch (4636:41): [True: 0, False: 2]
  ------------------
 4637|      0|              if (utf8) {
  ------------------
  |  Branch (4637:19): [True: 0, False: 0]
  ------------------
 4638|      0|                remove_ignored_chars_utf(entry->appnd, ignorechars_utf16);
 4639|      0|              } else {
 4640|      0|                remove_ignored_chars(entry->appnd, ignorechars);
 4641|      0|              }
 4642|      0|            }
 4643|       |
 4644|     18|            if (complexprefixes) {
  ------------------
  |  Branch (4644:17): [True: 2, False: 16]
  ------------------
 4645|      2|              if (utf8)
  ------------------
  |  Branch (4645:19): [True: 0, False: 2]
  ------------------
 4646|      0|                reverseword_utf(entry->appnd);
 4647|      2|              else
 4648|      2|                reverseword(entry->appnd);
 4649|      2|            }
 4650|       |
 4651|     18|            if (pHMgr->is_aliasf()) {
  ------------------
  |  Branch (4651:17): [True: 2, False: 16]
  ------------------
 4652|      2|              int index = atoi(dash_str.c_str());
 4653|      2|              entry->contclasslen = (unsigned short)pHMgr->get_aliasf(
 4654|      2|                  index, &(entry->contclass), af);
 4655|      2|              if (!entry->contclasslen)
  ------------------
  |  Branch (4655:19): [True: 0, False: 2]
  ------------------
 4656|      0|                HUNSPELL_WARNING(stderr,
 4657|      0|                                 "error: bad affix flag alias: \"%s\"\n",
 4658|      0|                                 dash_str.c_str());
 4659|     16|            } else {
 4660|     16|              entry->contclasslen = (unsigned short)pHMgr->decode_flags(
 4661|     16|                  &(entry->contclass), dash_str, af);
 4662|     16|              std::sort(entry->contclass, entry->contclass + entry->contclasslen);
 4663|     16|            }
 4664|       |
 4665|     18|            havecontclass = 1;
 4666|     44|            for (unsigned short _i = 0; _i < entry->contclasslen; _i++) {
  ------------------
  |  Branch (4666:41): [True: 26, False: 18]
  ------------------
 4667|     26|              contclasses[(entry->contclass)[_i]] = 1;
 4668|     26|            }
 4669|     24|          } else {
 4670|     24|            entry->appnd = std::string(start_piece, iter);
 4671|       |
 4672|     24|            if (!ignorechars.empty() && !has_no_ignored_chars(entry->appnd, ignorechars)) {
  ------------------
  |  Branch (4672:17): [True: 2, False: 22]
  |  Branch (4672:41): [True: 2, False: 0]
  ------------------
 4673|      2|              if (utf8) {
  ------------------
  |  Branch (4673:19): [True: 0, False: 2]
  ------------------
 4674|      0|                remove_ignored_chars_utf(entry->appnd, ignorechars_utf16);
 4675|      2|              } else {
 4676|      2|                remove_ignored_chars(entry->appnd, ignorechars);
 4677|      2|              }
 4678|      2|            }
 4679|       |
 4680|     24|            if (complexprefixes) {
  ------------------
  |  Branch (4680:17): [True: 2, False: 22]
  ------------------
 4681|      2|              if (utf8)
  ------------------
  |  Branch (4681:19): [True: 0, False: 2]
  ------------------
 4682|      0|                reverseword_utf(entry->appnd);
 4683|      2|              else
 4684|      2|                reverseword(entry->appnd);
 4685|      2|            }
 4686|     24|          }
 4687|       |
 4688|     42|          if (entry->appnd.compare("0") == 0) {
  ------------------
  |  Branch (4688:15): [True: 2, False: 40]
  ------------------
 4689|      2|            entry->appnd.clear();
 4690|      2|          }
 4691|     42|          break;
 4692|     42|        }
 4693|       |
 4694|       |        // piece 5 - is the conditions descriptions
 4695|     42|        case 4: {
  ------------------
  |  Branch (4695:9): [True: 42, False: 174]
  ------------------
 4696|     42|          std::string chunk(start_piece, iter);
 4697|     42|          np++;
 4698|     42|          if (complexprefixes) {
  ------------------
  |  Branch (4698:15): [True: 4, False: 38]
  ------------------
 4699|      4|            if (utf8)
  ------------------
  |  Branch (4699:17): [True: 0, False: 4]
  ------------------
 4700|      0|              reverseword_utf(chunk);
 4701|      4|            else
 4702|      4|              reverseword(chunk);
 4703|      4|            reverse_condition(chunk);
 4704|      4|          }
 4705|     42|          if (!entry->strip.empty() && chunk != "." &&
  ------------------
  |  Branch (4705:15): [True: 6, False: 36]
  |  Branch (4705:40): [True: 6, False: 0]
  ------------------
 4706|      6|              redundant_condition(at, entry->strip, chunk,
  ------------------
  |  Branch (4706:15): [True: 6, False: 0]
  ------------------
 4707|      6|                                  af->getlinenum()))
 4708|      6|            chunk = ".";
 4709|     42|          if (at == 'S') {
  ------------------
  |  Branch (4709:15): [True: 34, False: 8]
  ------------------
 4710|     34|            reverseword(chunk);
 4711|     34|            reverse_condition(chunk);
 4712|     34|          }
 4713|     42|          if (encodeit(*entry, chunk))
  ------------------
  |  Branch (4713:15): [True: 0, False: 42]
  ------------------
 4714|      0|            return false;
 4715|     42|          break;
 4716|     42|        }
 4717|       |
 4718|     42|        case 5: {
  ------------------
  |  Branch (4718:9): [True: 6, False: 210]
  ------------------
 4719|      6|          std::string chunk(start_piece, iter);
 4720|      6|          np++;
 4721|      6|          if (pHMgr->is_aliasm()) {
  ------------------
  |  Branch (4721:15): [True: 0, False: 6]
  ------------------
 4722|      0|            int index = atoi(chunk.c_str());
 4723|      0|            entry->morphcode = pHMgr->get_aliasm(index);
 4724|      6|          } else {
 4725|      6|            if (complexprefixes) {  // XXX - fix me for morph. gen.
  ------------------
  |  Branch (4725:17): [True: 0, False: 6]
  ------------------
 4726|      0|              if (utf8)
  ------------------
  |  Branch (4726:19): [True: 0, False: 0]
  ------------------
 4727|      0|                reverseword_utf(chunk);
 4728|      0|              else
 4729|      0|                reverseword(chunk);
 4730|      0|            }
 4731|       |            // add the remaining of the line
 4732|      6|            std::string::const_iterator end = nl.end();
 4733|      6|            if (iter != end) {
  ------------------
  |  Branch (4733:17): [True: 0, False: 6]
  ------------------
 4734|      0|              chunk.append(iter, end);
 4735|      0|            }
 4736|      6|            entry->morphcode = mystrdup(chunk.c_str());
 4737|      6|          }
 4738|      6|          break;
 4739|     42|        }
 4740|      0|        default:
  ------------------
  |  Branch (4740:9): [True: 0, False: 216]
  ------------------
 4741|      0|          break;
 4742|    216|      }
 4743|    216|      i++;
 4744|    216|      start_piece = mystrsep(nl, iter);
 4745|    216|    }
 4746|       |    // check to make sure we parsed enough pieces
 4747|     42|    if (np < 4) {
  ------------------
  |  Branch (4747:9): [True: 0, False: 42]
  ------------------
 4748|      0|      std::string err = pHMgr->encode_flag(aflag);
 4749|      0|      HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n",
 4750|      0|                       af->getlinenum(), err.c_str());
 4751|      0|      return false;
 4752|      0|    }
 4753|       |
 4754|       |#ifdef DEBUG
 4755|       |    // detect unnecessary fields, excepting comments
 4756|       |    if (basefieldnum) {
 4757|       |      int fieldnum =
 4758|       |          !(entry->morphcode) ? 5 : ((*(entry->morphcode) == '#') ? 5 : 6);
 4759|       |      if (fieldnum != basefieldnum)
 4760|       |        HUNSPELL_WARNING(stderr, "warning: line %d: bad field number\n",
 4761|       |                         af->getlinenum());
 4762|       |    } else {
 4763|       |      basefieldnum =
 4764|       |          !(entry->morphcode) ? 5 : ((*(entry->morphcode) == '#') ? 5 : 6);
 4765|       |    }
 4766|       |#endif
 4767|     42|  }
 4768|       |
 4769|       |  // now create SfxEntry or PfxEntry objects and use links to
 4770|       |  // build an ordered (sorted by affix string) list
 4771|     26|  auto start = affentries.begin(), end = affentries.end();
 4772|     68|  for (auto affentry = start; affentry != end; ++affentry) {
  ------------------
  |  Branch (4772:31): [True: 42, False: 26]
  ------------------
 4773|     42|    if (at == 'P') {
  ------------------
  |  Branch (4773:9): [True: 8, False: 34]
  ------------------
 4774|      8|      build_pfxtree(static_cast<PfxEntry*>(*affentry));
 4775|     34|    } else {
 4776|     34|      build_sfxtree(static_cast<SfxEntry*>(*affentry));
 4777|     34|    }
 4778|     42|  }
 4779|       |
 4780|       |  //contents belong to AffixMgr now
 4781|     26|  affentries.release();
 4782|       |
 4783|     26|  return true;
 4784|     26|}
_ZN8AffixMgr19redundant_conditionEcRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_i:
 4789|      6|                                  int linenum) {
 4790|      6|  int stripl = strip.size(), condl = cond.size(), i, j, neg, in;
 4791|      6|  if (ft == 'P') {  // prefix
  ------------------
  |  Branch (4791:7): [True: 0, False: 6]
  ------------------
 4792|      0|    if (strip.compare(0, condl, cond) == 0)
  ------------------
  |  Branch (4792:9): [True: 0, False: 0]
  ------------------
 4793|      0|      return 1;
 4794|      0|    if (utf8) {
  ------------------
  |  Branch (4794:9): [True: 0, False: 0]
  ------------------
 4795|      0|    } else {
 4796|      0|      for (i = 0, j = 0; (i < stripl) && (j < condl); i++, j++) {
  ------------------
  |  Branch (4796:26): [True: 0, False: 0]
  |  Branch (4796:42): [True: 0, False: 0]
  ------------------
 4797|      0|        if (cond[j] != '[') {
  ------------------
  |  Branch (4797:13): [True: 0, False: 0]
  ------------------
 4798|      0|          if (cond[j] != strip[i]) {
  ------------------
  |  Branch (4798:15): [True: 0, False: 0]
  ------------------
 4799|      0|            HUNSPELL_WARNING(stderr,
 4800|      0|                             "warning: line %d: incompatible stripping "
 4801|      0|                             "characters and condition\n",
 4802|      0|                             linenum);
 4803|      0|            return 0;
 4804|      0|          }
 4805|      0|        } else {
 4806|      0|          neg = (cond[j + 1] == '^') ? 1 : 0;
  ------------------
  |  Branch (4806:17): [True: 0, False: 0]
  ------------------
 4807|      0|          in = 0;
 4808|      0|          do {
 4809|      0|            j++;
 4810|      0|            if (strip[i] == cond[j])
  ------------------
  |  Branch (4810:17): [True: 0, False: 0]
  ------------------
 4811|      0|              in = 1;
 4812|      0|          } while ((j < (condl - 1)) && (cond[j] != ']'));
  ------------------
  |  Branch (4812:20): [True: 0, False: 0]
  |  Branch (4812:41): [True: 0, False: 0]
  ------------------
 4813|      0|          if (j == (condl - 1) && (cond[j] != ']')) {
  ------------------
  |  Branch (4813:15): [True: 0, False: 0]
  |  Branch (4813:35): [True: 0, False: 0]
  ------------------
 4814|      0|            HUNSPELL_WARNING(stderr,
 4815|      0|                             "error: line %d: missing ] in condition:\n%s\n",
 4816|      0|                             linenum, cond.c_str());
 4817|      0|            return 0;
 4818|      0|          }
 4819|      0|          if ((!neg && !in) || (neg && in)) {
  ------------------
  |  Branch (4819:16): [True: 0, False: 0]
  |  Branch (4819:24): [True: 0, False: 0]
  |  Branch (4819:33): [True: 0, False: 0]
  |  Branch (4819:40): [True: 0, False: 0]
  ------------------
 4820|      0|            HUNSPELL_WARNING(stderr,
 4821|      0|                             "warning: line %d: incompatible stripping "
 4822|      0|                             "characters and condition\n",
 4823|      0|                             linenum);
 4824|      0|            return 0;
 4825|      0|          }
 4826|      0|        }
 4827|      0|      }
 4828|      0|      if (j >= condl)
  ------------------
  |  Branch (4828:11): [True: 0, False: 0]
  ------------------
 4829|      0|        return 1;
 4830|      0|    }
 4831|      6|  } else {  // suffix
 4832|      6|    if ((stripl >= condl) && strip.compare(stripl - condl, std::string::npos, cond) == 0)
  ------------------
  |  Branch (4832:9): [True: 6, False: 0]
  |  Branch (4832:30): [True: 6, False: 0]
  ------------------
 4833|      6|      return 1;
 4834|      0|    if (utf8) {
  ------------------
  |  Branch (4834:9): [True: 0, False: 0]
  ------------------
 4835|      0|    } else {
 4836|      0|      for (i = stripl - 1, j = condl - 1; (i >= 0) && (j >= 0); i--, j--) {
  ------------------
  |  Branch (4836:43): [True: 0, False: 0]
  |  Branch (4836:55): [True: 0, False: 0]
  ------------------
 4837|      0|        if (cond[j] != ']') {
  ------------------
  |  Branch (4837:13): [True: 0, False: 0]
  ------------------
 4838|      0|          if (cond[j] != strip[i]) {
  ------------------
  |  Branch (4838:15): [True: 0, False: 0]
  ------------------
 4839|      0|            HUNSPELL_WARNING(stderr,
 4840|      0|                             "warning: line %d: incompatible stripping "
 4841|      0|                             "characters and condition\n",
 4842|      0|                             linenum);
 4843|      0|            return 0;
 4844|      0|          }
 4845|      0|        } else if (j > 0) {
  ------------------
  |  Branch (4845:20): [True: 0, False: 0]
  ------------------
 4846|      0|          in = 0;
 4847|      0|          do {
 4848|      0|            j--;
 4849|      0|            if (strip[i] == cond[j])
  ------------------
  |  Branch (4849:17): [True: 0, False: 0]
  ------------------
 4850|      0|              in = 1;
 4851|      0|          } while ((j > 0) && (cond[j] != '['));
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  |  Branch (4851:31): [True: 0, False: 0]
  ------------------
 4852|      0|          if ((j == 0) && (cond[j] != '[')) {
  ------------------
  |  Branch (4852:15): [True: 0, False: 0]
  |  Branch (4852:27): [True: 0, False: 0]
  ------------------
 4853|      0|            HUNSPELL_WARNING(stderr,
 4854|      0|                             "error: line: %d: missing ] in condition:\n%s\n",
 4855|      0|                             linenum, cond.c_str());
 4856|      0|            return 0;
 4857|      0|          }
 4858|      0|          neg = (cond[j + 1] == '^') ? 1 : 0;
  ------------------
  |  Branch (4858:17): [True: 0, False: 0]
  ------------------
 4859|      0|          if ((!neg && !in) || (neg && in)) {
  ------------------
  |  Branch (4859:16): [True: 0, False: 0]
  |  Branch (4859:24): [True: 0, False: 0]
  |  Branch (4859:33): [True: 0, False: 0]
  |  Branch (4859:40): [True: 0, False: 0]
  ------------------
 4860|      0|            HUNSPELL_WARNING(stderr,
 4861|      0|                             "warning: line %d: incompatible stripping "
 4862|      0|                             "characters and condition\n",
 4863|      0|                             linenum);
 4864|      0|            return 0;
 4865|      0|          }
 4866|      0|        }
 4867|      0|      }
 4868|      0|      if (j < 0)
  ------------------
  |  Branch (4868:11): [True: 0, False: 0]
  ------------------
 4869|      0|        return 1;
 4870|      0|    }
 4871|      0|  }
 4872|      0|  return 0;
 4873|      6|}
_ZN8AffixMgr8isSubsetEPKcS1_:
 1069|  75.6k|inline int AffixMgr::isSubset(const char* s1, const char* s2) {
 1070|   101k|  while (((*s1 == *s2) || (*s1 == '.')) && (*s1 != '\0') && (*s2 != '\0')) {
  ------------------
  |  Branch (1070:11): [True: 76.1k, False: 25.1k]
  |  Branch (1070:27): [True: 0, False: 25.1k]
  |  Branch (1070:44): [True: 25.7k, False: 50.4k]
  |  Branch (1070:61): [True: 25.7k, False: 0]
  ------------------
 1071|  25.7k|    s1++;
 1072|  25.7k|    s2++;
 1073|  25.7k|  }
 1074|  75.6k|  return (*s1 == '\0');
 1075|  75.6k|}
_ZN8AffixMgr11isRevSubsetEPKcS1_i:
 2725|   473k|                                 int len) {
 2726|   948k|  while ((len > 0) && (*s1 != '\0') && ((*s1 == *end_of_s2) || (*s1 == '.'))) {
  ------------------
  |  Branch (2726:10): [True: 942k, False: 6.56k]
  |  Branch (2726:23): [True: 578k, False: 363k]
  |  Branch (2726:41): [True: 475k, False: 103k]
  |  Branch (2726:64): [True: 0, False: 103k]
  ------------------
 2727|   475k|    s1++;
 2728|   475k|    end_of_s2--;
 2729|   475k|    len--;
 2730|   475k|  }
 2731|   473k|  return (*s1 == '\0');
 2732|   473k|}
affixmgr.cxx:_ZN12_GLOBAL__N_18mystrdupEPKc:
 3389|   529k|  char* mystrdup(const char* s) {
 3390|   529k|    char* d = nullptr;
 3391|   529k|    if (s) {
  ------------------
  |  Branch (3391:9): [True: 529k, False: 0]
  ------------------
 3392|   529k|      size_t sl = strlen(s) + 1;
 3393|   529k|      d = new char[sl];
 3394|   529k|      memcpy(d, s, sl);
 3395|   529k|    }
 3396|   529k|    return d;
 3397|   529k|  }
_ZN17entries_containerC2EcP8AffixMgr:
 4435|     26|    : m_mgr(mgr)
 4436|     26|    , m_at(at) {
 4437|     26|  }
_ZN17entries_container10initializeEict:
 4442|     26|                  char opts, unsigned short aflag) {
 4443|     26|    entries.reserve(std::min(numents, 16384));
 4444|       |
 4445|     26|    if (m_at == 'P') {
  ------------------
  |  Branch (4445:9): [True: 8, False: 18]
  ------------------
 4446|      8|      entries.push_back(new PfxEntry(m_mgr));
 4447|     18|    } else {
 4448|     18|      entries.push_back(new SfxEntry(m_mgr));
 4449|     18|    }
 4450|       |
 4451|     26|    entries.back()->opts = opts;
 4452|     26|    entries.back()->aflag = aflag;
 4453|     26|  }
_ZN17entries_container11first_entryEv:
 4466|     42|  AffEntry* first_entry() { return entries.empty() ? nullptr : entries[0]; }
  ------------------
  |  Branch (4466:36): [True: 0, False: 42]
  ------------------
_ZN17entries_container9add_entryEc:
 4455|     16|  AffEntry* add_entry(char opts) {
 4456|     16|    if (m_at == 'P') {
  ------------------
  |  Branch (4456:9): [True: 0, False: 16]
  ------------------
 4457|      0|      entries.push_back(new PfxEntry(m_mgr));
 4458|     16|    } else {
 4459|     16|      entries.push_back(new SfxEntry(m_mgr));
 4460|     16|    }
 4461|     16|    AffEntry* ret = entries.back();
 4462|     16|    ret->opts = entries[0]->opts & opts;
 4463|     16|    return ret;
 4464|     16|  }
_ZN17entries_container5beginEv:
 4474|     26|  std::vector<AffEntry*>::iterator begin() { return entries.begin(); }
_ZN17entries_container3endEv:
 4475|     26|  std::vector<AffEntry*>::iterator end() { return entries.end(); }
_ZN17entries_container7releaseEv:
 4438|     26|  void release() {
 4439|     26|    entries.clear();
 4440|     26|  }
_ZN17entries_containerD2Ev:
 4468|     26|  ~entries_container() {
 4469|     26|    for (auto& entry : entries) {
  ------------------
  |  Branch (4469:22): [True: 0, False: 26]
  ------------------
 4470|      0|      delete entry;
 4471|      0|    }
 4472|     26|  }
affixmgr.cxx:_ZZN8AffixMgr12get_syllableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEENK3$_1clE6w_char:
 1574|  1.71k|          [&](w_char wc) {
 1575|  1.71k|            return std::binary_search(cpdvowels_utf16.begin(), cpdvowels_utf16.end(), wc);
 1576|  1.71k|          });

_ZN9guesswordC2Ev:
  118|  4.59M|    : word(nullptr)
  119|  4.59M|    , allow(false)
  120|  4.59M|    , orig(nullptr)
  121|  4.59M|  {
  122|  4.59M|  }
_ZN8patentryC2Ev:
  135|      4|    : cond(FLAG_NULL)
  ------------------
  |  |   96|      4|#define FLAG_NULL 0x00
  ------------------
  136|      4|    , cond2(FLAG_NULL) {
  ------------------
  |  |   96|      4|#define FLAG_NULL 0x00
  ------------------
  137|      4|  }
csutil.cxx:_ZL16HUNSPELL_WARNINGP8_IO_FILEPKcz:
   48|  1.33M|static inline void HUNSPELL_WARNING(FILE*, const char*, ...) {}

_ZN8AffEntryC2Ev:
   46|     42|      : morphcode(nullptr)
   47|     42|      , contclass(nullptr)
   48|     42|      , aflag(0)
   49|     42|      , contclasslen(0)
   50|     42|      , numconds(0)
   51|     42|      , opts(0) {}

_Z6myopenRNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEEPKcj:
  111|    114|{
  112|       |#if defined(_WIN32) && defined(_MSC_VER)
  113|       |#define WIN32_LONG_PATH_PREFIX "\\\\?\\"
  114|       |  if (strncmp(path, WIN32_LONG_PATH_PREFIX, 4) == 0) {
  115|       |    int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0);
  116|       |    wchar_t* buff = new wchar_t[len];
  117|       |    wchar_t* buff2 = new wchar_t[len];
  118|       |    MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len);
  119|       |    if (_wfullpath(buff2, buff, len) != NULL) {
  120|       |      stream.open(buff2, mode);
  121|       |    }
  122|       |    delete [] buff;
  123|       |    delete [] buff2;
  124|       |  }
  125|       |  else
  126|       |#endif
  127|    114|  stream.open(path, mode);
  128|    114|}
_Z6u16_u8RNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6vectorI6w_charNS3_IS8_EEEE:
  135|  20.6M|std::string& u16_u8(std::string& dest, const std::vector<w_char>& src) {
  136|  20.6M|  dest.clear();
  137|  20.6M|  dest.reserve(src.size());
  138|   539M|  for (const w_char& wc : src) {
  ------------------
  |  Branch (138:25): [True: 539M, False: 20.6M]
  ------------------
  139|   539M|    uint16_t cp = (static_cast<uint16_t>(wc.h) << 8) | wc.l;
  140|   539M|    if (cp < 0x80) {
  ------------------
  |  Branch (140:9): [True: 478M, False: 60.7M]
  ------------------
  141|   478M|      dest.push_back(static_cast<char>(cp));
  142|   478M|    } else if (cp < 0x800) {
  ------------------
  |  Branch (142:16): [True: 2.31M, False: 58.4M]
  ------------------
  143|  2.31M|      dest.push_back(static_cast<char>(0xc0 | (cp >> 6)));
  144|  2.31M|      dest.push_back(static_cast<char>(0x80 | (cp & 0x3f)));
  145|  58.4M|    } else {
  146|  58.4M|      dest.push_back(static_cast<char>(0xe0 | (cp >> 12)));
  147|  58.4M|      dest.push_back(static_cast<char>(0x80 | ((cp >> 6) & 0x3f)));
  148|  58.4M|      dest.push_back(static_cast<char>(0x80 | (cp & 0x3f)));
  149|  58.4M|    }
  150|   539M|  }
  151|  20.6M|  return dest;
  152|  20.6M|}
_Z6u8_u16RNSt3__16vectorI6w_charNS_9allocatorIS1_EEEERKNS_12basic_stringIcNS_11char_traitsIcEENS2_IcEEEEb:
  170|  4.27M|int u8_u16(std::vector<w_char>& dest, const std::string& src, bool only_convert_first_letter) {
  171|       |  // faster to oversize initially, assign to elements and resize to what's used
  172|       |  // than to reserve and push_back
  173|  4.27M|  dest.resize(only_convert_first_letter ? 1 : src.size());
  ------------------
  |  Branch (173:15): [True: 0, False: 4.27M]
  ------------------
  174|  4.27M|  auto out = dest.begin();
  175|  4.27M|  auto p = src.begin(), end = src.end();
  176|       |
  177|  36.5M|  while (p < end) {
  ------------------
  |  Branch (177:10): [True: 32.5M, False: 4.07M]
  ------------------
  178|  32.5M|    uint8_t b0 = static_cast<uint8_t>(*p);
  179|  32.5M|    uint16_t cp;
  180|       |
  181|  32.5M|    if (b0 < 0x80) {
  ------------------
  |  Branch (181:9): [True: 29.3M, False: 3.12M]
  ------------------
  182|       |      // 1-byte ASCII
  183|  29.3M|      cp = b0;
  184|  29.3M|    } else if (b0 < 0xc0) {
  ------------------
  |  Branch (184:16): [True: 451k, False: 2.67M]
  ------------------
  185|       |      // continuation byte at lead position
  186|   451k|      HUNSPELL_WARNING(stderr,
  187|   451k|                       "UTF-8 encoding error. Unexpected continuation bytes "
  188|   451k|                       "in %ld. character position\n%s\n",
  189|   451k|                       static_cast<long>(std::distance(src.begin(), p)),
  190|   451k|                       src.c_str());
  191|   451k|      cp = 0xfffd;
  192|  2.67M|    } else if (b0 < 0xe0) {
  ------------------
  |  Branch (192:16): [True: 821k, False: 1.85M]
  ------------------
  193|       |      // 2-byte sequence: 110xxxxx 10yyyyyy
  194|   821k|      if (p + 1 < end && is_utf8_cont(p[1])) {
  ------------------
  |  Branch (194:11): [True: 716k, False: 105k]
  |  Branch (194:11): [True: 220k, False: 600k]
  |  Branch (194:26): [True: 220k, False: 495k]
  ------------------
  195|   220k|        cp = ((b0 & 0x1f) << 6) | (static_cast<uint8_t>(p[1]) & 0x3f);
  196|   220k|        ++p;  // step past lead; loop bottom steps past cont
  197|   600k|      } else {
  198|   600k|        warn_missing_cont(src, p);
  199|   600k|        cp = 0xfffd;
  200|   600k|      }
  201|  1.85M|    } else if (b0 < 0xf0) {
  ------------------
  |  Branch (201:16): [True: 1.65M, False: 194k]
  ------------------
  202|       |      // 3-byte sequence: 1110xxxx 10yyyyyy 10zzzzzz
  203|  1.65M|      if (p + 1 < end && is_utf8_cont(p[1])) {
  ------------------
  |  Branch (203:11): [True: 1.63M, False: 22.9k]
  |  Branch (203:11): [True: 1.58M, False: 78.1k]
  |  Branch (203:26): [True: 1.58M, False: 55.2k]
  ------------------
  204|  1.58M|        uint8_t b1 = static_cast<uint8_t>(p[1]);
  205|  1.58M|        ++p;  // step past lead
  206|  1.58M|        if (p + 1 < end && is_utf8_cont(p[1])) {
  ------------------
  |  Branch (206:13): [True: 1.57M, False: 6.47k]
  |  Branch (206:13): [True: 1.57M, False: 8.16k]
  |  Branch (206:28): [True: 1.57M, False: 1.69k]
  ------------------
  207|  1.57M|          cp = ((b0 & 0x0f) << 12) | ((b1 & 0x3f) << 6) | (static_cast<uint8_t>(p[1]) & 0x3f);
  208|  1.57M|          ++p;  // step past first cont; loop bottom steps past second cont
  209|  1.57M|        } else {
  210|  8.16k|          warn_missing_cont(src, p);
  211|  8.16k|          cp = 0xfffd;
  212|  8.16k|        }
  213|  1.58M|      } else {
  214|  78.1k|        warn_missing_cont(src, p);
  215|  78.1k|        cp = 0xfffd;
  216|  78.1k|      }
  217|  1.65M|    } else {
  218|       |      // 4+ byte lead: codepoint >= U+10000, can't fit in w_char
  219|   194k|      HUNSPELL_WARNING(stderr,
  220|   194k|                       "This UTF-8 encoding can't convert to UTF-16:\n%s\n",
  221|   194k|                       src.c_str());
  222|   194k|      out->h = 0xff;
  223|   194k|      out->l = 0xfd;
  224|   194k|      ++out;
  225|   194k|      dest.resize(out - dest.begin());
  226|   194k|      return -1;
  227|   194k|    }
  228|       |
  229|  32.3M|    out->h = static_cast<unsigned char>(cp >> 8);
  230|  32.3M|    out->l = static_cast<unsigned char>(cp);
  231|  32.3M|    ++out;
  232|  32.3M|    if (only_convert_first_letter)
  ------------------
  |  Branch (232:9): [True: 0, False: 32.3M]
  ------------------
  233|      0|      break;
  234|  32.3M|    ++p;  // consume lead byte
  235|  32.3M|  }
  236|       |
  237|  4.07M|  int size = static_cast<int>(out - dest.begin());
  238|  4.07M|  dest.resize(size);
  239|  4.07M|  return size;
  240|  4.27M|}
_Z8mystrsepRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERNS_11__wrap_iterIPKcEE:
  255|  1.80k|                                     std::string::const_iterator& start) {
  256|  1.80k|  auto end = str.end();
  257|       |
  258|  1.80k|  is_any_of op(" \t");
  259|       |  // don't use isspace() here, the string can be in some random charset
  260|       |  // that's way different than the locale's
  261|  1.80k|  auto sp = start;
  262|  5.87k|  while (sp != end && op(*sp))
  ------------------
  |  Branch (262:10): [True: 5.43k, False: 442]
  |  Branch (262:23): [True: 4.07k, False: 1.35k]
  ------------------
  263|  4.07k|      ++sp;
  264|       |
  265|  1.80k|  auto dp = sp;
  266|  6.69k|  while (dp != end && !op(*dp))
  ------------------
  |  Branch (266:10): [True: 5.81k, False: 882]
  |  Branch (266:23): [True: 4.89k, False: 918]
  ------------------
  267|  4.89k|      ++dp;
  268|       |
  269|  1.80k|  start = dp;
  270|  1.80k|  return sp;
  271|  1.80k|}
_Z7mychompRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  274|  1.99k|void mychomp(std::string& s) {
  275|  1.99k|  size_t k = s.size();
  276|  1.99k|  size_t newsize = k;
  277|  1.99k|  if ((k > 0) && ((s[k - 1] == '\r') || (s[k - 1] == '\n')))
  ------------------
  |  Branch (277:7): [True: 1.80k, False: 190]
  |  Branch (277:19): [True: 0, False: 1.80k]
  |  Branch (277:41): [True: 0, False: 1.80k]
  ------------------
  278|      0|    --newsize;
  279|  1.99k|  if ((k > 1) && (s[k - 2] == '\r'))
  ------------------
  |  Branch (279:7): [True: 1.60k, False: 384]
  |  Branch (279:18): [True: 0, False: 1.60k]
  ------------------
  280|      0|    --newsize;
  281|  1.99k|  s.resize(newsize);
  282|  1.99k|}
_Z8line_tokRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEc:
  285|   243k|std::vector<std::string> line_tok(const std::string& text, char breakchar) {
  286|   243k|  std::vector<std::string> ret;
  287|   243k|  if (text.empty()) {
  ------------------
  |  Branch (287:7): [True: 8.69k, False: 234k]
  ------------------
  288|  8.69k|    return ret;
  289|  8.69k|  }
  290|       |
  291|   234k|  std::stringstream ss(text);
  292|   234k|  std::string tok;
  293|   482k|  while(std::getline(ss, tok, breakchar)) {
  ------------------
  |  Branch (293:9): [True: 248k, False: 234k]
  ------------------
  294|   248k|    if (!tok.empty()) {
  ------------------
  |  Branch (294:9): [True: 248k, False: 71]
  ------------------
  295|   248k|      ret.push_back(tok);
  296|   248k|    }
  297|   248k|  }
  298|       |
  299|   234k|  return ret;
  300|   243k|}
_Z9line_uniqRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEc:
  312|  10.7k|{
  313|  10.7k|  std::vector<std::string> lines = line_tok(text, breakchar);
  314|  10.7k|  text.clear();
  315|  10.7k|  if (lines.empty()) {
  ------------------
  |  Branch (315:7): [True: 8.68k, False: 2.10k]
  ------------------
  316|  8.68k|    return;
  317|  8.68k|  }
  318|       |
  319|  2.10k|  drop_repeated_lines(lines);
  320|       |
  321|  2.10k|  text = lines[0];
  322|  2.11k|  for (size_t i = 1; i < lines.size(); ++i) {
  ------------------
  |  Branch (322:22): [True: 10, False: 2.10k]
  ------------------
  323|     10|    text.push_back(breakchar);
  324|     10|    text.append(lines[i]);
  325|     10|  }
  326|  2.10k|}
_Z21append_compound_partsRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_:
  375|   230k|size_t append_compound_parts(const std::string& desc, std::string& result) {
  376|       |  // find by offset, a search from a bare pointer remeasures the rest of desc on every step
  377|   230k|  size_t part = desc.find(MORPH_PART);
  ------------------
  |  |  116|   230k|#define MORPH_PART "pa:"
  ------------------
  378|   230k|  if (part == std::string::npos)
  ------------------
  |  Branch (378:7): [True: 230k, False: 0]
  ------------------
  379|   230k|    return 0;
  380|      0|  size_t nextpart = desc.find(MORPH_PART, part + 1);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
  381|      0|  while (nextpart != std::string::npos) {
  ------------------
  |  Branch (381:10): [True: 0, False: 0]
  ------------------
  382|      0|    const char* field = desc.c_str() + part + MORPH_TAG_LEN;
  ------------------
  |  |  119|      0|#define MORPH_TAG_LEN strlen(MORPH_STEM)
  |  |  ------------------
  |  |  |  |  103|      0|#define MORPH_STEM "st:"
  |  |  ------------------
  ------------------
  383|      0|    result.append(field, fieldlen(field));
  384|      0|    part = nextpart;
  385|      0|    nextpart = desc.find(MORPH_PART, part + 1);
  ------------------
  |  |  116|      0|#define MORPH_PART "pa:"
  ------------------
  386|      0|  }
  387|      0|  return part;
  388|   230k|}
_Z10copy_fieldRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKS5_S8_:
  392|   229k|                const std::string& var) {
  393|   229k|  if (morph.empty())
  ------------------
  |  Branch (393:7): [True: 0, False: 229k]
  ------------------
  394|      0|    return false;
  395|   229k|  size_t pos = morph.find(var);
  396|   229k|  if (pos == std::string::npos)
  ------------------
  |  Branch (396:7): [True: 15, False: 229k]
  ------------------
  397|     15|    return false;
  398|   229k|  pos += MORPH_TAG_LEN;
  ------------------
  |  |  119|   229k|#define MORPH_TAG_LEN strlen(MORPH_STEM)
  |  |  ------------------
  |  |  |  |  103|   229k|#define MORPH_STEM "st:"
  |  |  ------------------
  ------------------
  399|       |  // copy the field value up to the next whitespace, without first
  400|       |  // making a throwaway copy of the whole remaining tail of the string
  401|   229k|  size_t end = morph.find_first_of(" \t\n", pos);
  402|   229k|  dest.assign(morph, pos, end == std::string::npos ? std::string::npos : end - pos);
  ------------------
  |  Branch (402:27): [True: 229k, False: 0]
  ------------------
  403|       |
  404|   229k|  return true;
  405|   229k|}
_Z8mystrrepRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKS5_S8_:
  409|   927k|                      const std::string& replace) {
  410|   927k|  size_t pos = 0;
  411|  1.05M|  while ((pos = str.find(search, pos)) != std::string::npos) {
  ------------------
  |  Branch (411:10): [True: 128k, False: 927k]
  ------------------
  412|   128k|    str.replace(pos, search.length(), replace);
  413|   128k|    pos += replace.length();
  414|   128k|  }
  415|   927k|  return str;
  416|   927k|}
_Z11reversewordRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
  419|  1.00M|size_t reverseword(std::string& word) {
  420|  1.00M|  std::reverse(word.begin(), word.end());
  421|  1.00M|  return word.size();
  422|  1.00M|}
_Z8uniqlistRNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEEE:
  499|  5.84k|void uniqlist(std::vector<std::string>& list) {
  500|  5.84k|  if (list.size() < 2)
  ------------------
  |  Branch (500:7): [True: 5.84k, False: 0]
  ------------------
  501|  5.84k|    return;
  502|       |
  503|      0|  std::vector<std::string> ret;
  504|      0|  ret.push_back(list[0]);
  505|       |
  506|      0|  for (size_t i = 1; i < list.size(); ++i) {
  ------------------
  |  Branch (506:22): [True: 0, False: 0]
  ------------------
  507|      0|    if (std::find(ret.begin(), ret.end(), list[i]) == ret.end())
  ------------------
  |  Branch (507:9): [True: 0, False: 0]
  ------------------
  508|      0|        ret.push_back(list[i]);
  509|      0|  }
  510|       |
  511|      0|  list.swap(ret);
  512|      0|}
_Z9upper_utf6w_chari:
  531|  3.87M|w_char upper_utf(w_char u, int langnum) {
  532|       |
  533|  3.87M|#if defined(_WIN32) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__))  || defined(__LITTLE_ENDIAN__)
  534|       |
  535|       |//with these optimizations, msvc can optimize this function to one jmp instruction
  536|       |//but g++ remains in five instructions
  537|       |//maybe use inline asm for g++?
  538|       |
  539|       |#if (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) && defined __cpp_lib_bit_cast && __cpp_lib_bit_cast >= 201806L
  540|       |  return std::bit_cast<w_char>(unicodetoupper((unsigned short)u, langnum));
  541|       |#else
  542|  3.87M|  const auto us = unicodetoupper((unsigned short)u, langnum);
  543|  3.87M|  memcpy(&u, &us, sizeof(unsigned short));
  544|  3.87M|  return u;
  545|  3.87M|#endif
  546|       |
  547|       |#else
  548|       |  const auto us = unicodetoupper((unsigned short)u, langnum);
  549|       |  u.h = (unsigned char)(us >> 8);
  550|       |  u.l = (unsigned char)(us & 0xff);
  551|       |  return u;
  552|       |#endif
  553|  3.87M|}
_Z9lower_utf6w_chari:
  555|  6.17M|w_char lower_utf(w_char u, int langnum) {
  556|       |
  557|  6.17M|#if defined(_WIN32) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__))  || defined(__LITTLE_ENDIAN__)
  558|       |
  559|       |//with these optimizations, msvc can optimize this function to one jmp instruction
  560|       |//but g++ remains in five instructions
  561|       |//maybe use inline asm for g++?
  562|       |
  563|       |#if (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) && defined __cpp_lib_bit_cast && __cpp_lib_bit_cast >= 201806L
  564|       |  return std::bit_cast<w_char>(unicodetolower((unsigned short)u, langnum));
  565|       |#else
  566|  6.17M|  const auto us = unicodetolower((unsigned short)u, langnum);
  567|  6.17M|  memcpy(&u, &us, sizeof(unsigned short));
  568|  6.17M|  return u;
  569|  6.17M|#endif
  570|       |
  571|       |#else
  572|       |  const auto us = unicodetolower((unsigned short)u, langnum);
  573|       |  u.h = (unsigned char)(us >> 8);
  574|       |  u.l = (unsigned char)(us & 0xff);
  575|       |  return u;
  576|       |#endif
  577|  6.17M|}
_Z8mkallcapRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPK7cs_info:
  580|   259k|std::string& mkallcap(std::string& s, const struct cs_info* csconv) {
  581|  5.12M|  for (char& aI : s) {
  ------------------
  |  Branch (581:17): [True: 5.12M, False: 259k]
  ------------------
  582|  5.12M|    aI = cupper(csconv, static_cast<unsigned char>(aI));
  583|  5.12M|  }
  584|   259k|  return s;
  585|   259k|}
_Z10mkallsmallRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPK7cs_info:
  588|  1.85M|std::string& mkallsmall(std::string& s, const struct cs_info* csconv) {
  589|  20.2M|  for (char& aI : s) {
  ------------------
  |  Branch (589:17): [True: 20.2M, False: 1.85M]
  ------------------
  590|  20.2M|    aI = clower(csconv, static_cast<unsigned char>(aI));
  591|  20.2M|  }
  592|  1.85M|  return s;
  593|  1.85M|}
_Z14mkallsmall_utfRNSt3__16vectorI6w_charNS_9allocatorIS1_EEEEi:
  595|   882k|std::vector<w_char>& mkallsmall_utf(std::vector<w_char>& u, int langnum) {
  596|  6.12M|  for (auto& i : u) {
  ------------------
  |  Branch (596:16): [True: 6.12M, False: 882k]
  ------------------
  597|  6.12M|    i = lower_utf(i, langnum);
  598|  6.12M|  }
  599|   882k|  return u;
  600|   882k|}
_Z12mkallcap_utfRNSt3__16vectorI6w_charNS_9allocatorIS1_EEEEi:
  602|   150k|std::vector<w_char>& mkallcap_utf(std::vector<w_char>& u, int langnum) {
  603|  1.78M|  for (auto& i : u) {
  ------------------
  |  Branch (603:16): [True: 1.78M, False: 150k]
  ------------------
  604|  1.78M|    i = upper_utf(i, langnum);
  605|  1.78M|  }
  606|   150k|  return u;
  607|   150k|}
_Z9mkinitcapRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPK7cs_info:
  609|  1.14M|std::string& mkinitcap(std::string& s, const struct cs_info* csconv) {
  610|  1.14M|  if (!s.empty()) {
  ------------------
  |  Branch (610:7): [True: 1.14M, False: 213]
  ------------------
  611|  1.14M|    s[0] = cupper(csconv, static_cast<unsigned char>(s[0]));
  612|  1.14M|  }
  613|  1.14M|  return s;
  614|  1.14M|}
_Z13mkinitcap_utfRNSt3__16vectorI6w_charNS_9allocatorIS1_EEEEi:
  616|   317k|std::vector<w_char>& mkinitcap_utf(std::vector<w_char>& u, int langnum) {
  617|   317k|  if (!u.empty()) {
  ------------------
  |  Branch (617:7): [True: 317k, False: 0]
  ------------------
  618|   317k|    u[0] = upper_utf(u[0], langnum);
  619|   317k|  }
  620|   317k|  return u;
  621|   317k|}
_Z11mkinitsmallRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPK7cs_info:
  623|   216k|std::string& mkinitsmall(std::string& s, const struct cs_info* csconv) {
  624|   216k|  if (!s.empty()) {
  ------------------
  |  Branch (624:7): [True: 216k, False: 0]
  ------------------
  625|   216k|    s[0] = clower(csconv, static_cast<unsigned char>(s[0]));
  626|   216k|  }
  627|   216k|  return s;
  628|   216k|}
_Z15mkinitsmall_utfRNSt3__16vectorI6w_charNS_9allocatorIS1_EEEEi:
  630|  31.1k|std::vector<w_char>& mkinitsmall_utf(std::vector<w_char>& u, int langnum) {
  631|  31.1k|  if (!u.empty()) {
  ------------------
  |  Branch (631:7): [True: 31.1k, False: 0]
  ------------------
  632|  31.1k|    u[0] = lower_utf(u[0], langnum);
  633|  31.1k|  }
  634|  31.1k|  return u;
  635|  31.1k|}
_Z14get_current_csRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
 2293|  2.22k|const struct cs_info* get_current_cs(const std::string& es) {
 2294|  2.22k|  char* normalized_encoding = new char[es.size() + 1];
 2295|  2.22k|  toAsciiLowerAndRemoveNonAlphanumeric(es.c_str(), normalized_encoding);
 2296|       |
 2297|  2.22k|  const struct cs_info* ccs = nullptr;
 2298|  2.22k|  for (const auto& encd : encds) {
  ------------------
  |  Branch (2298:25): [True: 2.22k, False: 0]
  ------------------
 2299|  2.22k|    if (strcmp(normalized_encoding, encd.enc_name) == 0) {
  ------------------
  |  Branch (2299:9): [True: 2.22k, False: 0]
  ------------------
 2300|  2.22k|      ccs = encd.cs_table;
 2301|  2.22k|      break;
 2302|  2.22k|    }
 2303|  2.22k|  }
 2304|       |
 2305|  2.22k|  delete[] normalized_encoding;
 2306|       |
 2307|  2.22k|  if (!ccs) {
  ------------------
  |  Branch (2307:7): [True: 0, False: 2.22k]
  ------------------
 2308|      0|    HUNSPELL_WARNING(stderr,
 2309|      0|                     "error: unknown encoding %s: using %s as fallback\n", es.c_str(),
 2310|      0|                     encds[0].enc_name);
 2311|      0|    ccs = encds[0].cs_table;
 2312|      0|  }
 2313|       |
 2314|  2.22k|  return ccs;
 2315|  2.22k|}
_Z12get_lang_numRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE:
 2445|      4|int get_lang_num(const std::string& lang) {
 2446|     72|  for (const auto& i : lang2enc) {
  ------------------
  |  Branch (2446:22): [True: 72, False: 0]
  ------------------
 2447|     72|    if (strcmp(lang.c_str(), i.lang) == 0) {
  ------------------
  |  Branch (2447:9): [True: 4, False: 68]
  ------------------
 2448|      4|      return i.num;
 2449|      4|    }
 2450|     72|  }
 2451|      0|  return LANG_xx;
 2452|      4|}
_Z14unicodetoupperti:
 2454|  26.6M|unsigned short unicodetoupper(unsigned short c, int langnum) {
 2455|       |  // In Azeri and Turkish, I and i dictinct letters:
 2456|       |  // There are a dotless lower case i pair of upper `I',
 2457|       |  // and an upper I with dot pair of lower `i'.
 2458|  26.6M|  if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr) || (langnum == LANG_crh)))
  ------------------
  |  Branch (2458:7): [True: 219k, False: 26.4M]
  |  Branch (2458:23): [True: 0, False: 219k]
  |  Branch (2458:47): [True: 0, False: 219k]
  |  Branch (2458:71): [True: 0, False: 219k]
  ------------------
 2459|      0|    return 0x0130;
 2460|       |#ifdef OPENOFFICEORG
 2461|       |  return static_cast<unsigned short>(u_toupper(c));
 2462|       |#else
 2463|       |#ifdef MOZILLA_CLIENT
 2464|       |  return ToUpperCase((char16_t)c);
 2465|       |#else
 2466|  26.6M|  unsigned short up = utf_pages[utf_page_index[c >> 8]][c & 0xFF].cupper;
 2467|  26.6M|  return up ? up : c;
  ------------------
  |  Branch (2467:10): [True: 4.25M, False: 22.4M]
  ------------------
 2468|  26.6M|#endif
 2469|  26.6M|#endif
 2470|  26.6M|}
_Z14unicodetolowerti:
 2472|  29.8M|unsigned short unicodetolower(unsigned short c, int langnum) {
 2473|       |  // In Azeri and Turkish, I and i dictinct letters:
 2474|       |  // There are a dotless lower case i pair of upper `I',
 2475|       |  // and an upper I with dot pair of lower `i'.
 2476|  29.8M|  if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr) || (langnum == LANG_crh)))
  ------------------
  |  Branch (2476:7): [True: 131k, False: 29.6M]
  |  Branch (2476:23): [True: 0, False: 131k]
  |  Branch (2476:47): [True: 0, False: 131k]
  |  Branch (2476:71): [True: 0, False: 131k]
  ------------------
 2477|      0|    return 0x0131;
 2478|       |#ifdef OPENOFFICEORG
 2479|       |  return static_cast<unsigned short>(u_tolower(c));
 2480|       |#else
 2481|       |#ifdef MOZILLA_CLIENT
 2482|       |  return ToLowerCase((char16_t)c);
 2483|       |#else
 2484|  29.8M|  unsigned short lo = utf_pages[utf_page_index[c >> 8]][c & 0xFF].clower;
 2485|  29.8M|  return lo ? lo : c;
  ------------------
  |  Branch (2485:10): [True: 2.61M, False: 27.1M]
  ------------------
 2486|  29.8M|#endif
 2487|  29.8M|#endif
 2488|  29.8M|}
_Z11get_captypeRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPK7cs_info:
 2499|  10.1M|int get_captype(const std::string& word, const cs_info* csconv) {
 2500|       |  // now determine the capitalization type of the first nl letters
 2501|  10.1M|  size_t ncap = 0;
 2502|  10.1M|  size_t nneutral = 0;
 2503|  10.1M|  size_t firstcap = 0;
 2504|  10.1M|  if (csconv == nullptr)
  ------------------
  |  Branch (2504:7): [True: 0, False: 10.1M]
  ------------------
 2505|      0|    return NOCAP;
  ------------------
  |  |   92|      0|#define NOCAP 0
  ------------------
 2506|   107M|  for (char q : word) {
  ------------------
  |  Branch (2506:15): [True: 107M, False: 10.1M]
  ------------------
 2507|   107M|    const auto nIndex = static_cast<unsigned char>(q);
 2508|   107M|    if (ccase(csconv, nIndex))
  ------------------
  |  Branch (2508:9): [True: 4.04M, False: 103M]
  ------------------
 2509|  4.04M|      ncap++;
 2510|   107M|    if (cupper(csconv, nIndex) == clower(csconv, nIndex))
  ------------------
  |  Branch (2510:9): [True: 84.6M, False: 23.0M]
  ------------------
 2511|  84.6M|      nneutral++;
 2512|   107M|  }
 2513|  10.1M|  if (ncap) {
  ------------------
  |  Branch (2513:7): [True: 1.75M, False: 8.37M]
  ------------------
 2514|  1.75M|    const auto nIndex = static_cast<unsigned char>(word[0]);
 2515|  1.75M|    firstcap = csconv[nIndex].ccase;
 2516|  1.75M|  }
 2517|       |
 2518|       |  // now finally set the captype
 2519|  10.1M|  if (ncap == 0) {
  ------------------
  |  Branch (2519:7): [True: 8.37M, False: 1.75M]
  ------------------
 2520|  8.37M|    return NOCAP;
  ------------------
  |  |   92|  8.37M|#define NOCAP 0
  ------------------
 2521|  8.37M|  } else if ((ncap == 1) && firstcap) {
  ------------------
  |  Branch (2521:14): [True: 1.01M, False: 739k]
  |  Branch (2521:29): [True: 488k, False: 523k]
  ------------------
 2522|   488k|    return INITCAP;
  ------------------
  |  |   93|   488k|#define INITCAP 1
  ------------------
 2523|  1.26M|  } else if ((ncap == word.size()) || ((ncap + nneutral) == word.size())) {
  ------------------
  |  Branch (2523:14): [True: 8.08k, False: 1.25M]
  |  Branch (2523:39): [True: 244k, False: 1.01M]
  ------------------
 2524|   252k|    return ALLCAP;
  ------------------
  |  |   94|   252k|#define ALLCAP 2
  ------------------
 2525|  1.01M|  } else if ((ncap > 1) && firstcap) {
  ------------------
  |  Branch (2525:14): [True: 594k, False: 415k]
  |  Branch (2525:28): [True: 221k, False: 373k]
  ------------------
 2526|   221k|    return HUHINITCAP;
  ------------------
  |  |   96|   221k|#define HUHINITCAP 4
  ------------------
 2527|   221k|  }
 2528|   788k|  return HUHCAP;
  ------------------
  |  |   95|   788k|#define HUHCAP 3
  ------------------
 2529|  10.1M|}
_Z16get_captype_utf8RKNSt3__16vectorI6w_charNS_9allocatorIS1_EEEEi:
 2531|  2.79M|int get_captype_utf8(const std::vector<w_char>& word, int langnum) {
 2532|       |  // now determine the capitalization type of the first nl letters
 2533|  2.79M|  size_t ncap = 0;
 2534|  2.79M|  size_t nneutral = 0;
 2535|  2.79M|  size_t firstcap = 0;
 2536|       |
 2537|  2.79M|  auto it = word.begin(), it_end = word.end();
 2538|  25.4M|  while (it != it_end) {
  ------------------
  |  Branch (2538:10): [True: 22.6M, False: 2.79M]
  ------------------
 2539|  22.6M|    const auto idx = (unsigned short)*it;
 2540|  22.6M|    const auto lwridx = unicodetolower(idx, langnum);
 2541|  22.6M|    if (idx != lwridx)
  ------------------
  |  Branch (2541:9): [True: 1.12M, False: 21.5M]
  ------------------
 2542|  1.12M|      ncap++;
 2543|  22.6M|    if (unicodetoupper(idx, langnum) == lwridx)
  ------------------
  |  Branch (2543:9): [True: 18.2M, False: 4.38M]
  ------------------
 2544|  18.2M|      nneutral++;
 2545|  22.6M|    ++it;
 2546|  22.6M|  }
 2547|  2.79M|  if (ncap) {
  ------------------
  |  Branch (2547:7): [True: 355k, False: 2.43M]
  ------------------
 2548|   355k|    const auto idx = (unsigned short)word[0];
 2549|   355k|    firstcap = (idx != unicodetolower(idx, langnum));
 2550|   355k|  }
 2551|       |
 2552|       |  // now finally set the captype
 2553|  2.79M|  if (ncap == 0) {
  ------------------
  |  Branch (2553:7): [True: 2.43M, False: 355k]
  ------------------
 2554|  2.43M|    return NOCAP;
  ------------------
  |  |   92|  2.43M|#define NOCAP 0
  ------------------
 2555|  2.43M|  } else if ((ncap == 1) && firstcap) {
  ------------------
  |  Branch (2555:14): [True: 210k, False: 144k]
  |  Branch (2555:29): [True: 109k, False: 101k]
  ------------------
 2556|   109k|    return INITCAP;
  ------------------
  |  |   93|   109k|#define INITCAP 1
  ------------------
 2557|   246k|  } else if ((ncap == word.size()) || ((ncap + nneutral) == word.size())) {
  ------------------
  |  Branch (2557:14): [True: 4.51k, False: 241k]
  |  Branch (2557:39): [True: 76.6k, False: 164k]
  ------------------
 2558|  81.2k|    return ALLCAP;
  ------------------
  |  |   94|  81.2k|#define ALLCAP 2
  ------------------
 2559|   164k|  } else if ((ncap > 1) && firstcap) {
  ------------------
  |  Branch (2559:14): [True: 88.1k, False: 76.6k]
  |  Branch (2559:28): [True: 31.6k, False: 56.5k]
  ------------------
 2560|  31.6k|    return HUHINITCAP;
  ------------------
  |  |   96|  31.6k|#define HUHINITCAP 4
  ------------------
 2561|  31.6k|  }
 2562|   133k|  return HUHCAP;
  ------------------
  |  |   95|   133k|#define HUHCAP 3
  ------------------
 2563|  2.79M|}
_Z24remove_ignored_chars_utfRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6vectorI6w_charNS3_IS8_EEEE:
 2567|   685k|                                const std::vector<w_char>& ignored_chars) {
 2568|   685k|  std::vector<w_char> w;
 2569|   685k|  std::vector<w_char> w2;
 2570|   685k|  u8_u16(w, word);
 2571|       |
 2572|   685k|  std::copy_if(w.begin(), w.end(), std::back_inserter(w2),
 2573|   685k|  [&ignored_chars](w_char wc) {
 2574|   685k|    return !std::binary_search(ignored_chars.begin(), ignored_chars.end(), wc);
 2575|   685k|  });
 2576|       |
 2577|   685k|  u16_u8(word, w2);
 2578|   685k|  return w2.size();
 2579|   685k|}
_Z20remove_ignored_charsRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKS5_:
 2583|  2.16M|                            const std::string& ignored_chars) {
 2584|  2.16M|  word.erase(
 2585|  2.16M|      std::remove_if(word.begin(), word.end(), is_any_of(ignored_chars)),
 2586|  2.16M|      word.end());
 2587|  2.16M|  return word.size();
 2588|  2.16M|}
_Z12parse_stringRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_i:
 2590|     90|bool parse_string(const std::string& line, std::string& out, int ln) {
 2591|     90|  if (!out.empty()) {
  ------------------
  |  Branch (2591:7): [True: 0, False: 90]
  ------------------
 2592|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions\n", ln);
 2593|      0|    return false;
 2594|      0|  }
 2595|     90|  int i = 0;
 2596|     90|  int np = 0;
 2597|     90|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 2598|    270|  while (start_piece != line.end()) {
  ------------------
  |  Branch (2598:10): [True: 180, False: 90]
  ------------------
 2599|    180|    switch (i) {
 2600|     90|      case 0: {
  ------------------
  |  Branch (2600:7): [True: 90, False: 90]
  ------------------
 2601|     90|        np++;
 2602|     90|        break;
 2603|      0|      }
 2604|     90|      case 1: {
  ------------------
  |  Branch (2604:7): [True: 90, False: 90]
  ------------------
 2605|     90|        out.assign(start_piece, iter);
 2606|     90|        np++;
 2607|     90|        break;
 2608|      0|      }
 2609|      0|      default:
  ------------------
  |  Branch (2609:7): [True: 0, False: 180]
  ------------------
 2610|      0|        break;
 2611|    180|    }
 2612|    180|    ++i;
 2613|    180|     start_piece = mystrsep(line, iter);
 2614|    180|  }
 2615|     90|  if (np != 2) {
  ------------------
  |  Branch (2615:7): [True: 0, False: 90]
  ------------------
 2616|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", ln);
 2617|      0|    return false;
 2618|      0|  }
 2619|     90|  return true;
 2620|     90|}
_Z11parse_arrayRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERS5_RNS_6vectorI6w_charNS3_ISA_EEEEii:
 2626|     14|                 int ln) {
 2627|     14|  if (!parse_string(line, out, ln))
  ------------------
  |  Branch (2627:7): [True: 0, False: 14]
  ------------------
 2628|      0|    return false;
 2629|     14|  if (utf8) {
  ------------------
  |  Branch (2629:7): [True: 8, False: 6]
  ------------------
 2630|      8|    u8_u16(out_utf16, out);
 2631|      8|    std::sort(out_utf16.begin(), out_utf16.end());
 2632|      8|  }
 2633|     14|  return true;
 2634|     14|}
csutil.cxx:_ZL17warn_missing_contRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_11__wrap_iterIPKcEE:
  154|   687k|static void warn_missing_cont(const std::string& src, std::string::const_iterator p) {
  155|       |  HUNSPELL_WARNING(stderr,
  156|   687k|                   "UTF-8 encoding error. Missing continuation byte in "
  157|   687k|                   "%ld. character position:\n%s\n",
  158|   687k|                   static_cast<long>(std::distance(src.begin(), p)),
  159|   687k|                   src.c_str());
  160|   687k|}
csutil.cxx:_ZN12_GLOBAL__N_19is_any_ofC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE:
  245|  2.16M|  explicit is_any_of(const std::string& in) : chars(in) {}
csutil.cxx:_ZNK12_GLOBAL__N_19is_any_ofclEc:
  247|  24.3M|  bool operator()(char c) const { return chars.find(c) != std::string::npos; }
csutil.cxx:_ZL19drop_repeated_linesRNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEEE:
  303|  2.10k|static void drop_repeated_lines(std::vector<std::string>& lines) {
  304|  2.10k|  std::unordered_set<std::string> seen;
  305|  2.10k|  auto firstrepeat = std::remove_if(lines.begin(), lines.end(),
  306|  2.10k|                                    [&seen](const std::string& line) { return !seen.insert(line).second; });
  307|  2.10k|  lines.erase(firstrepeat, lines.end());
  308|  2.10k|}
csutil.cxx:_ZZL19drop_repeated_linesRNSt3__16vectorINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS4_IS6_EEEEENK3$_0clERKS6_:
  306|  2.13k|                                    [&seen](const std::string& line) { return !seen.insert(line).second; });
csutil.cxx:_ZN12_GLOBAL__N_16cupperEPK7cs_infoi:
  515|   113M|unsigned char cupper(const struct cs_info* csconv, int nIndex) {
  516|   113M|  assert(nIndex >= 0 && nIndex <= 255);
  ------------------
  |  Branch (516:3): [True: 113M, False: 0]
  |  Branch (516:3): [True: 113M, False: 0]
  |  Branch (516:3): [True: 113M, False: 0]
  ------------------
  517|   113M|  return csconv[nIndex].cupper;
  518|   113M|}
csutil.cxx:_ZN12_GLOBAL__N_16clowerEPK7cs_infoi:
  520|   128M|unsigned char clower(const struct cs_info* csconv, int nIndex) {
  521|   128M|  assert(nIndex >= 0 && nIndex <= 255);
  ------------------
  |  Branch (521:3): [True: 128M, False: 0]
  |  Branch (521:3): [True: 128M, False: 0]
  |  Branch (521:3): [True: 128M, False: 0]
  ------------------
  522|   128M|  return csconv[nIndex].clower;
  523|   128M|}
csutil.cxx:_ZL36toAsciiLowerAndRemoveNonAlphanumericPKcPc:
 2273|  2.22k|                                                 char* pBuf) {
 2274|  20.1k|  while (*pName) {
  ------------------
  |  Branch (2274:10): [True: 17.9k, False: 2.22k]
  ------------------
 2275|       |    /* A-Z */
 2276|  17.9k|    if ((*pName >= 0x41) && (*pName <= 0x5A)) {
  ------------------
  |  Branch (2276:9): [True: 6.68k, False: 11.2k]
  |  Branch (2276:29): [True: 294, False: 6.39k]
  ------------------
 2277|    294|      *pBuf = (*pName) + 0x20; /* toAsciiLower */
 2278|    294|      pBuf++;
 2279|    294|    }
 2280|       |    /* a-z, 0-9 */
 2281|  17.6k|    else if (((*pName >= 0x61) && (*pName <= 0x7A)) ||
  ------------------
  |  Branch (2281:15): [True: 6.39k, False: 11.2k]
  |  Branch (2281:35): [True: 6.39k, False: 0]
  ------------------
 2282|  17.5k|             ((*pName >= 0x30) && (*pName <= 0x39))) {
  ------------------
  |  Branch (2282:15): [True: 11.1k, False: 98]
  |  Branch (2282:35): [True: 11.1k, False: 0]
  ------------------
 2283|  17.5k|      *pBuf = *pName;
 2284|  17.5k|      pBuf++;
 2285|  17.5k|    }
 2286|       |
 2287|  17.9k|    pName++;
 2288|  17.9k|  }
 2289|       |
 2290|  2.22k|  *pBuf = '\0';
 2291|  2.22k|}
csutil.cxx:_ZN12_GLOBAL__N_15ccaseEPK7cs_infoi:
  525|   107M|unsigned char ccase(const struct cs_info* csconv, int nIndex) {
  526|   107M|  assert(nIndex >= 0 && nIndex <= 255);
  ------------------
  |  Branch (526:3): [True: 107M, False: 0]
  |  Branch (526:3): [True: 107M, False: 0]
  |  Branch (526:3): [True: 107M, False: 0]
  ------------------
  527|   107M|  return csconv[nIndex].ccase;
  528|   107M|}
csutil.cxx:_ZZ24remove_ignored_chars_utfRNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEERKNS_6vectorI6w_charNS3_IS8_EEEEENK3$_0clES8_:
 2573|  5.81M|  [&ignored_chars](w_char wc) {
 2574|  5.81M|    return !std::binary_search(ignored_chars.begin(), ignored_chars.end(), wc);
 2575|  5.81M|  });

_Z12is_utf8_contc:
  143|  54.0M|inline bool is_utf8_cont(char c) {
  144|  54.0M|  return (static_cast<unsigned char>(c) & 0xc0) == 0x80;
  145|  54.0M|}
_Z9utf8_nextRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEm:
  148|  22.0k|inline size_t utf8_next(const std::string& s, size_t pos) {
  149|  22.0k|  if (pos < s.size()) {
  ------------------
  |  Branch (149:7): [True: 22.0k, False: 0]
  ------------------
  150|  22.0k|    ++pos;
  151|  25.9k|    while (pos < s.size() && is_utf8_cont(s[pos]))
  ------------------
  |  Branch (151:12): [True: 23.6k, False: 2.28k]
  |  Branch (151:30): [True: 3.93k, False: 19.7k]
  ------------------
  152|  3.93k|      ++pos;
  153|  22.0k|  }
  154|  22.0k|  return pos;
  155|  22.0k|}
_Z20has_no_ignored_charsRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_:
  295|    799|                            const std::string& ignored_chars) {
  296|    799|  return std::all_of(ignored_chars.begin(), ignored_chars.end(),
  297|    799|    [&word](char ic) { return word.find(ic) == std::string::npos; });
  298|    799|}
_Z11HENTRY_DATAP6hentry:
  301|  1.37M|inline char* HENTRY_DATA(struct hentry* h) {
  302|  1.37M|  char* ret;
  303|  1.37M|  if (!(h->var & H_OPT))
  ------------------
  |  |   47|  1.37M|#define H_OPT (1 << 0)          // is there optional morphological data?
  ------------------
  |  Branch (303:7): [True: 1.37M, False: 1.64k]
  ------------------
  304|  1.37M|    ret = nullptr;
  305|  1.64k|  else if (h->var & H_OPT_ALIASM)
  ------------------
  |  |   48|  1.64k|#define H_OPT_ALIASM (1 << 1)   // using alias compression?
  ------------------
  |  Branch (305:12): [True: 0, False: 1.64k]
  ------------------
  306|      0|    ret = get_stored_pointer(HENTRY_WORD(h) + h->blen + 1);
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  307|  1.64k|  else
  308|  1.64k|    ret = HENTRY_WORD(h) + h->blen + 1;
  ------------------
  |  |   54|  1.64k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  309|  1.37M|  return ret;
  310|  1.37M|}
_Z11HENTRY_FINDP6hentryPKc:
  337|  2.12k|inline char* HENTRY_FIND(struct hentry* h, const char* p) {
  338|  2.12k|  char* data = HENTRY_DATA(h);
  339|  2.12k|  return data ? strstr(data, p) : nullptr;
  ------------------
  |  Branch (339:10): [True: 4, False: 2.12k]
  ------------------
  340|  2.12k|}
_ZZ20has_no_ignored_charsRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_ENKUlcE_clEc:
  297|  6.14k|    [&word](char ic) { return word.find(ic) == std::string::npos; });

_ZN7FileMgrC2EPKcS1_:
   84|    114|    : hin(nullptr)
   85|    114|    , linenum(0) {
   86|    114|  in[0] = '\0';
   87|       |
   88|    114|  if (!file || !strlen(file))
  ------------------
  |  Branch (88:7): [True: 0, False: 114]
  |  Branch (88:16): [True: 0, False: 114]
  ------------------
   89|      0|    return;
   90|    114|  myopen(fin, file, std::ios_base::in);
   91|    114|  if (!fin.is_open()) {
  ------------------
  |  Branch (91:7): [True: 0, False: 114]
  ------------------
   92|       |    // check hzipped file
   93|      0|    std::string st(file);
   94|      0|    st.append(HZIP_EXTENSION);
  ------------------
  |  |   51|      0|#define HZIP_EXTENSION ".hz"
  ------------------
   95|      0|    hin = new Hunzip(st.c_str(), key);
   96|      0|  }
   97|    114|  if (!fin.is_open() && !hin->is_open())
  ------------------
  |  Branch (97:7): [True: 0, False: 114]
  |  Branch (97:25): [True: 0, False: 0]
  ------------------
   98|      0|    fail(MSG_OPEN, file);
  ------------------
  |  |   53|      0|#define MSG_OPEN "error: %s: cannot open\n"
  ------------------
   99|    114|}
_ZN7FileMgrD2Ev:
  101|    114|FileMgr::~FileMgr() {
  102|    114|  delete hin;
  103|    114|}
_ZN7FileMgr7getlineERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  105|  2.10k|bool FileMgr::getline(std::string& dest) {
  106|  2.10k|  bool ret = false;
  107|  2.10k|  ++linenum;
  108|  2.10k|  if (fin.is_open()) {
  ------------------
  |  Branch (108:7): [True: 2.10k, False: 0]
  ------------------
  109|  2.10k|    ret = static_cast<bool>(std::getline(fin, dest));
  110|  2.10k|  } else if (hin && hin->is_open()) {
  ------------------
  |  Branch (110:14): [True: 0, False: 0]
  |  Branch (110:21): [True: 0, False: 0]
  ------------------
  111|      0|    ret = hin->getline(dest);
  112|      0|  }
  113|  2.10k|  if (!ret) {
  ------------------
  |  Branch (113:7): [True: 112, False: 1.99k]
  ------------------
  114|    112|    --linenum;
  115|    112|  }
  116|  2.10k|  return ret;
  117|  2.10k|}
_ZN7FileMgr10getlinenumEv:
  119|     96|int FileMgr::getlinenum() {
  120|     96|  return linenum;
  121|     96|}

_ZN7HashMgrC2EPKcS1_S1_:
   93|     38|    : flag_mode(FLAG_CHAR)
   94|     38|    , complexprefixes(0)
   95|     38|    , utf8(0)
   96|     38|    , forbiddenword(FORBIDDENWORD)  // forbidden word signing flag
  ------------------
  |  |  127|     38|#define FORBIDDENWORD 65510
  ------------------
   97|     38|    , langnum(0)
   98|     38|    , csconv(nullptr) {
   99|     38|  load_config(apath, key);
  100|     38|  if (!csconv)
  ------------------
  |  Branch (100:7): [True: 38, False: 0]
  ------------------
  101|     38|    csconv = get_current_cs(SPELL_ENCODING);
  ------------------
  |  |   99|     38|#define SPELL_ENCODING "ISO8859-1"
  ------------------
  102|     38|  int ec = load_tables(tpath, key);
  103|     38|  if (ec) {
  ------------------
  |  Branch (103:7): [True: 0, False: 38]
  ------------------
  104|       |    /* error condition - what should we do here */
  105|      0|    fprintf(stderr, "Hash Manager Error : %d\n", ec);
  106|      0|    free_table();
  107|       |    //keep table size to 1 to fix possible division with zero
  108|      0|    tableptr.resize(1, nullptr);
  109|      0|  }
  110|     38|}
_ZN7HashMgr13release_flagsEPtb:
  112|    383|void HashMgr::release_flags(unsigned short* astr, bool owned) {
  113|    383|  if (owned)
  ------------------
  |  Branch (113:7): [True: 206, False: 177]
  ------------------
  114|    206|    delete[] astr;
  115|    383|}
_ZNK7HashMgr6lookupEPKcm:
  154|   512M|struct hentry* HashMgr::lookup(const char* word, size_t len) const {
  155|   512M|  struct hentry* dp = tableptr[hash(word, len)];
  156|   512M|  if (!dp)
  ------------------
  |  Branch (156:7): [True: 460M, False: 51.7M]
  ------------------
  157|   460M|    return nullptr;
  158|   107M|  for (; dp != nullptr; dp = dp->next) {
  ------------------
  |  Branch (158:10): [True: 59.0M, False: 48.7M]
  ------------------
  159|  59.0M|    if (strcmp(word, dp->word) == 0)
  ------------------
  |  Branch (159:9): [True: 2.97M, False: 56.0M]
  ------------------
  160|  2.97M|      return dp;
  161|  59.0M|  }
  162|  48.7M|  return nullptr;
  163|  51.7M|}
_ZN7HashMgr8add_wordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiPtiPS7_bib:
  173|  7.79k|                      bool own_aff) {
  174|       |
  175|  7.79k|  if (al > std::numeric_limits<short>::max()) {
  ------------------
  |  Branch (175:7): [True: 0, False: 7.79k]
  ------------------
  176|      0|    HUNSPELL_WARNING(stderr, "error: affix len %d is over max limit\n", al);
  177|      0|    release_flags(aff, own_aff);
  178|      0|    return 1;
  179|      0|  }
  180|       |
  181|  7.79k|  const std::string* word = &in_word;
  182|  7.79k|  const std::string* desc = in_desc;
  183|       |
  184|  7.79k|  std::string* word_copy = nullptr;
  185|  7.79k|  std::string* desc_copy = nullptr;
  186|  7.79k|  if ((!ignorechars.empty() && !has_no_ignored_chars(in_word, ignorechars)) || complexprefixes) {
  ------------------
  |  Branch (186:8): [True: 795, False: 7.00k]
  |  Branch (186:32): [True: 181, False: 614]
  |  Branch (186:80): [True: 476, False: 7.14k]
  ------------------
  187|    657|    word_copy = new std::string(in_word);
  188|       |
  189|    657|    if (!ignorechars.empty()) {
  ------------------
  |  Branch (189:9): [True: 181, False: 476]
  ------------------
  190|    181|      if (utf8) {
  ------------------
  |  Branch (190:11): [True: 39, False: 142]
  ------------------
  191|     39|        wcl = remove_ignored_chars_utf(*word_copy, ignorechars_utf16);
  192|    142|      } else {
  193|    142|        remove_ignored_chars(*word_copy, ignorechars);
  194|    142|      }
  195|    181|    }
  196|       |
  197|    657|    if (complexprefixes) {
  ------------------
  |  Branch (197:9): [True: 476, False: 181]
  ------------------
  198|    476|      if (utf8)
  ------------------
  |  Branch (198:11): [True: 0, False: 476]
  ------------------
  199|      0|        wcl = reverseword_utf(*word_copy);
  200|    476|      else
  201|    476|        reverseword(*word_copy);
  202|       |
  203|    476|      if (in_desc && aliasm.empty()) {
  ------------------
  |  Branch (203:11): [True: 0, False: 476]
  |  Branch (203:22): [True: 0, False: 0]
  ------------------
  204|      0|        desc_copy = new std::string(*in_desc);
  205|       |
  206|      0|        if (complexprefixes) {
  ------------------
  |  Branch (206:13): [True: 0, False: 0]
  ------------------
  207|      0|          if (utf8)
  ------------------
  |  Branch (207:15): [True: 0, False: 0]
  ------------------
  208|      0|            reverseword_utf(*desc_copy);
  209|      0|          else
  210|      0|            reverseword(*desc_copy);
  211|      0|        }
  212|      0|        desc = desc_copy;
  213|      0|      }
  214|    476|    }
  215|       |
  216|    657|    word = word_copy;
  217|    657|  }
  218|       |
  219|       |  // limit of hp->blen
  220|  7.79k|  if (word->size() > std::numeric_limits<unsigned short>::max()) {
  ------------------
  |  Branch (220:7): [True: 0, False: 7.79k]
  ------------------
  221|      0|    HUNSPELL_WARNING(stderr, "error: word len %ld is over max limit\n", word->size());
  222|      0|    delete desc_copy;
  223|      0|    delete word_copy;
  224|      0|    release_flags(aff, own_aff);
  225|      0|    return 1;
  226|      0|  }
  227|       |
  228|  7.79k|  bool upcasehomonym = false;
  229|  7.79k|  int descl = desc ? (!aliasm.empty() ? sizeof(char*) : desc->size() + 1) : 0;
  ------------------
  |  Branch (229:15): [True: 4, False: 7.79k]
  |  Branch (229:23): [True: 0, False: 4]
  ------------------
  230|       |  // variable-length hash record with word and optional fields
  231|  7.79k|  auto hp =
  232|  7.79k|      (struct hentry*)arena_alloc(sizeof(struct hentry) + word->size() + descl,
  233|  7.79k|                                  alignof(struct hentry));
  234|  7.79k|  if (!hp) {
  ------------------
  |  Branch (234:7): [True: 0, False: 7.79k]
  ------------------
  235|      0|    delete desc_copy;
  236|      0|    delete word_copy;
  237|      0|    release_flags(aff, own_aff);
  238|      0|    return 1;
  239|      0|  }
  240|       |
  241|  7.79k|  char* hpw = hp->word;
  242|  7.79k|  memcpy(hpw, word->data(), word->size());
  243|  7.79k|  hpw[word->size()] = 0;
  244|       |
  245|  7.79k|  int i = hash(hpw, word->size());
  246|       |
  247|  7.79k|  hp->blen = (unsigned short)word->size();
  248|  7.79k|  hp->clen = (unsigned short)wcl;
  249|  7.79k|  hp->alen = (short)al;
  250|  7.79k|  hp->astr = aff;
  251|  7.79k|  hp->next = nullptr;
  252|  7.79k|  hp->next_homonym = nullptr;
  253|  7.79k|  hp->var = (captype == INITCAP) ? H_OPT_INITCAP : 0;
  ------------------
  |  |   93|  7.79k|#define INITCAP 1
  ------------------
                hp->var = (captype == INITCAP) ? H_OPT_INITCAP : 0;
  ------------------
  |  |   50|  4.74k|#define H_OPT_INITCAP (1 << 3)  // is dictionary word capitalized?
  ------------------
  |  Branch (253:13): [True: 4.74k, False: 3.05k]
  ------------------
  254|  7.79k|  if (own_aff)
  ------------------
  |  Branch (254:7): [True: 5.23k, False: 2.56k]
  ------------------
  255|  5.23k|    hp->var |= H_OPT_OWNFLAGS;
  ------------------
  |  |   51|  5.23k|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  256|       |
  257|       |  // store the description string or its pointer
  258|  7.79k|  if (desc) {
  ------------------
  |  Branch (258:7): [True: 4, False: 7.79k]
  ------------------
  259|      4|    hp->var |= H_OPT;
  ------------------
  |  |   47|      4|#define H_OPT (1 << 0)          // is there optional morphological data?
  ------------------
  260|      4|    if (!aliasm.empty()) {
  ------------------
  |  Branch (260:9): [True: 0, False: 4]
  ------------------
  261|      0|      hp->var |= H_OPT_ALIASM;
  ------------------
  |  |   48|      0|#define H_OPT_ALIASM (1 << 1)   // using alias compression?
  ------------------
  262|      0|      store_pointer(hpw + word->size() + 1, get_aliasm(atoi(desc->c_str())));
  263|      4|    } else {
  264|      4|      strcpy(hpw + word->size() + 1, desc->c_str());
  265|      4|    }
  266|      4|    if (HENTRY_FIND(hp, MORPH_PHON)) {
  ------------------
  |  |  114|      4|#define MORPH_PHON "ph:"
  ------------------
  |  Branch (266:9): [True: 2, False: 2]
  ------------------
  267|      2|      hp->var |= H_OPT_PHON;
  ------------------
  |  |   49|      2|#define H_OPT_PHON (1 << 2)     // is there ph: field in the morphological data?
  ------------------
  268|       |      // store ph: fields (pronounciation, misspellings, old orthography etc.)
  269|       |      // of a morphological description in reptable to use in REP replacements.
  270|      2|      size_t predicted = tableptr.size() / MORPH_PHON_RATIO;
  ------------------
  |  |   90|      2|#define MORPH_PHON_RATIO 500
  ------------------
  271|      2|      if (reptable.capacity() < predicted)
  ------------------
  |  Branch (271:11): [True: 2, False: 0]
  ------------------
  272|      2|          reptable.reserve(predicted);
  273|      2|      std::string fields = HENTRY_DATA(hp);
  274|      2|      std::string::const_iterator iter = fields.begin(), start_piece = mystrsep(fields, iter);
  275|      4|      while (start_piece != fields.end()) {
  ------------------
  |  Branch (275:14): [True: 2, False: 2]
  ------------------
  276|      2|        if (std::string(start_piece, iter).find(MORPH_PHON) == 0) {
  ------------------
  |  |  114|      2|#define MORPH_PHON "ph:"
  ------------------
  |  Branch (276:13): [True: 2, False: 0]
  ------------------
  277|      2|          std::string ph = std::string(start_piece, iter).substr(sizeof MORPH_PHON - 1);
  ------------------
  |  |  114|      2|#define MORPH_PHON "ph:"
  ------------------
  278|      2|          if (!ph.empty()) {
  ------------------
  |  Branch (278:15): [True: 2, False: 0]
  ------------------
  279|      2|            std::vector<w_char> w;
  280|      2|            size_t strippatt;
  281|      2|            std::string wordpart;
  282|       |            // dictionary based REP replacement, separated by "->"
  283|       |            // for example "pretty ph:prity ph:priti->pretti" to handle
  284|       |            // both prity -> pretty and pritier -> prettiest suggestions.
  285|      2|            if (((strippatt = ph.find("->")) != std::string::npos) &&
  ------------------
  |  Branch (285:17): [True: 0, False: 2]
  ------------------
  286|      0|                    (strippatt > 0) && (strippatt < ph.size() - 2)) {
  ------------------
  |  Branch (286:21): [True: 0, False: 0]
  |  Branch (286:40): [True: 0, False: 0]
  ------------------
  287|      0|                wordpart = ph.substr(strippatt + 2);
  288|      0|                ph.erase(ph.begin() + strippatt, ph.end());
  289|      0|            } else
  290|      2|                wordpart = in_word;
  291|       |            // when the ph: field ends with the character *,
  292|       |            // strip last character of the pattern and the replacement
  293|       |            // to match in REP suggestions also at character changes,
  294|       |            // for example, "pretty ph:prity*" results "prit->prett"
  295|       |            // REP replacement instead of "prity->pretty", to get
  296|       |            // prity->pretty and pritiest->prettiest suggestions.
  297|      2|            if (ph.at(ph.size()-1) == '*') {
  ------------------
  |  Branch (297:17): [True: 0, False: 2]
  ------------------
  298|      0|              strippatt = 1;
  299|      0|              size_t stripword = 0;
  300|      0|              if (utf8) {
  ------------------
  |  Branch (300:19): [True: 0, False: 0]
  ------------------
  301|      0|                while ((strippatt < ph.size()) &&
  ------------------
  |  Branch (301:24): [True: 0, False: 0]
  ------------------
  302|      0|                  is_utf8_cont(ph.at(ph.size()-strippatt-1)))
  ------------------
  |  Branch (302:19): [True: 0, False: 0]
  ------------------
  303|      0|                     ++strippatt;
  304|      0|                while ((stripword < wordpart.size()) &&
  ------------------
  |  Branch (304:24): [True: 0, False: 0]
  ------------------
  305|      0|                  is_utf8_cont(wordpart.at(wordpart.size()-stripword-1)))
  ------------------
  |  Branch (305:19): [True: 0, False: 0]
  ------------------
  306|      0|                     ++stripword;
  307|      0|              }
  308|      0|              ++strippatt;
  309|      0|              ++stripword;
  310|      0|              if ((ph.size() > strippatt) && (wordpart.size() > stripword)) {
  ------------------
  |  Branch (310:19): [True: 0, False: 0]
  |  Branch (310:46): [True: 0, False: 0]
  ------------------
  311|      0|                ph.erase(ph.size()-strippatt, strippatt);
  312|      0|                wordpart.erase(wordpart.size()-stripword, stripword);
  313|      0|              }
  314|      0|            }
  315|       |            // capitalize lowercase pattern for capitalized words to support
  316|       |            // good suggestions also for capitalized misspellings, eg.
  317|       |            // Wednesday ph:wendsay
  318|       |            // results wendsay -> Wednesday and Wendsay -> Wednesday, too.
  319|      2|            if (captype == INITCAP) {
  ------------------
  |  |   93|      2|#define INITCAP 1
  ------------------
  |  Branch (319:17): [True: 0, False: 2]
  ------------------
  320|      0|              std::string ph_capitalized;
  321|      0|              if (utf8) {
  ------------------
  |  Branch (321:19): [True: 0, False: 0]
  ------------------
  322|      0|                u8_u16(w, ph);
  323|      0|                if (get_captype_utf8(w, langnum) == NOCAP) {
  ------------------
  |  |   92|      0|#define NOCAP 0
  ------------------
  |  Branch (323:21): [True: 0, False: 0]
  ------------------
  324|      0|                  mkinitcap_utf(w, langnum);
  325|      0|                  u16_u8(ph_capitalized, w);
  326|      0|                }
  327|      0|              } else if (get_captype(ph, csconv) == NOCAP)
  ------------------
  |  |   92|      0|#define NOCAP 0
  ------------------
  |  Branch (327:26): [True: 0, False: 0]
  ------------------
  328|      0|                  mkinitcap(ph_capitalized, csconv);
  329|       |
  330|      0|              if (!ph_capitalized.empty()) {
  ------------------
  |  Branch (330:19): [True: 0, False: 0]
  ------------------
  331|       |                // add also lowercase word in the case of German or
  332|       |                // Hungarian to support lowercase suggestions lowercased by
  333|       |                // compound word generation or derivational suffixes
  334|       |                // (for example by adjectival suffix "-i" of geographical
  335|       |                // names in Hungarian:
  336|       |                // Massachusetts ph:messzecsuzec
  337|       |                // messzecsuzeci -> massachusettsi (adjective)
  338|       |                // For lowercasing by conditional PFX rules, see
  339|       |                // tests/germancompounding test example or the
  340|       |                // Hungarian dictionary.)
  341|      0|                if (langnum == LANG_de || langnum == LANG_hu) {
  ------------------
  |  Branch (341:21): [True: 0, False: 0]
  |  Branch (341:43): [True: 0, False: 0]
  ------------------
  342|      0|                  std::string wordpart_lower(wordpart);
  343|      0|                  if (utf8) {
  ------------------
  |  Branch (343:23): [True: 0, False: 0]
  ------------------
  344|      0|                    u8_u16(w, wordpart_lower);
  345|      0|                    mkallsmall_utf(w, langnum);
  346|      0|                    u16_u8(wordpart_lower, w);
  347|      0|                  } else {
  348|      0|                    mkallsmall(wordpart_lower, csconv);
  349|      0|                  }
  350|      0|                  reptable.emplace_back();
  351|      0|                  reptable.back().pattern.assign(ph);
  352|      0|                  reptable.back().outstrings[0].assign(wordpart_lower);
  353|      0|                }
  354|      0|                reptable.emplace_back();
  355|      0|                reptable.back().pattern.assign(ph_capitalized);
  356|      0|                reptable.back().outstrings[0].assign(wordpart);
  357|      0|              }
  358|      0|            }
  359|      2|            reptable.emplace_back();
  360|      2|            reptable.back().pattern.assign(ph);
  361|      2|            reptable.back().outstrings[0].assign(wordpart);
  362|      2|          }
  363|      2|        }
  364|      2|        start_piece = mystrsep(fields, iter);
  365|      2|      }
  366|      2|    }
  367|      4|  }
  368|       |
  369|  7.79k|  struct hentry* dp = tableptr[i];
  370|  7.79k|  if (!dp) {
  ------------------
  |  Branch (370:7): [True: 6.05k, False: 1.74k]
  ------------------
  371|  6.05k|    tableptr[i] = hp;
  372|  6.05k|    delete desc_copy;
  373|  6.05k|    delete word_copy;
  374|  6.05k|    return 0;
  375|  6.05k|  }
  376|  2.16k|  while (dp->next != nullptr) {
  ------------------
  |  Branch (376:10): [True: 455, False: 1.71k]
  ------------------
  377|    455|    if ((!dp->next_homonym) && (strcmp(hp->word, dp->word) == 0)) {
  ------------------
  |  Branch (377:9): [True: 392, False: 63]
  |  Branch (377:32): [True: 43, False: 349]
  ------------------
  378|       |      // remove hidden onlyupcase homonym
  379|     43|      if (!onlyupcase) {
  ------------------
  |  Branch (379:11): [True: 32, False: 11]
  ------------------
  380|     32|        if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
  ------------------
  |  |   99|      8|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 8, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (380:13): [True: 8, False: 24]
  |  Branch (380:13): [True: 8, False: 24]
  ------------------
  381|      8|          release_flags(dp->astr, dp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|      8|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  382|      8|          dp->astr = hp->astr;
  383|      8|          dp->alen = hp->alen;
  384|      8|          dp->var &= ~H_OPT_OWNFLAGS;
  ------------------
  |  |   51|      8|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  385|      8|          dp->var |= (hp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|      8|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  386|      8|          arena_free(hp);
  387|      8|          delete desc_copy;
  388|      8|          delete word_copy;
  389|      8|          return 0;
  390|     24|        } else if (!dp->astr && dp->alen == 0 &&
  ------------------
  |  Branch (390:20): [True: 24, False: 0]
  |  Branch (390:33): [True: 24, False: 0]
  ------------------
  391|     24|                   !hp->astr && hp->alen == 0) {
  ------------------
  |  Branch (391:20): [True: 24, False: 0]
  |  Branch (391:33): [True: 24, False: 0]
  ------------------
  392|       |          // word already exists with no flags, skip duplicate
  393|     24|          release_flags(hp->astr, hp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|     24|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  394|     24|          arena_free(hp);
  395|     24|          delete desc_copy;
  396|     24|          delete word_copy;
  397|     24|          return 0;
  398|     24|        } else {
  399|      0|          dp->next_homonym = hp;
  400|      0|        }
  401|     32|      } else {
  402|     11|        upcasehomonym = true;
  403|     11|      }
  404|     43|    }
  405|    423|    dp = dp->next;
  406|    423|  }
  407|  1.71k|  if (strcmp(hp->word, dp->word) == 0) {
  ------------------
  |  Branch (407:7): [True: 358, False: 1.35k]
  ------------------
  408|       |    // remove hidden onlyupcase homonym
  409|    358|    if (!onlyupcase) {
  ------------------
  |  Branch (409:9): [True: 220, False: 138]
  ------------------
  410|    220|      if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
  ------------------
  |  |   99|     56|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 56, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (410:11): [True: 56, False: 164]
  |  Branch (410:11): [True: 56, False: 164]
  ------------------
  411|     56|        release_flags(dp->astr, dp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|     56|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  412|     56|        dp->astr = hp->astr;
  413|     56|        dp->alen = hp->alen;
  414|     56|        dp->var &= ~H_OPT_OWNFLAGS;
  ------------------
  |  |   51|     56|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  415|     56|        dp->var |= (hp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|     56|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  416|     56|        arena_free(hp);
  417|     56|        delete desc_copy;
  418|     56|        delete word_copy;
  419|     56|        return 0;
  420|    164|      } else if (!dp->astr && dp->alen == 0 &&
  ------------------
  |  Branch (420:18): [True: 164, False: 0]
  |  Branch (420:31): [True: 164, False: 0]
  ------------------
  421|    164|                 !hp->astr && hp->alen == 0) {
  ------------------
  |  Branch (421:18): [True: 146, False: 18]
  |  Branch (421:31): [True: 146, False: 0]
  ------------------
  422|       |        // word already exists with no flags, skip duplicate
  423|    146|        release_flags(hp->astr, hp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|    146|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  424|    146|        arena_free(hp);
  425|    146|        delete desc_copy;
  426|    146|        delete word_copy;
  427|    146|        return 0;
  428|    146|      } else {
  429|     18|        dp->next_homonym = hp;
  430|     18|      }
  431|    220|    } else {
  432|    138|      upcasehomonym = true;
  433|    138|    }
  434|    358|  }
  435|  1.50k|  if (!upcasehomonym) {
  ------------------
  |  Branch (435:7): [True: 1.35k, False: 149]
  ------------------
  436|  1.35k|    dp->next = hp;
  437|  1.35k|  } else {
  438|       |    // remove hidden onlyupcase homonym
  439|    149|    release_flags(hp->astr, hp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|    149|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  440|    149|    arena_free(hp);
  441|    149|  }
  442|       |
  443|  1.50k|  delete desc_copy;
  444|  1.50k|  delete word_copy;
  445|  1.50k|  return 0;
  446|  1.71k|}
_ZN7HashMgr27add_hidden_capitalized_wordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiPtiPS7_i:
  453|  5.39k|                                         int captype) {
  454|  5.39k|  if (flags == nullptr)
  ------------------
  |  Branch (454:7): [True: 5.26k, False: 136]
  ------------------
  455|  5.26k|    flagslen = 0;
  456|       |
  457|       |  // add inner capitalized forms to handle the following allcap forms:
  458|       |  // Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
  459|       |  // Allcaps with suffixes: CIA's -> CIA'S
  460|  5.39k|  if (((captype == HUHCAP) || (captype == HUHINITCAP) ||
  ------------------
  |  |   95|  5.39k|#define HUHCAP 3
  ------------------
                if (((captype == HUHCAP) || (captype == HUHINITCAP) ||
  ------------------
  |  |   96|  5.01k|#define HUHINITCAP 4
  ------------------
  |  Branch (460:8): [True: 382, False: 5.01k]
  |  Branch (460:31): [True: 2.01k, False: 3.00k]
  ------------------
  461|  3.00k|       ((captype == ALLCAP) && (flagslen != 0))) &&
  ------------------
  |  |   94|  3.00k|#define ALLCAP 2
  ------------------
  |  Branch (461:9): [True: 187, False: 2.81k]
  |  Branch (461:32): [True: 9, False: 178]
  ------------------
  462|  2.40k|      !((flagslen != 0) && TESTAFF(flags, forbiddenword, flagslen))) {
  ------------------
  |  |   99|     54|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 54]
  |  |  ------------------
  ------------------
  |  Branch (462:9): [True: 54, False: 2.34k]
  ------------------
  463|  2.40k|    auto flags2 = (unsigned short*)arena_alloc((flagslen + 1) * sizeof(unsigned short),
  464|  2.40k|                                                alignof(unsigned short));
  465|  2.40k|    flags2[flagslen] = ONLYUPCASEFLAG;
  ------------------
  |  |  128|  2.40k|#define ONLYUPCASEFLAG 65511
  ------------------
  466|  2.40k|    if (flagslen) {
  ------------------
  |  Branch (466:9): [True: 54, False: 2.34k]
  ------------------
  467|     54|      memcpy(flags2, flags, flagslen * sizeof(unsigned short));
  468|     54|      std::sort(flags2, flags2 + flagslen + 1);
  469|     54|    }
  470|  2.40k|    if (utf8) {
  ------------------
  |  Branch (470:9): [True: 360, False: 2.04k]
  ------------------
  471|    360|      std::string st;
  472|    360|      std::vector<w_char> w;
  473|    360|      u8_u16(w, word);
  474|    360|      mkallsmall_utf(w, langnum);
  475|    360|      mkinitcap_utf(w, langnum);
  476|    360|      u16_u8(st, w);
  477|    360|      return add_word(st, wcl, flags2, flagslen + 1, dp, true, INITCAP, false);
  ------------------
  |  |   93|    360|#define INITCAP 1
  ------------------
  478|  2.04k|    } else {
  479|  2.04k|      std::string new_word(word);
  480|  2.04k|      mkallsmall(new_word, csconv);
  481|  2.04k|      mkinitcap(new_word, csconv);
  482|  2.04k|      int ret = add_word(new_word, wcl, flags2, flagslen + 1, dp, true, INITCAP, false);
  ------------------
  |  |   93|  2.04k|#define INITCAP 1
  ------------------
  483|  2.04k|      return ret;
  484|  2.04k|    }
  485|  2.40k|  }
  486|  2.99k|  return 0;
  487|  5.39k|}
_ZN7HashMgr20get_clen_and_captypeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPiRNS0_6vectorI6w_charNS4_ISB_EEEE:
  490|  5.39k|int HashMgr::get_clen_and_captype(const std::string& word, int* captype, std::vector<w_char> &workbuf) {
  491|  5.39k|  int len;
  492|  5.39k|  if (utf8) {
  ------------------
  |  Branch (492:7): [True: 2.55k, False: 2.84k]
  ------------------
  493|  2.55k|    len = u8_u16(workbuf, word);
  494|  2.55k|    *captype = get_captype_utf8(workbuf, langnum);
  495|  2.84k|  } else {
  496|  2.84k|    len = word.size();
  497|  2.84k|    *captype = get_captype(word, csconv);
  498|  2.84k|  }
  499|  5.39k|  return len;
  500|  5.39k|}
_ZN7HashMgr20get_clen_and_captypeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPi:
  502|  5.23k|int HashMgr::get_clen_and_captype(const std::string& word, int* captype) {
  503|  5.23k|  std::vector<w_char> workbuf;
  504|  5.23k|  return get_clen_and_captype(word, captype, workbuf);
  505|  5.23k|}
_ZN7HashMgr21remove_forbidden_flagERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  528|  7.21k|void HashMgr::remove_forbidden_flag(const std::string& word) {
  529|  7.21k|  struct hentry* dp = lookup(word.c_str(), word.size());
  530|  7.21k|  if (!dp)
  ------------------
  |  Branch (530:7): [True: 6.77k, False: 438]
  ------------------
  531|  6.77k|    return;
  532|    948|  while (dp) {
  ------------------
  |  Branch (532:10): [True: 510, False: 438]
  ------------------
  533|    510|    if (dp->astr && TESTAFF(dp->astr, forbiddenword, dp->alen)) {
  ------------------
  |  |   99|     71|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 71]
  |  |  ------------------
  ------------------
  |  Branch (533:9): [True: 71, False: 439]
  ------------------
  534|      0|      if (dp->alen == 1) {
  ------------------
  |  Branch (534:11): [True: 0, False: 0]
  ------------------
  535|      0|        release_flags(dp->astr, dp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|      0|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  536|      0|        dp->astr = nullptr;
  537|      0|        dp->alen = 0;
  538|      0|        dp->var &= ~H_OPT_OWNFLAGS;
  ------------------
  |  |   51|      0|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  539|      0|      } else {
  540|      0|        auto newflags = new unsigned short[dp->alen - 1];
  541|      0|        int j = 0;
  542|      0|        for (int i = 0; i < dp->alen; i++) {
  ------------------
  |  Branch (542:25): [True: 0, False: 0]
  ------------------
  543|      0|          if (dp->astr[i] != forbiddenword)
  ------------------
  |  Branch (543:15): [True: 0, False: 0]
  ------------------
  544|      0|            newflags[j++] = dp->astr[i];
  545|      0|        }
  546|      0|        release_flags(dp->astr, dp->var & H_OPT_OWNFLAGS);
  ------------------
  |  |   51|      0|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  547|      0|        dp->astr = newflags;
  548|      0|        dp->alen = (short)j;
  549|      0|        dp->var |= H_OPT_OWNFLAGS;
  ------------------
  |  |   51|      0|#define H_OPT_OWNFLAGS (1 << 4) // astr is independently allocated?
  ------------------
  550|      0|      }
  551|      0|    }
  552|    510|    dp = dp->next_homonym;
  553|    510|  }
  554|    438|}
_ZN7HashMgr3addERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  557|  5.18k|int HashMgr::add(const std::string& word) {
  558|  5.18k|  remove_forbidden_flag(word);
  559|  5.18k|  int captype, al = 0;
  560|  5.18k|  unsigned short* flags = nullptr;
  561|  5.18k|  int wcl = get_clen_and_captype(word, &captype);
  562|  5.18k|  if (add_word(word, wcl, flags, al, nullptr, false, captype, true))
  ------------------
  |  Branch (562:7): [True: 0, False: 5.18k]
  ------------------
  563|      0|    return 1;
  564|  5.18k|  return add_hidden_capitalized_word(word, wcl, flags, al, nullptr, captype);
  565|  5.18k|}
_ZN7HashMgr14add_with_affixERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
  578|  2.03k|int HashMgr::add_with_affix(const std::string& word, const std::string& example) {
  579|       |  // detect captype and modify word length for UTF-8 encoding
  580|  2.03k|  struct hentry* dp = lookup(example.c_str(), example.size());
  581|  2.03k|  remove_forbidden_flag(word);
  582|  2.03k|  if (dp && dp->astr) {
  ------------------
  |  Branch (582:7): [True: 254, False: 1.77k]
  |  Branch (582:13): [True: 54, False: 200]
  ------------------
  583|     54|    int captype;
  584|     54|    int wcl = get_clen_and_captype(word, &captype);
  585|     54|    auto flags = new unsigned short[dp->alen];
  586|     54|    memcpy(flags, dp->astr, dp->alen * sizeof(unsigned short));
  587|     54|    if (add_word(word, wcl, flags, dp->alen, nullptr, false, captype, true))
  ------------------
  |  Branch (587:9): [True: 0, False: 54]
  ------------------
  588|      0|      return 1;
  589|     54|    return add_hidden_capitalized_word(word, wcl, flags, dp->alen, nullptr, captype);
  590|     54|  }
  591|  1.97k|  return 1;
  592|  2.03k|}
_ZNK7HashMgr14walk_hashtableERiP6hentry:
  596|  1.92M|struct hentry* HashMgr::walk_hashtable(int& col, struct hentry* hp) const {
  597|  1.92M|  if (hp && hp->next != nullptr)
  ------------------
  |  Branch (597:7): [True: 1.86M, False: 59.9k]
  |  Branch (597:13): [True: 155k, False: 1.71M]
  ------------------
  598|   155k|    return hp->next;
  599|  60.5M|  for (col++; col < (int)tableptr.size(); ++col) {
  ------------------
  |  Branch (599:15): [True: 60.4M, False: 59.9k]
  ------------------
  600|  60.4M|    if (tableptr[col])
  ------------------
  |  Branch (600:9): [True: 1.71M, False: 58.7M]
  ------------------
  601|  1.71M|      return tableptr[col];
  602|  60.4M|  }
  603|       |  // null at end and reset to start
  604|  59.9k|  col = -1;
  605|  59.9k|  return nullptr;
  606|  1.77M|}
_ZN7HashMgr11load_tablesEPKcS1_:
  609|     38|int HashMgr::load_tables(const char* tpath, const char* key) {
  610|       |  // open dictionary file
  611|     38|  FileMgr* dict = new FileMgr(tpath, key);
  612|       |
  613|       |  // first read the first line of file to get hash table size
  614|     38|  std::string ts;
  615|     38|  if (!dict->getline(ts)) {
  ------------------
  |  Branch (615:7): [True: 0, False: 38]
  ------------------
  616|      0|    fprintf(stderr, "error: empty dic file %s\n", tpath);
  617|      0|    delete dict;
  618|      0|    return 2;
  619|      0|  }
  620|     38|  mychomp(ts);
  621|       |
  622|       |  /* remove byte order mark */
  623|     38|  if (ts.compare(0, 3, "\xEF\xBB\xBF", 3) == 0) {
  ------------------
  |  Branch (623:7): [True: 0, False: 38]
  ------------------
  624|      0|    ts.erase(0, 3);
  625|      0|  }
  626|       |
  627|     38|  int tablesize = atoi(ts.c_str());
  628|       |
  629|     38|  const int nExtra = 5 + USERWORD;
  ------------------
  |  |   57|     38|#define USERWORD 1000
  ------------------
  630|       |#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
  631|       |  // covers full-form uncompressed dictionaries (~7M for uk_UA expanded)
  632|       |  const int max_allowed = 10000000;
  633|       |#else
  634|     38|  const int max_allowed = (10000 - 1 - nExtra) / int(sizeof(struct hentry*));
  635|     38|#endif
  636|       |
  637|     38|  if (tablesize <= 0 || tablesize >= max_allowed) {
  ------------------
  |  Branch (637:7): [True: 0, False: 38]
  |  Branch (637:25): [True: 0, False: 38]
  ------------------
  638|      0|    fprintf(stderr,
  639|      0|            "error: %s: line 1: missing or bad word count in the dic file\n",
  640|      0|            tpath);
  641|      0|    delete dict;
  642|      0|    return 4;
  643|      0|  }
  644|     38|  tablesize += nExtra;
  645|     38|  if ((tablesize & 1) == 0)
  ------------------
  |  Branch (645:7): [True: 18, False: 20]
  ------------------
  646|     18|    tablesize++;
  647|       |
  648|       |  // allocate the hash table
  649|     38|  tableptr.resize(tablesize, nullptr);
  650|       |
  651|       |  // loop through all words on much list and add to hash
  652|       |  // table and create word and affix strings
  653|       |
  654|     38|  std::vector<w_char> workbuf;
  655|       |
  656|     38|  int nLineCount(0);
  657|    198|  while (dict->getline(ts)) {
  ------------------
  |  Branch (657:10): [True: 160, False: 38]
  ------------------
  658|    160|    ++nLineCount;
  659|    160|#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
  660|       |    // limit words loaded to avoid O(n^2) hash chain walk timeout
  661|    160|    if (nLineCount >= tablesize)
  ------------------
  |  Branch (661:9): [True: 0, False: 160]
  ------------------
  662|      0|      break;
  663|    160|#endif
  664|    160|    mychomp(ts);
  665|       |    // split each line into word and morphological description
  666|    160|    size_t dp_pos = 0;
  667|    160|    while ((dp_pos = ts.find(':', dp_pos)) != std::string::npos) {
  ------------------
  |  Branch (667:12): [True: 4, False: 156]
  ------------------
  668|      4|      if ((dp_pos > 3) && (ts[dp_pos - 3] == ' ' || ts[dp_pos - 3] == '\t')) {
  ------------------
  |  Branch (668:11): [True: 4, False: 0]
  |  Branch (668:28): [True: 0, False: 4]
  |  Branch (668:53): [True: 4, False: 0]
  ------------------
  669|      4|        for (dp_pos -= 3; dp_pos > 0 && (ts[dp_pos-1] == ' ' || ts[dp_pos-1] == '\t'); --dp_pos)
  ------------------
  |  Branch (669:27): [True: 4, False: 0]
  |  Branch (669:42): [True: 0, False: 4]
  |  Branch (669:65): [True: 0, False: 4]
  ------------------
  670|      0|          ;
  671|      4|        if (dp_pos == 0) {  // missing word
  ------------------
  |  Branch (671:13): [True: 0, False: 4]
  ------------------
  672|      0|          dp_pos = std::string::npos;
  673|      4|        } else {
  674|      4|          ++dp_pos;
  675|      4|        }
  676|      4|        break;
  677|      4|      }
  678|      0|      ++dp_pos;
  679|      0|    }
  680|       |
  681|       |    // tabulator is the old morphological field separator
  682|    160|    size_t dp2_pos = ts.find('\t');
  683|    160|    if (dp2_pos != std::string::npos && (dp_pos == std::string::npos || dp2_pos < dp_pos)) {
  ------------------
  |  Branch (683:9): [True: 4, False: 156]
  |  Branch (683:42): [True: 0, False: 4]
  |  Branch (683:73): [True: 4, False: 0]
  ------------------
  684|      4|      dp_pos = dp2_pos + 1;
  685|      4|    }
  686|       |
  687|    160|    std::string dp;
  688|    160|    if (dp_pos != std::string::npos) {
  ------------------
  |  Branch (688:9): [True: 4, False: 156]
  ------------------
  689|      4|      dp.assign(ts.substr(dp_pos));
  690|      4|      ts.resize(dp_pos - 1);
  691|      4|    }
  692|       |
  693|       |    // split each line into word and affix char strings
  694|       |    // "\/" signs slash in words (not affix separator)
  695|       |    // "/" at beginning of the line is word character (not affix separator)
  696|    160|    size_t ap_pos = ts.find('/');
  697|    160|    while (ap_pos != std::string::npos) {
  ------------------
  |  Branch (697:12): [True: 82, False: 78]
  ------------------
  698|     82|      if (ap_pos == 0) {
  ------------------
  |  Branch (698:11): [True: 0, False: 82]
  ------------------
  699|      0|        ++ap_pos;
  700|      0|        ap_pos = ts.find('/', ap_pos);
  701|      0|        continue;
  702|     82|      } else if (ts[ap_pos - 1] != '\\')
  ------------------
  |  Branch (702:18): [True: 82, False: 0]
  ------------------
  703|     82|        break;
  704|       |      // replace "\/" with "/"
  705|      0|      ts.erase(ap_pos - 1, 1);
  706|      0|      ap_pos = ts.find('/', ap_pos);
  707|      0|    }
  708|       |
  709|    160|    unsigned short* flags;
  710|    160|    int al;
  711|    160|    if (ap_pos != std::string::npos && ap_pos != ts.size()) {
  ------------------
  |  Branch (711:9): [True: 82, False: 78]
  |  Branch (711:40): [True: 82, False: 0]
  ------------------
  712|     82|      std::string ap(ts.substr(ap_pos + 1));
  713|     82|      ts.resize(ap_pos);
  714|     82|      if (!aliasf.empty()) {
  ------------------
  |  Branch (714:11): [True: 2, False: 80]
  ------------------
  715|      2|        int index = atoi(ap.c_str());
  716|      2|        al = get_aliasf(index, &flags, dict);
  717|      2|        if (!al) {
  ------------------
  |  Branch (717:13): [True: 0, False: 2]
  ------------------
  718|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad flag vector alias\n",
  719|      0|                           dict->getlinenum());
  720|      0|        }
  721|     80|      } else {
  722|     80|        al = decode_flags(&flags, ap, dict, /* arena = */ true);
  723|     80|        if (al == -1) {
  ------------------
  |  Branch (723:13): [True: 0, False: 80]
  ------------------
  724|      0|          HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
  725|      0|          delete dict;
  726|      0|          return 6;
  727|      0|        }
  728|     80|        std::sort(flags, flags + al);
  729|     80|      }
  730|     82|    } else {
  731|     78|      al = 0;
  732|     78|      flags = nullptr;
  733|     78|    }
  734|       |
  735|    160|    int captype;
  736|    160|    int wcl = get_clen_and_captype(ts, &captype, workbuf);
  737|    160|    const std::string* dp_str = dp.empty() ? nullptr : &dp;
  ------------------
  |  Branch (737:33): [True: 156, False: 4]
  ------------------
  738|       |    // add the word and its index plus its capitalized form optionally
  739|       |    // flags are arena-allocated, so own_aff must be false
  740|    160|    bool own = false;
  741|    160|    if (add_word(ts, wcl, flags, al, dp_str, false, captype, own) ||
  ------------------
  |  Branch (741:9): [True: 0, False: 160]
  ------------------
  742|    160|        add_hidden_capitalized_word(ts, wcl, flags, al, dp_str, captype)) {
  ------------------
  |  Branch (742:9): [True: 0, False: 160]
  ------------------
  743|      0|      delete dict;
  744|      0|      return 5;
  745|      0|    }
  746|    160|  }
  747|       |
  748|     38|  int ret(0);
  749|       |
  750|       |  // reject ludicrous tablesizes
  751|     38|  if (tablesize > 8192 + nExtra && tablesize > nLineCount * 10 + nExtra) {
  ------------------
  |  Branch (751:7): [True: 0, False: 38]
  |  Branch (751:36): [True: 0, False: 0]
  ------------------
  752|      0|    HUNSPELL_WARNING(stderr, ".dic initial approximate word count line value of %d is too large for %d lines\n", tablesize, nLineCount);
  753|      0|    ret = 3;
  754|      0|  }
  755|       |
  756|     38|  delete dict;
  757|     38|  return ret;
  758|     38|}
_ZNK7HashMgr4hashEPKcm:
  762|   512M|int HashMgr::hash(const char* word, size_t len) const {
  763|   512M|  unsigned long hv = 0;
  764|   512M|  size_t i = 0;
  765|  2.53G|  while (i < 4 && i < len)
  ------------------
  |  Branch (765:10): [True: 2.04G, False: 487M]
  |  Branch (765:19): [True: 2.01G, False: 24.7M]
  ------------------
  766|  2.01G|    hv = (hv << 8) | word[i++];
  767|  9.97G|  while (i < len) {
  ------------------
  |  Branch (767:10): [True: 9.46G, False: 512M]
  ------------------
  768|  9.46G|    ROTATE(hv, ROTATE_LEN);
  ------------------
  |  |   44|  9.46G|  (v) = ((v) << (q)) | (((v) >> (32 - q)) & ((1 << (q)) - 1));
  ------------------
  769|  9.46G|    hv ^= word[i++];
  770|  9.46G|  }
  771|   512M|  return (unsigned long)hv % tableptr.size();
  772|   512M|}
_ZNK7HashMgr12decode_flagsEPPtRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEP7FileMgr:
  774|     16|int HashMgr::decode_flags(unsigned short** result, const std::string& flags, FileMgr* af) const {
  775|     16|  return decode_flags(result, flags, af, /* arena = */ false);
  776|     16|}
_ZNK7HashMgr12decode_flagsEPPtRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEP7FileMgrb:
  778|    100|int HashMgr::decode_flags(unsigned short** result, const std::string& flags, FileMgr* af, bool use_arena) const {
  779|    100|  auto alloc = [&](int n) -> unsigned short* {
  780|    100|    return use_arena ? (unsigned short*)this->arena_alloc(n * sizeof(unsigned short),
  781|    100|                                                          alignof(unsigned short))
  782|    100|                     : new unsigned short[n];
  783|    100|  };
  784|    100|  int len;
  785|    100|  if (flags.empty()) {
  ------------------
  |  Branch (785:7): [True: 0, False: 100]
  ------------------
  786|      0|    *result = nullptr;
  787|      0|    return 0;
  788|      0|  }
  789|    100|  switch (flag_mode) {
  790|      0|    case FLAG_LONG: {  // two-character flags (1x2yZz -> 1x 2y Zz)
  ------------------
  |  Branch (790:5): [True: 0, False: 100]
  ------------------
  791|      0|      len = flags.size();
  792|      0|      if ((len & 1) == 1 && af != nullptr)
  ------------------
  |  Branch (792:11): [True: 0, False: 0]
  |  Branch (792:29): [True: 0, False: 0]
  ------------------
  793|      0|        HUNSPELL_WARNING(stderr, "error: line %d: bad flagvector\n",
  794|      0|                         af->getlinenum());
  795|      0|      len >>= 1;
  796|      0|      *result = alloc(len);
  797|      0|      for (int i = 0; i < len; i++) {
  ------------------
  |  Branch (797:23): [True: 0, False: 0]
  ------------------
  798|      0|        unsigned short flag = ((unsigned short)((unsigned char)flags[i << 1]) << 8) |
  799|      0|                              ((unsigned short)((unsigned char)flags[(i << 1) | 1]));
  800|       |
  801|      0|        (*result)[i] = flag;
  802|      0|      }
  803|      0|      break;
  804|      0|    }
  805|      0|    case FLAG_NUM: {  // decimal numbers separated by comma (4521,23,233 -> 4521
  ------------------
  |  Branch (805:5): [True: 0, False: 100]
  ------------------
  806|       |                      // 23 233)
  807|      0|      len = int(1 + std::count_if(flags.begin(), flags.end(), [](char c) { return c == ','; }));
  808|      0|      *result = alloc(len);
  809|      0|      unsigned short* dest = *result;
  810|      0|      const char* src = flags.c_str();
  811|      0|      for (size_t p = 0; p < flags.size(); ++p) {
  ------------------
  |  Branch (811:26): [True: 0, False: 0]
  ------------------
  812|      0|        if (flags[p] == ',') {
  ------------------
  |  Branch (812:13): [True: 0, False: 0]
  ------------------
  813|      0|          int i = atoi(src);
  814|      0|          if ((i > std::numeric_limits<unsigned short>::max() || i < 0) && af != nullptr) {
  ------------------
  |  Branch (814:16): [True: 0, False: 0]
  |  Branch (814:66): [True: 0, False: 0]
  |  Branch (814:76): [True: 0, False: 0]
  ------------------
  815|      0|            HUNSPELL_WARNING(
  816|      0|                stderr, "error: line %d: flag id %d is out of range\n",
  817|      0|                af->getlinenum(), i);
  818|      0|             i = 0;
  819|      0|          }
  820|      0|          *dest = (unsigned short)i;
  821|      0|          if (*dest == 0 && af != nullptr)
  ------------------
  |  Branch (821:15): [True: 0, False: 0]
  |  Branch (821:29): [True: 0, False: 0]
  ------------------
  822|      0|            HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n",
  823|      0|                             af->getlinenum());
  824|      0|          src = flags.c_str() + p + 1;
  825|      0|          dest++;
  826|      0|        }
  827|      0|      }
  828|      0|      int i = atoi(src);
  829|      0|      if ((i > std::numeric_limits<unsigned short>::max() || i < 0) && af) {
  ------------------
  |  Branch (829:12): [True: 0, False: 0]
  |  Branch (829:62): [True: 0, False: 0]
  |  Branch (829:72): [True: 0, False: 0]
  ------------------
  830|      0|        HUNSPELL_WARNING(stderr,
  831|      0|                         "error: line %d: flag id %d is out of range\n",
  832|      0|                         af->getlinenum(), i);
  833|      0|        i = 0;
  834|      0|      }
  835|      0|      *dest = (unsigned short)i;
  836|      0|      if (*dest == 0 && af)
  ------------------
  |  Branch (836:11): [True: 0, False: 0]
  |  Branch (836:25): [True: 0, False: 0]
  ------------------
  837|      0|        HUNSPELL_WARNING(stderr, "error: line %d: 0 is wrong flag id\n",
  838|      0|                         af->getlinenum());
  839|      0|      break;
  840|      0|    }
  841|      0|    case FLAG_UNI: {  // UTF-8 characters
  ------------------
  |  Branch (841:5): [True: 0, False: 100]
  ------------------
  842|      0|      std::vector<w_char> w;
  843|      0|      u8_u16(w, flags);
  844|      0|      len = w.size();
  845|      0|      *result = alloc(len);
  846|      0|#if defined(_WIN32) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__))  || defined(__LITTLE_ENDIAN__)
  847|      0|      memcpy(*result, w.data(), len * sizeof(unsigned short));
  848|       |#else
  849|       |      unsigned short* dest = *result;
  850|       |      for (const w_char wc : w) {
  851|       |        *dest = (unsigned short)wc;
  852|       |        dest++;
  853|       |      }
  854|       |#endif
  855|      0|      break;
  856|      0|    }
  857|    100|    default: {  // Ispell's one-character flags (erfg -> e r f g)
  ------------------
  |  Branch (857:5): [True: 100, False: 0]
  ------------------
  858|    100|      len = flags.size();
  859|    100|      *result = alloc(len);
  860|    100|      unsigned short* dest = *result;
  861|    118|      for (const char flag : flags) {
  ------------------
  |  Branch (861:28): [True: 118, False: 100]
  ------------------
  862|    118|        *dest = (unsigned char)flag;
  863|    118|        dest++;
  864|    118|      }
  865|    100|    }
  866|    100|  }
  867|    100|  return len;
  868|    100|}
_ZNK7HashMgr11decode_flagERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  944|     92|unsigned short HashMgr::decode_flag(const std::string& f) const {
  945|     92|  unsigned short s = 0;
  946|     92|  int i;
  947|     92|  switch (flag_mode) {
  948|      0|    case FLAG_LONG:
  ------------------
  |  Branch (948:5): [True: 0, False: 92]
  ------------------
  949|      0|      if (f.size() >= 2)
  ------------------
  |  Branch (949:11): [True: 0, False: 0]
  ------------------
  950|      0|        s = ((unsigned short)((unsigned char)f[0]) << 8) | ((unsigned short)((unsigned char)f[1]));
  951|      0|      break;
  952|      0|    case FLAG_NUM:
  ------------------
  |  Branch (952:5): [True: 0, False: 92]
  ------------------
  953|      0|      i = atoi(f.c_str());
  954|      0|      if (i > std::numeric_limits<unsigned short>::max() || i < 0) {
  ------------------
  |  Branch (954:11): [True: 0, False: 0]
  |  Branch (954:61): [True: 0, False: 0]
  ------------------
  955|      0|        HUNSPELL_WARNING(stderr, "error: flag id %d is out of range\n", i);
  956|      0|        i = 0;
  957|      0|      }
  958|      0|      s = (unsigned short)i;
  959|      0|      break;
  960|      0|    case FLAG_UNI: {
  ------------------
  |  Branch (960:5): [True: 0, False: 92]
  ------------------
  961|      0|      std::vector<w_char> w;
  962|      0|      u8_u16(w, f);
  963|      0|      if (!w.empty())
  ------------------
  |  Branch (963:11): [True: 0, False: 0]
  ------------------
  964|      0|        s = (unsigned short)w[0];
  965|      0|      break;
  966|      0|    }
  967|     92|    default:
  ------------------
  |  Branch (967:5): [True: 92, False: 0]
  ------------------
  968|     92|      if (!f.empty())
  ------------------
  |  Branch (968:11): [True: 92, False: 0]
  ------------------
  969|     92|        s = (unsigned char)f[0];
  970|     92|  }
  971|     92|  if (s == 0)
  ------------------
  |  Branch (971:7): [True: 0, False: 92]
  ------------------
  972|      0|    HUNSPELL_WARNING(stderr, "error: 0 is wrong flag id\n");
  973|     92|  return s;
  974|     92|}
_ZN7HashMgr11load_configEPKcS1_:
 1010|     38|int HashMgr::load_config(const char* affpath, const char* key) {
 1011|     38|  int firstline = 1;
 1012|       |
 1013|       |  // open the affix file
 1014|     38|  FileMgr* afflst = new FileMgr(affpath, key);
 1015|       |
 1016|       |  // read in each line ignoring any that do not
 1017|       |  // start with a known line type indicator
 1018|       |
 1019|     38|  std::string line;
 1020|    922|  while (afflst->getline(line)) {
  ------------------
  |  Branch (1020:10): [True: 886, False: 36]
  ------------------
 1021|    886|    mychomp(line);
 1022|       |
 1023|       |    /* remove byte order mark */
 1024|    886|    if (firstline) {
  ------------------
  |  Branch (1024:9): [True: 38, False: 848]
  ------------------
 1025|     38|      firstline = 0;
 1026|     38|      if (line.compare(0, 3, "\xEF\xBB\xBF", 3) == 0) {
  ------------------
  |  Branch (1026:11): [True: 0, False: 38]
  ------------------
 1027|      0|        line.erase(0, 3);
 1028|      0|      }
 1029|     38|    }
 1030|       |
 1031|       |    /* parse in the try string */
 1032|    886|    if ((line.compare(0, 4, "FLAG", 4) == 0) && line.size() > 4 && isspace(line[4])) {
  ------------------
  |  Branch (1032:9): [True: 0, False: 886]
  |  Branch (1032:49): [True: 0, False: 0]
  |  Branch (1032:68): [True: 0, False: 0]
  ------------------
 1033|      0|      if (flag_mode != FLAG_CHAR) {
  ------------------
  |  Branch (1033:11): [True: 0, False: 0]
  ------------------
 1034|      0|        HUNSPELL_WARNING(stderr,
 1035|      0|                         "error: line %d: multiple definitions of the FLAG "
 1036|      0|                         "affix file parameter\n",
 1037|      0|                         afflst->getlinenum());
 1038|      0|      }
 1039|      0|      if (line.find("long") != std::string::npos)
  ------------------
  |  Branch (1039:11): [True: 0, False: 0]
  ------------------
 1040|      0|        flag_mode = FLAG_LONG;
 1041|      0|      if (line.find("num") != std::string::npos)
  ------------------
  |  Branch (1041:11): [True: 0, False: 0]
  ------------------
 1042|      0|        flag_mode = FLAG_NUM;
 1043|      0|      if (line.find("UTF-8") != std::string::npos)
  ------------------
  |  Branch (1043:11): [True: 0, False: 0]
  ------------------
 1044|      0|        flag_mode = FLAG_UNI;
 1045|      0|      if (flag_mode == FLAG_CHAR) {
  ------------------
  |  Branch (1045:11): [True: 0, False: 0]
  ------------------
 1046|      0|        HUNSPELL_WARNING(
 1047|      0|            stderr,
 1048|      0|            "error: line %d: FLAG needs `num', `long' or `UTF-8' parameter\n",
 1049|      0|            afflst->getlinenum());
 1050|      0|      }
 1051|      0|    }
 1052|       |
 1053|    886|    if (line.compare(0, 13, "FORBIDDENWORD", 13) == 0) {
  ------------------
  |  Branch (1053:9): [True: 2, False: 884]
  ------------------
 1054|      2|      std::string st;
 1055|      2|      if (!parse_string(line, st, afflst->getlinenum())) {
  ------------------
  |  Branch (1055:11): [True: 0, False: 2]
  ------------------
 1056|      0|        delete afflst;
 1057|      0|        return 1;
 1058|      0|      }
 1059|      2|      forbiddenword = decode_flag(st);
 1060|      2|    }
 1061|       |
 1062|    886|    if (line.compare(0, 3, "SET", 3) == 0) {
  ------------------
  |  Branch (1062:9): [True: 18, False: 868]
  ------------------
 1063|     18|      if (!parse_string(line, enc, afflst->getlinenum())) {
  ------------------
  |  Branch (1063:11): [True: 0, False: 18]
  ------------------
 1064|      0|        delete afflst;
 1065|      0|        return 1;
 1066|      0|      }
 1067|     18|      if (enc == "UTF-8") {
  ------------------
  |  Branch (1067:11): [True: 18, False: 0]
  ------------------
 1068|     18|        utf8 = 1;
 1069|     18|      } else
 1070|      0|        csconv = get_current_cs(enc);
 1071|     18|    }
 1072|       |
 1073|    886|    if (line.compare(0, 4, "LANG", 4) == 0) {
  ------------------
  |  Branch (1073:9): [True: 2, False: 884]
  ------------------
 1074|      2|      if (!parse_string(line, lang, afflst->getlinenum())) {
  ------------------
  |  Branch (1074:11): [True: 0, False: 2]
  ------------------
 1075|      0|        delete afflst;
 1076|      0|        return 1;
 1077|      0|      }
 1078|      2|      langnum = get_lang_num(lang);
 1079|      2|    }
 1080|       |
 1081|       |    /* parse in the ignored characters (for example, Arabic optional diacritics
 1082|       |     * characters */
 1083|    886|    if (line.compare(0, 6, "IGNORE", 6) == 0) {
  ------------------
  |  Branch (1083:9): [True: 4, False: 882]
  ------------------
 1084|      4|      if (!parse_array(line, ignorechars, ignorechars_utf16,
  ------------------
  |  Branch (1084:11): [True: 0, False: 4]
  ------------------
 1085|      4|                       utf8, afflst->getlinenum())) {
 1086|      0|        delete afflst;
 1087|      0|        return 1;
 1088|      0|      }
 1089|      4|    }
 1090|       |
 1091|    886|    if ((line.compare(0, 2, "AF", 2) == 0) && line.size() > 2 && isspace(line[2])) {
  ------------------
  |  Branch (1091:9): [True: 2, False: 884]
  |  Branch (1091:47): [True: 2, False: 0]
  |  Branch (1091:66): [True: 2, False: 0]
  ------------------
 1092|      2|      if (!parse_aliasf(line, afflst)) {
  ------------------
  |  Branch (1092:11): [True: 0, False: 2]
  ------------------
 1093|      0|        delete afflst;
 1094|      0|        return 1;
 1095|      0|      }
 1096|      2|    }
 1097|       |
 1098|    886|    if ((line.compare(0, 2, "AM", 2) == 0) && line.size() > 2 && isspace(line[2])) {
  ------------------
  |  Branch (1098:9): [True: 0, False: 886]
  |  Branch (1098:47): [True: 0, False: 0]
  |  Branch (1098:66): [True: 0, False: 0]
  ------------------
 1099|      0|      if (!parse_aliasm(line, afflst)) {
  ------------------
  |  Branch (1099:11): [True: 0, False: 0]
  ------------------
 1100|      0|        delete afflst;
 1101|      0|        return 1;
 1102|      0|      }
 1103|      0|    }
 1104|       |
 1105|    886|    if (line.compare(0, 15, "COMPLEXPREFIXES", 15) == 0)
  ------------------
  |  Branch (1105:9): [True: 2, False: 884]
  ------------------
 1106|      2|      complexprefixes = 1;
 1107|       |
 1108|       |    /* parse in the typical fault correcting table */
 1109|    886|    if (line.compare(0, 3, "REP", 3) == 0) {
  ------------------
  |  Branch (1109:9): [True: 6, False: 880]
  ------------------
 1110|      6|      if (!parse_reptable(line, afflst)) {
  ------------------
  |  Branch (1110:11): [True: 0, False: 6]
  ------------------
 1111|      0|        delete afflst;
 1112|      0|        return 1;
 1113|      0|      }
 1114|      6|    }
 1115|       |
 1116|       |    // don't check the full affix file, yet
 1117|    886|    if (((line.compare(0, 3, "SFX", 3) == 0) ||
  ------------------
  |  Branch (1117:10): [True: 42, False: 844]
  ------------------
 1118|    844|         (line.compare(0, 3, "PFX", 3) == 0)) &&
  ------------------
  |  Branch (1118:10): [True: 24, False: 820]
  ------------------
 1119|     66|            line.size() > 3 && isspace(line[3]) &&
  ------------------
  |  Branch (1119:13): [True: 66, False: 0]
  |  Branch (1119:32): [True: 66, False: 0]
  ------------------
 1120|     66|            !reptable.empty()) // (REP table is in the end of Afrikaans aff file)
  ------------------
  |  Branch (1120:13): [True: 2, False: 64]
  ------------------
 1121|      2|      break;
 1122|    886|  }
 1123|       |
 1124|     38|  delete afflst;
 1125|     38|  return 0;
 1126|     38|}
_ZN7HashMgr12parse_aliasfERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 1129|      2|bool HashMgr::parse_aliasf(const std::string& line, FileMgr* af) {
 1130|      2|  if (!aliasf.empty()) {
  ------------------
  |  Branch (1130:7): [True: 0, False: 2]
  ------------------
 1131|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 1132|      0|                     af->getlinenum());
 1133|      0|    return false;
 1134|      0|  }
 1135|      2|  int i = 0, np = 0, numaliasf = 0;
 1136|      2|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 1137|      6|  while (start_piece != line.end()) {
  ------------------
  |  Branch (1137:10): [True: 4, False: 2]
  ------------------
 1138|      4|    switch (i) {
 1139|      2|      case 0: {
  ------------------
  |  Branch (1139:7): [True: 2, False: 2]
  ------------------
 1140|      2|        np++;
 1141|      2|        break;
 1142|      0|      }
 1143|      2|      case 1: {
  ------------------
  |  Branch (1143:7): [True: 2, False: 2]
  ------------------
 1144|      2|        numaliasf = atoi(std::string(start_piece, iter).c_str());
 1145|      2|        if (numaliasf < 1) {
  ------------------
  |  Branch (1145:13): [True: 0, False: 2]
  ------------------
 1146|      0|          aliasf.clear();
 1147|      0|          aliasflen.clear();
 1148|      0|          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
 1149|      0|                           af->getlinenum());
 1150|      0|          return false;
 1151|      0|        }
 1152|      2|        aliasf.reserve(std::min(numaliasf, 16384));
 1153|      2|        aliasflen.reserve(std::min(numaliasf, 16384));
 1154|      2|        np++;
 1155|      2|        break;
 1156|      2|      }
 1157|      0|      default:
  ------------------
  |  Branch (1157:7): [True: 0, False: 4]
  ------------------
 1158|      0|        break;
 1159|      4|    }
 1160|      4|    ++i;
 1161|      4|    start_piece = mystrsep(line, iter);
 1162|      4|  }
 1163|      2|  if (np != 2) {
  ------------------
  |  Branch (1163:7): [True: 0, False: 2]
  ------------------
 1164|      0|    aliasf.clear();
 1165|      0|    aliasflen.clear();
 1166|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 1167|      0|                     af->getlinenum());
 1168|      0|    return false;
 1169|      0|  }
 1170|       |
 1171|       |  /* now parse the numaliasf lines to read in the remainder of the table */
 1172|      6|  for (int j = 0; j < numaliasf; ++j) {
  ------------------
  |  Branch (1172:19): [True: 4, False: 2]
  ------------------
 1173|      4|    std::string nl;
 1174|      4|    unsigned short* alias = nullptr;
 1175|      4|    unsigned aliaslen = 0;
 1176|      4|    i = 0;
 1177|      4|    if (af->getline(nl)) {
  ------------------
  |  Branch (1177:9): [True: 4, False: 0]
  ------------------
 1178|      4|      mychomp(nl);
 1179|      4|      iter = nl.begin();
 1180|      4|      start_piece = mystrsep(nl, iter);
 1181|      4|      bool errored = false;
 1182|     12|      while (!errored && start_piece != nl.end()) {
  ------------------
  |  Branch (1182:14): [True: 12, False: 0]
  |  Branch (1182:14): [True: 8, False: 4]
  |  Branch (1182:26): [True: 8, False: 4]
  ------------------
 1183|      8|        switch (i) {
 1184|      4|          case 0: {
  ------------------
  |  Branch (1184:11): [True: 4, False: 4]
  ------------------
 1185|      4|            if (nl.compare(start_piece - nl.begin(), 2, "AF", 2) != 0) {
  ------------------
  |  Branch (1185:17): [True: 0, False: 4]
  ------------------
 1186|      0|              errored = true;
 1187|      0|              break;
 1188|      0|            }
 1189|      4|            break;
 1190|      4|          }
 1191|      4|          case 1: {
  ------------------
  |  Branch (1191:11): [True: 4, False: 4]
  ------------------
 1192|      4|            std::string piece(start_piece, iter);
 1193|      4|            aliaslen =
 1194|      4|                (unsigned short)decode_flags(&alias, piece, af, /* arena = */ true);
 1195|      4|            std::sort(alias, alias + aliaslen);
 1196|      4|            break;
 1197|      4|          }
 1198|      0|          default:
  ------------------
  |  Branch (1198:11): [True: 0, False: 8]
  ------------------
 1199|      0|            break;
 1200|      8|        }
 1201|      8|        ++i;
 1202|      8|        start_piece = mystrsep(nl, iter);
 1203|      8|      }
 1204|      4|    }
 1205|      4|    if (!alias) {
  ------------------
  |  Branch (1205:9): [True: 0, False: 4]
  ------------------
 1206|      0|      for (int k = 0; k < j; ++k) {
  ------------------
  |  Branch (1206:23): [True: 0, False: 0]
  ------------------
 1207|      0|        arena_free(aliasf[k]);
 1208|      0|      }
 1209|      0|      aliasf.clear();
 1210|      0|      aliasflen.clear();
 1211|      0|      HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 1212|      0|                       af->getlinenum());
 1213|      0|      return false;
 1214|      0|    }
 1215|       |
 1216|      4|    aliasf.push_back(alias);
 1217|      4|    aliasflen.push_back(aliaslen);
 1218|      4|  }
 1219|      2|  return true;
 1220|      2|}
_ZNK7HashMgr9is_aliasfEv:
 1222|     44|int HashMgr::is_aliasf() const {
 1223|     44|  return !aliasf.empty();
 1224|     44|}
_ZNK7HashMgr10get_aliasfEiPPtP7FileMgr:
 1226|      4|int HashMgr::get_aliasf(int index, unsigned short** fvec, FileMgr* af) const {
 1227|      4|  if (index > 0 && static_cast<size_t>(index) <= aliasflen.size()) {
  ------------------
  |  Branch (1227:7): [True: 4, False: 0]
  |  Branch (1227:20): [True: 4, False: 0]
  ------------------
 1228|      4|    *fvec = aliasf[index - 1];
 1229|      4|    return aliasflen[index - 1];
 1230|      4|  }
 1231|      0|  HUNSPELL_WARNING(stderr, "error: line %d: bad flag alias index: %d\n",
 1232|      0|                   af->getlinenum(), index);
 1233|      0|  *fvec = nullptr;
 1234|      0|  return 0;
 1235|      4|}
_ZNK7HashMgr9is_aliasmEv:
 1333|     32|int HashMgr::is_aliasm() const {
 1334|     32|  return !aliasm.empty();
 1335|     32|}
_ZN7HashMgr14parse_reptableERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEP7FileMgr:
 1345|      6|bool HashMgr::parse_reptable(const std::string& line, FileMgr* af) {
 1346|      6|  if (!reptable.empty()) {
  ------------------
  |  Branch (1346:7): [True: 0, False: 6]
  ------------------
 1347|      0|    HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n",
 1348|      0|                     af->getlinenum());
 1349|      0|    return false;
 1350|      0|  }
 1351|      6|  int numrep = -1, i = 0, np = 0;
 1352|      6|  auto iter = line.begin(), start_piece = mystrsep(line, iter);
 1353|     18|  while (start_piece != line.end()) {
  ------------------
  |  Branch (1353:10): [True: 12, False: 6]
  ------------------
 1354|     12|    switch (i) {
 1355|      6|      case 0: {
  ------------------
  |  Branch (1355:7): [True: 6, False: 6]
  ------------------
 1356|      6|        np++;
 1357|      6|        break;
 1358|      0|      }
 1359|      6|      case 1: {
  ------------------
  |  Branch (1359:7): [True: 6, False: 6]
  ------------------
 1360|      6|        numrep = atoi(std::string(start_piece, iter).c_str());
 1361|      6|        if (numrep < 1) {
  ------------------
  |  Branch (1361:13): [True: 0, False: 6]
  ------------------
 1362|      0|          HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n",
 1363|      0|                           af->getlinenum());
 1364|      0|          return false;
 1365|      0|        }
 1366|      6|        reptable.reserve(std::min(numrep, 16384));
 1367|      6|        np++;
 1368|      6|        break;
 1369|      6|      }
 1370|      0|      default:
  ------------------
  |  Branch (1370:7): [True: 0, False: 12]
  ------------------
 1371|      0|        break;
 1372|     12|    }
 1373|     12|    ++i;
 1374|     12|    start_piece = mystrsep(line, iter);
 1375|     12|  }
 1376|      6|  if (np != 2) {
  ------------------
  |  Branch (1376:7): [True: 0, False: 6]
  ------------------
 1377|      0|    HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",
 1378|      0|                     af->getlinenum());
 1379|      0|    return false;
 1380|      0|  }
 1381|       |
 1382|       |  /* now parse the numrep lines to read in the remainder of the table */
 1383|     12|  for (int j = 0; j < numrep; ++j) {
  ------------------
  |  Branch (1383:19): [True: 6, False: 6]
  ------------------
 1384|      6|    std::string nl;
 1385|      6|    reptable.emplace_back();
 1386|      6|    int type = 0;
 1387|      6|    if (af->getline(nl)) {
  ------------------
  |  Branch (1387:9): [True: 6, False: 0]
  ------------------
 1388|      6|      mychomp(nl);
 1389|      6|      iter = nl.begin();
 1390|      6|      i = 0;
 1391|      6|      start_piece = mystrsep(nl, iter);
 1392|      6|      bool errored = false;
 1393|     24|      while (!errored && start_piece != nl.end()) {
  ------------------
  |  Branch (1393:14): [True: 24, False: 0]
  |  Branch (1393:14): [True: 18, False: 6]
  |  Branch (1393:26): [True: 18, False: 6]
  ------------------
 1394|     18|        switch (i) {
 1395|      6|          case 0: {
  ------------------
  |  Branch (1395:11): [True: 6, False: 12]
  ------------------
 1396|      6|            if (nl.compare(start_piece - nl.begin(), 3, "REP", 3) != 0) {
  ------------------
  |  Branch (1396:17): [True: 0, False: 6]
  ------------------
 1397|      0|              errored = true;
 1398|      0|              break;
 1399|      0|            }
 1400|      6|            break;
 1401|      6|          }
 1402|      6|          case 1: {
  ------------------
  |  Branch (1402:11): [True: 6, False: 12]
  ------------------
 1403|      6|            if (*start_piece == '^')
  ------------------
  |  Branch (1403:17): [True: 0, False: 6]
  ------------------
 1404|      0|              type = 1;
 1405|      6|            reptable.back().pattern.assign(start_piece + type, iter);
 1406|      6|            mystrrep(reptable.back().pattern, "_", " ");
 1407|      6|            if (!reptable.back().pattern.empty() && reptable.back().pattern[reptable.back().pattern.size() - 1] == '$') {
  ------------------
  |  Branch (1407:17): [True: 6, False: 0]
  |  Branch (1407:53): [True: 0, False: 6]
  ------------------
 1408|      0|              type += 2;
 1409|      0|              reptable.back().pattern.resize(reptable.back().pattern.size() - 1);
 1410|      0|            }
 1411|      6|            break;
 1412|      6|          }
 1413|      6|          case 2: {
  ------------------
  |  Branch (1413:11): [True: 6, False: 12]
  ------------------
 1414|      6|            reptable.back().outstrings[type].assign(start_piece, iter);
 1415|      6|            mystrrep(reptable.back().outstrings[type], "_", " ");
 1416|      6|            break;
 1417|      6|          }
 1418|      0|          default:
  ------------------
  |  Branch (1418:11): [True: 0, False: 18]
  ------------------
 1419|      0|            break;
 1420|     18|        }
 1421|     18|        ++i;
 1422|     18|        start_piece = mystrsep(nl, iter);
 1423|     18|      }
 1424|      6|    }
 1425|      6|    if (reptable.back().pattern.empty() || reptable.back().outstrings[type].empty()) {
  ------------------
  |  Branch (1425:9): [True: 0, False: 6]
  |  Branch (1425:44): [True: 0, False: 6]
  ------------------
 1426|      0|      HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n",
 1427|      0|                       af->getlinenum());
 1428|      0|      reptable.clear();
 1429|      0|      return false;
 1430|      0|    }
 1431|      6|  }
 1432|      6|  return true;
 1433|      6|}
_ZNK7HashMgr12get_reptableEv:
 1436|   362k|const std::vector<replentry>& HashMgr::get_reptable() const {
 1437|   362k|  return reptable;
 1438|   362k|}
_ZNK7HashMgr11arena_allocEmm:
 1440|  10.2k|void* HashMgr::arena_alloc(size_t num_bytes, size_t alignment) const {
 1441|       |  // Fixed-size 64KB chunks: small enough to avoid significant waste on small
 1442|       |  // dictionaries, large enough to amortize per-chunk malloc overhead on large
 1443|       |  // ones. make_unique throws std::bad_alloc on OOM.
 1444|  10.2k|  static const size_t MIN_CHUNK_SIZE = 65536;
 1445|  10.2k|  static const size_t MAX_ALIGNMENT = alignof(max_align_t);
 1446|       |  // Chunk sizes are rounded up to MAX_ALIGNMENT below; with this invariant,
 1447|       |  // any alignment that divides MAX_ALIGNMENT keeps aligned_offset within bounds.
 1448|  10.2k|  assert(alignment > 0 && alignment <= MAX_ALIGNMENT);
  ------------------
  |  Branch (1448:3): [True: 10.2k, False: 0]
  |  Branch (1448:3): [True: 10.2k, False: 0]
  |  Branch (1448:3): [True: 10.2k, False: 0]
  ------------------
 1449|       |  // Pad the offset up to the requested alignment before placing this allocation.
 1450|       |  // make_unique returns memory aligned for any scalar, so chunk-start is fine.
 1451|  10.2k|  size_t aligned_offset = (current_chunk_offset + alignment - 1) & ~(alignment - 1);
 1452|  10.2k|  if (arena.empty() || current_chunk_size - aligned_offset < num_bytes) {
  ------------------
  |  Branch (1452:7): [True: 38, False: 10.2k]
  |  Branch (1452:24): [True: 76, False: 10.1k]
  ------------------
 1453|       |    // Round the new chunk's size up to a multiple of MAX_ALIGNMENT so that an
 1454|       |    // oversized num_bytes (>= MIN_CHUNK_SIZE) cannot leave a non-aligned
 1455|       |    // current_chunk_size that would later cause aligned_offset to overshoot.
 1456|       |    // Allocate before mutating current_chunk_size so a throwing make_unique
 1457|       |    // leaves the HashMgr in a consistent state.
 1458|    114|    size_t new_size = std::max(MIN_CHUNK_SIZE, num_bytes);
 1459|    114|    new_size = (new_size + MAX_ALIGNMENT - 1) & ~(MAX_ALIGNMENT - 1);
 1460|    114|    arena.push_back(std::make_unique<uint8_t[]>(new_size));
 1461|    114|    current_chunk_size = new_size;
 1462|    114|    aligned_offset = 0;
 1463|    114|  }
 1464|       |
 1465|  10.2k|  uint8_t* ptr = &arena.back()[aligned_offset];
 1466|  10.2k|  current_chunk_offset = aligned_offset + num_bytes;
 1467|  10.2k|  ++outstanding_arena_allocations;
 1468|  10.2k|  return ptr;
 1469|  10.2k|}
_ZNK7HashMgr10arena_freeEPv:
 1471|    383|void HashMgr::arena_free(void*) const {
 1472|       |  // The arena vector owns all allocations and frees them in bulk at HashMgr
 1473|       |  // destruction, so this is a no-op for the memory itself. The counter is a
 1474|       |  // memory-safety check: more arena_free calls than arena_alloc calls would
 1475|       |  // indicate a double-free or use-after-free in Hunspell. Abort hard rather
 1476|       |  // than silently desynchronize tracking, even in release builds.
 1477|    383|  if (outstanding_arena_allocations == 0) {
  ------------------
  |  Branch (1477:7): [True: 0, False: 383]
  ------------------
 1478|      0|    std::abort();
 1479|      0|  }
 1480|    383|  --outstanding_arena_allocations;
 1481|    383|}
hashmgr.cxx:_ZZNK7HashMgr12decode_flagsEPPtRKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEP7FileMgrbENK3$_0clEi:
  779|    100|  auto alloc = [&](int n) -> unsigned short* {
  780|    100|    return use_arena ? (unsigned short*)this->arena_alloc(n * sizeof(unsigned short),
  ------------------
  |  Branch (780:12): [True: 84, False: 16]
  ------------------
  781|     84|                                                          alignof(unsigned short))
  782|    100|                     : new unsigned short[n];
  783|    100|  };

_ZN12HunspellImplC2EPKcS1_S1_:
  191|     38|  : affixpath(affpath) {
  192|     38|  csconv = nullptr;
  193|     38|  utf8 = 0;
  194|     38|  complexprefixes = 0;
  195|       |
  196|       |  /* first set up the hash manager */
  197|     38|  m_HMgrs.push_back(std::make_unique<HashMgr>(dpath, affpath, key));
  198|       |
  199|       |  /* next set up the affix manager */
  200|       |  /* it needs access to the hash manager lookup methods */
  201|     38|  pAMgr = std::make_unique<AffixMgr>(affpath, m_HMgrs, key);
  202|       |
  203|       |  /* get the preferred try string and the dictionary */
  204|       |  /* encoding from the Affix Manager for that dictionary */
  205|     38|  std::string try_string = pAMgr->get_try_string();
  206|     38|  encoding = pAMgr->get_encoding();
  207|     38|  langnum = pAMgr->get_langnum();
  208|     38|  utf8 = pAMgr->get_utf8();
  209|     38|  if (!utf8)
  ------------------
  |  Branch (209:7): [True: 20, False: 18]
  ------------------
  210|     20|    csconv = get_current_cs(encoding);
  211|     38|  complexprefixes = pAMgr->get_complexprefixes();
  212|     38|  wordbreak = pAMgr->get_breaktable();
  213|       |
  214|       |  /* and finally set up the suggestion manager */
  215|     38|  pSMgr = std::make_unique<SuggestMgr>(try_string, MAXSUGGESTION, pAMgr.get());
  ------------------
  |  |   83|     38|#define MAXSUGGESTION 15
  ------------------
  216|     38|}
_ZN12HunspellImpl12clean_ignoreERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKS6_:
  235|  29.2M|                                const std::string& src) {
  236|  29.2M|  dest.clear();
  237|  29.2M|  dest.assign(src);
  238|  29.2M|  const char* ignoredchars = pAMgr ? pAMgr->get_ignore() : nullptr;
  ------------------
  |  Branch (238:30): [True: 29.2M, False: 0]
  ------------------
  239|  29.2M|  if (ignoredchars != nullptr) {
  ------------------
  |  Branch (239:7): [True: 2.84M, False: 26.4M]
  ------------------
  240|  2.84M|    if (utf8) {
  ------------------
  |  Branch (240:9): [True: 684k, False: 2.16M]
  ------------------
  241|   684k|      const std::vector<w_char>& ignoredchars_utf16 =
  242|   684k|          pAMgr->get_ignore_utf16();
  243|   684k|      remove_ignored_chars_utf(dest, ignoredchars_utf16);
  244|  2.16M|    } else {
  245|  2.16M|      remove_ignored_chars(dest, ignoredchars);
  246|  2.16M|    }
  247|  2.84M|  }
  248|  29.2M|}
_ZN12HunspellImpl10cleanword2ERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorI6w_charNS4_IS9_EEEERKS6_PiPm:
  262|  13.3M|                         size_t* pabbrev) {
  263|  13.3M|  dest.clear();
  264|  13.3M|  dest_utf.clear();
  265|       |
  266|       |  // remove IGNORE characters from the string
  267|  13.3M|  std::string w2;
  268|  13.3M|  clean_ignore(w2, src);
  269|       |
  270|  13.3M|  const char* q = w2.c_str();
  271|  13.3M|  int nl = (int)w2.size();
  272|       |
  273|       |  // first skip over any leading blanks
  274|  13.5M|  while (*q == ' ') {
  ------------------
  |  Branch (274:10): [True: 183k, False: 13.3M]
  ------------------
  275|   183k|    ++q;
  276|   183k|    nl--;
  277|   183k|  }
  278|       |
  279|       |  // now strip off any trailing periods (recording their presence)
  280|  13.3M|  *pabbrev = 0;
  281|       |
  282|  15.8M|  while ((nl > 0) && (*(q + nl - 1) == '.')) {
  ------------------
  |  Branch (282:10): [True: 15.3M, False: 479k]
  |  Branch (282:22): [True: 2.48M, False: 12.9M]
  ------------------
  283|  2.48M|    nl--;
  284|  2.48M|    (*pabbrev)++;
  285|  2.48M|  }
  286|       |
  287|       |  // if no characters are left it can't be capitalized
  288|  13.3M|  if (nl <= 0) {
  ------------------
  |  Branch (288:7): [True: 479k, False: 12.9M]
  ------------------
  289|   479k|    *pcaptype = NOCAP;
  ------------------
  |  |   92|   479k|#define NOCAP 0
  ------------------
  290|   479k|    return 0;
  291|   479k|  }
  292|       |
  293|  12.9M|  dest.append(q, nl);
  294|  12.9M|  nl = dest.size();
  295|  12.9M|  if (utf8) {
  ------------------
  |  Branch (295:7): [True: 2.78M, False: 10.1M]
  ------------------
  296|  2.78M|    u8_u16(dest_utf, dest);
  297|  2.78M|    *pcaptype = get_captype_utf8(dest_utf, langnum);
  298|  10.1M|  } else {
  299|  10.1M|    *pcaptype = get_captype(dest, csconv);
  300|  10.1M|  }
  301|  12.9M|  return nl;
  302|  13.3M|}
_ZN12HunspellImpl9cleanwordERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKS6_PiSA_:
  307|  5.35k|                        int* pabbrev) {
  308|  5.35k|  dest.clear();
  309|  5.35k|  const unsigned char* q = (const unsigned char*)src.c_str();
  310|  5.35k|  int firstcap = 0, nl = (int)src.size();
  311|       |
  312|       |  // first skip over any leading blanks
  313|  9.17k|  while (*q == ' ') {
  ------------------
  |  Branch (313:10): [True: 3.81k, False: 5.35k]
  ------------------
  314|  3.81k|    ++q;
  315|  3.81k|    nl--;
  316|  3.81k|  }
  317|       |
  318|       |  // now strip off any trailing periods (recording their presence)
  319|  5.35k|  *pabbrev = 0;
  320|       |
  321|  17.5k|  while ((nl > 0) && (*(q + nl - 1) == '.')) {
  ------------------
  |  Branch (321:10): [True: 17.3k, False: 171]
  |  Branch (321:22): [True: 12.1k, False: 5.18k]
  ------------------
  322|  12.1k|    nl--;
  323|  12.1k|    (*pabbrev)++;
  324|  12.1k|  }
  325|       |
  326|       |  // if no characters are left it can't be capitalized
  327|  5.35k|  if (nl <= 0) {
  ------------------
  |  Branch (327:7): [True: 171, False: 5.18k]
  ------------------
  328|    171|    *pcaptype = NOCAP;
  ------------------
  |  |   92|    171|#define NOCAP 0
  ------------------
  329|    171|    return;
  330|    171|  }
  331|       |
  332|       |  // now determine the capitalization type of the first nl letters
  333|  5.18k|  int ncap = 0;
  334|  5.18k|  int nneutral = 0;
  335|  5.18k|  int nc = 0;
  336|       |
  337|  5.18k|  if (!utf8) {
  ------------------
  |  Branch (337:7): [True: 2.74k, False: 2.44k]
  ------------------
  338|   690k|    while (nl > 0) {
  ------------------
  |  Branch (338:12): [True: 687k, False: 2.74k]
  ------------------
  339|   687k|      nc++;
  340|   687k|      if (csconv[(*q)].ccase)
  ------------------
  |  Branch (340:11): [True: 597k, False: 90.6k]
  ------------------
  341|   597k|        ncap++;
  342|   687k|      if (csconv[(*q)].cupper == csconv[(*q)].clower)
  ------------------
  |  Branch (342:11): [True: 80.1k, False: 607k]
  ------------------
  343|  80.1k|        nneutral++;
  344|   687k|      dest.push_back(*q++);
  345|   687k|      nl--;
  346|   687k|    }
  347|       |    // remember to terminate the destination string
  348|  2.74k|    firstcap = csconv[static_cast<unsigned char>(dest[0])].ccase;
  349|  2.74k|  } else {
  350|  2.44k|    std::vector<w_char> t;
  351|  2.44k|    u8_u16(t, src);
  352|   188k|    for (auto& wc : t) {
  ------------------
  |  Branch (352:19): [True: 188k, False: 2.44k]
  ------------------
  353|   188k|      const auto idx = (unsigned short)wc;
  354|   188k|      const auto low = unicodetolower(idx, langnum);
  355|   188k|      if (idx != low)
  ------------------
  |  Branch (355:11): [True: 130k, False: 57.9k]
  ------------------
  356|   130k|        ncap++;
  357|   188k|      if (unicodetoupper(idx, langnum) == low)
  ------------------
  |  Branch (357:11): [True: 54.9k, False: 134k]
  ------------------
  358|  54.9k|        nneutral++;
  359|   188k|    }
  360|  2.44k|    u16_u8(dest, t);
  361|  2.44k|    if (ncap) {
  ------------------
  |  Branch (361:9): [True: 1.43k, False: 1.00k]
  ------------------
  362|  1.43k|      const auto idx = (unsigned short)t[0];
  363|  1.43k|      firstcap = (idx != unicodetolower(idx, langnum));
  364|  1.43k|    }
  365|  2.44k|  }
  366|       |
  367|       |  // now finally set the captype
  368|  5.18k|  if (ncap == 0) {
  ------------------
  |  Branch (368:7): [True: 1.97k, False: 3.20k]
  ------------------
  369|  1.97k|    *pcaptype = NOCAP;
  ------------------
  |  |   92|  1.97k|#define NOCAP 0
  ------------------
  370|  3.20k|  } else if ((ncap == 1) && firstcap) {
  ------------------
  |  Branch (370:14): [True: 1.72k, False: 1.48k]
  |  Branch (370:29): [True: 1.36k, False: 363]
  ------------------
  371|  1.36k|    *pcaptype = INITCAP;
  ------------------
  |  |   93|  1.36k|#define INITCAP 1
  ------------------
  372|  1.84k|  } else if ((ncap == nc) || ((ncap + nneutral) == nc)) {
  ------------------
  |  Branch (372:14): [True: 100, False: 1.74k]
  |  Branch (372:30): [True: 350, False: 1.39k]
  ------------------
  373|    450|    *pcaptype = ALLCAP;
  ------------------
  |  |   94|    450|#define ALLCAP 2
  ------------------
  374|  1.39k|  } else if ((ncap > 1) && firstcap) {
  ------------------
  |  Branch (374:14): [True: 1.06k, False: 333]
  |  Branch (374:28): [True: 881, False: 181]
  ------------------
  375|    881|    *pcaptype = HUHINITCAP;
  ------------------
  |  |   96|    881|#define HUHINITCAP 4
  ------------------
  376|    881|  } else {
  377|    514|    *pcaptype = HUHCAP;
  ------------------
  |  |   95|    514|#define HUHCAP 3
  ------------------
  378|    514|  }
  379|  5.18k|}
_ZN12HunspellImpl8mkallcapERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
  381|  2.30k|void HunspellImpl::mkallcap(std::string& u8) {
  382|  2.30k|  if (utf8) {
  ------------------
  |  Branch (382:7): [True: 1.21k, False: 1.08k]
  ------------------
  383|  1.21k|    std::vector<w_char> u16;
  384|  1.21k|    u8_u16(u16, u8);
  385|  1.21k|    ::mkallcap_utf(u16, langnum);
  386|  1.21k|    u16_u8(u8, u16);
  387|  1.21k|  } else {
  388|  1.08k|    ::mkallcap(u8, csconv);
  389|  1.08k|  }
  390|  2.30k|}
_ZN12HunspellImpl11mkallsmall2ERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorI6w_charNS4_IS9_EEEE:
  392|  1.41M|int HunspellImpl::mkallsmall2(std::string& u8, std::vector<w_char>& u16) {
  393|  1.41M|  if (utf8) {
  ------------------
  |  Branch (393:7): [True: 313k, False: 1.10M]
  ------------------
  394|   313k|    ::mkallsmall_utf(u16, langnum);
  395|   313k|    u16_u8(u8, u16);
  396|  1.10M|  } else {
  397|  1.10M|    ::mkallsmall(u8, csconv);
  398|  1.10M|  }
  399|  1.41M|  return u8.size();
  400|  1.41M|}
_ZN12HunspellImpl11is_keepcaseEPK6hentry:
  438|  29.8k|int HunspellImpl::is_keepcase(const hentry* rv) {
  439|  29.8k|  return pAMgr && rv->astr && pAMgr->get_keepcase() &&
  ------------------
  |  Branch (439:10): [True: 29.8k, False: 0]
  |  Branch (439:19): [True: 611, False: 29.2k]
  |  Branch (439:31): [True: 61, False: 550]
  ------------------
  440|     61|         TESTAFF(rv->astr, pAMgr->get_keepcase(), rv->alen);
  ------------------
  |  |   99|  29.9k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 38, False: 23]
  |  |  ------------------
  ------------------
  441|  29.8k|}
_ZN12HunspellImpl10insert_sugERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_:
  444|  15.1k|void HunspellImpl::insert_sug(std::vector<std::string>& slst, const std::string& word) {
  445|  15.1k|  slst.insert(slst.begin(), word);
  446|  15.1k|}
_ZN12HunspellImpl5spellERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorIS6_NS4_IS6_EEEEPiPS6_NS0_6chrono10time_pointINSF_12steady_clockENSF_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
  450|  13.7M|                         std::chrono::steady_clock::time_point suggest_start) {
  451|       |  // something very broken if spell ends up calling itself with the same word
  452|  13.7M|  if (std::find(candidate_stack.begin(), candidate_stack.end(), word) != candidate_stack.end())
  ------------------
  |  Branch (452:7): [True: 0, False: 13.7M]
  ------------------
  453|      0|    return false;
  454|       |
  455|  13.7M|  if (candidate_stack.size() >= MAXBREAKDEPTH)
  ------------------
  |  |   87|  13.7M|#define MAXBREAKDEPTH 10
  ------------------
  |  Branch (455:7): [True: 0, False: 13.7M]
  ------------------
  456|      0|    return false;
  457|       |
  458|  13.7M|  if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  13.7M|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (458:7): [True: 0, False: 13.7M]
  ------------------
  459|      0|    return false;
  460|       |
  461|  13.7M|  candidate_stack.push_back(word);
  462|  13.7M|  bool r = spell_internal(word, candidate_stack, info, root, suggest_start);
  463|  13.7M|  candidate_stack.pop_back();
  464|       |
  465|  13.7M|  if (r && root) {
  ------------------
  |  Branch (465:7): [True: 2.94M, False: 10.8M]
  |  Branch (465:12): [True: 0, False: 2.94M]
  ------------------
  466|       |    // output conversion
  467|      0|    RepList* rl = (pAMgr) ? pAMgr->get_oconvtable() : nullptr;
  ------------------
  |  Branch (467:19): [True: 0, False: 0]
  ------------------
  468|      0|    if (rl) {
  ------------------
  |  Branch (468:9): [True: 0, False: 0]
  ------------------
  469|      0|      std::string wspace;
  470|      0|      if (rl->conv(*root, wspace)) {
  ------------------
  |  Branch (470:11): [True: 0, False: 0]
  ------------------
  471|      0|        *root = std::move(wspace);
  472|      0|      }
  473|      0|    }
  474|      0|  }
  475|  13.7M|  return r;
  476|  13.7M|}
_ZN12HunspellImpl14spell_internalERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorIS6_NS4_IS6_EEEEPiPS6_NS0_6chrono10time_pointINSF_12steady_clockENSF_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
  480|  13.7M|                                  std::chrono::steady_clock::time_point suggest_start) {
  481|  13.7M|  struct hentry* rv = nullptr;
  482|       |
  483|  13.7M|  int info2 = 0;
  484|  13.7M|  if (!info)
  ------------------
  |  Branch (484:7): [True: 13.7M, False: 89]
  ------------------
  485|  13.7M|    info = &info2;
  486|     89|  else
  487|     89|    *info = 0;
  488|       |
  489|       |  // Hunspell supports XML input of the simplified API (see manual)
  490|  13.7M|  if (word == SPELL_XML)
  ------------------
  |  |   80|  13.7M|#define SPELL_XML "<?xml?>"
  ------------------
  |  Branch (490:7): [True: 461k, False: 13.3M]
  ------------------
  491|   461k|    return true;
  492|  13.3M|  if (utf8) {
  ------------------
  |  Branch (492:7): [True: 2.86M, False: 10.4M]
  ------------------
  493|  2.86M|    if (word.size() >= MAXWORDUTF8LEN)
  ------------------
  |  |   86|  2.86M|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|  2.86M|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
  |  Branch (493:9): [True: 3.78k, False: 2.85M]
  ------------------
  494|  3.78k|      return false;
  495|  10.4M|  } else {
  496|  10.4M|    if (word.size() >= MAXWORDLEN)
  ------------------
  |  |   90|  10.4M|#define MAXWORDLEN 100
  ------------------
  |  Branch (496:9): [True: 6.36k, False: 10.4M]
  ------------------
  497|  6.36k|      return false;
  498|  10.4M|  }
  499|  13.3M|  int captype = NOCAP;
  ------------------
  |  |   92|  13.3M|#define NOCAP 0
  ------------------
  500|  13.3M|  size_t abbv = 0;
  501|  13.3M|  size_t wl = 0;
  502|       |
  503|  13.3M|  std::string scw;
  504|  13.3M|  std::vector<w_char> sunicw;
  505|       |
  506|       |  // input conversion
  507|  13.3M|  RepList* rl = pAMgr ? pAMgr->get_iconvtable() : nullptr;
  ------------------
  |  Branch (507:17): [True: 13.3M, False: 0]
  ------------------
  508|  13.3M|  {
  509|  13.3M|    std::string wspace;
  510|       |
  511|  13.3M|    bool convstatus = rl ? rl->conv(word, wspace) : false;
  ------------------
  |  Branch (511:23): [True: 414k, False: 12.8M]
  ------------------
  512|  13.3M|    if (convstatus) {
  ------------------
  |  Branch (512:9): [True: 0, False: 13.3M]
  ------------------
  513|       |      // the input conversion can grow the word without limit, so hold the
  514|       |      // converted word to the same maximum length as the raw word
  515|      0|      if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   86|      0|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
                    if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   90|      0|#define MAXWORDLEN 100
  ------------------
  |  Branch (515:11): [True: 0, False: 0]
  |  Branch (515:11): [True: 0, False: 0]
  ------------------
  516|      0|        return false;
  517|      0|      wl = cleanword2(scw, sunicw, wspace, &captype, &abbv);
  518|      0|    } else
  519|  13.3M|      wl = cleanword2(scw, sunicw, word, &captype, &abbv);
  520|  13.3M|  }
  521|       |
  522|  13.3M|#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
  523|  13.3M|    if (wl > 32768)
  ------------------
  |  Branch (523:9): [True: 0, False: 13.3M]
  ------------------
  524|      0|      return false;
  525|  13.3M|#endif
  526|       |
  527|       |#ifdef MOZILLA_CLIENT
  528|       |  // accept the abbreviated words without dots
  529|       |  // workaround for the incomplete tokenization of Mozilla
  530|       |  abbv = 1;
  531|       |#endif
  532|       |
  533|  13.3M|  if (wl == 0 || m_HMgrs.empty())
  ------------------
  |  Branch (533:7): [True: 479k, False: 12.8M]
  |  Branch (533:18): [True: 0, False: 12.8M]
  ------------------
  534|   479k|    return true;
  535|  12.8M|  if (root)
  ------------------
  |  Branch (535:7): [True: 0, False: 12.8M]
  ------------------
  536|      0|    root->clear();
  537|       |
  538|       |  // allow numbers with dots, dashes and commas (but forbid double separators:
  539|       |  // "..", "--" etc.). Besides the ASCII digits, accept the Arabic-Indic and
  540|       |  // Extended Arabic-Indic (Persian) digit ranges so those numbers are passed
  541|       |  // over the same way ASCII numbers are.
  542|  12.8M|  enum { NBEGIN, NNUM, NSEP };
  543|  12.8M|  int nstate = NBEGIN;
  544|  12.8M|  size_t i;
  545|  12.8M|  size_t n = utf8 ? sunicw.size() : wl;
  ------------------
  |  Branch (545:14): [True: 2.75M, False: 10.0M]
  ------------------
  546|       |
  547|  21.7M|  for (i = 0; (i < n); i++) {
  ------------------
  |  Branch (547:15): [True: 20.9M, False: 816k]
  ------------------
  548|  20.9M|    unsigned short c = utf8 ? static_cast<unsigned short>(sunicw[i]) : static_cast<unsigned char>(scw[i]);
  ------------------
  |  Branch (548:24): [True: 5.08M, False: 15.8M]
  ------------------
  549|  20.9M|    if ((c >= '0' && c <= '9') || (c >= 0x0660 && c <= 0x0669) ||  // Arabic-Indic digits
  ------------------
  |  Branch (549:10): [True: 14.4M, False: 6.45M]
  |  Branch (549:22): [True: 8.41M, False: 6.06M]
  |  Branch (549:36): [True: 283k, False: 12.2M]
  |  Branch (549:51): [True: 0, False: 283k]
  ------------------
  550|  12.5M|        (c >= 0x06F0 && c <= 0x06F9)) {                            // Extended Arabic-Indic (Persian) digits
  ------------------
  |  Branch (550:10): [True: 283k, False: 12.2M]
  |  Branch (550:25): [True: 0, False: 283k]
  ------------------
  551|  8.41M|      nstate = NNUM;
  552|  12.5M|    } else if ((c == ',') || (c == '.') || (c == '-')) {
  ------------------
  |  Branch (552:16): [True: 65.5k, False: 12.4M]
  |  Branch (552:30): [True: 944k, False: 11.5M]
  |  Branch (552:44): [True: 2.18M, False: 9.33M]
  ------------------
  553|  3.19M|      if ((nstate == NSEP) || (i == 0))
  ------------------
  |  Branch (553:11): [True: 141k, False: 3.05M]
  |  Branch (553:31): [True: 2.54M, False: 515k]
  ------------------
  554|  2.68M|        break;
  555|   515k|      nstate = NSEP;
  556|   515k|    } else
  557|  9.33M|      break;
  558|  20.9M|  }
  559|  12.8M|  if ((i == n) && (nstate == NNUM))
  ------------------
  |  Branch (559:7): [True: 816k, False: 12.0M]
  |  Branch (559:19): [True: 628k, False: 188k]
  ------------------
  560|   628k|    return true;
  561|       |
  562|  12.2M|  switch (captype) {
  ------------------
  |  Branch (562:11): [True: 12.2M, False: 0]
  ------------------
  563|   905k|    case HUHCAP:
  ------------------
  |  |   95|   905k|#define HUHCAP 3
  ------------------
  |  Branch (563:5): [True: 905k, False: 11.2M]
  ------------------
  564|       |    /* FALLTHROUGH */
  565|  1.14M|    case HUHINITCAP:
  ------------------
  |  |   96|  1.14M|#define HUHINITCAP 4
  ------------------
  |  Branch (565:5): [True: 236k, False: 11.9M]
  ------------------
  566|  1.14M|      *info |= SPELL_ORIGCAP;
  ------------------
  |  |   83|  1.14M|#define SPELL_ORIGCAP (1 << 5)
  ------------------
  567|       |    /* FALLTHROUGH */
  568|  11.3M|    case NOCAP:
  ------------------
  |  |   92|  11.3M|#define NOCAP 0
  ------------------
  |  Branch (568:5): [True: 10.1M, False: 2.04M]
  ------------------
  569|  11.3M|      rv = checkword(scw, info, root, suggest_start);
  570|  11.3M|      if ((abbv) && !(rv)) {
  ------------------
  |  Branch (570:11): [True: 1.56M, False: 9.73M]
  |  Branch (570:21): [True: 1.53M, False: 31.5k]
  ------------------
  571|  1.53M|        std::string u8buffer(scw);
  572|  1.53M|        u8buffer.push_back('.');
  573|  1.53M|        rv = checkword(u8buffer, info, root, suggest_start);
  574|  1.53M|      }
  575|       |      // A stem with an inner capital, capitalised at the start of a sentence
  576|       |      // (uLinda written ULinda), is found by lowering only the first letter.
  577|  11.3M|      if (!rv && captype == HUHINITCAP) {
  ------------------
  |  |   96|  11.2M|#define HUHINITCAP 4
  ------------------
  |  Branch (577:11): [True: 11.2M, False: 89.1k]
  |  Branch (577:18): [True: 233k, False: 10.9M]
  ------------------
  578|   233k|        std::string u8buffer(scw);
  579|   233k|        std::vector<w_char> u16buffer(sunicw);
  580|   233k|        mkinitsmall2(u8buffer, u16buffer);
  581|   233k|        rv = checkword(u8buffer, info, root, suggest_start);
  582|   233k|        if (rv && is_keepcase(rv))
  ------------------
  |  Branch (582:13): [True: 5, False: 233k]
  |  Branch (582:19): [True: 0, False: 5]
  ------------------
  583|      0|          rv = nullptr;
  584|   233k|      }
  585|  11.3M|      break;
  586|   323k|    case ALLCAP: {
  ------------------
  |  |   94|   323k|#define ALLCAP 2
  ------------------
  |  Branch (586:5): [True: 323k, False: 11.8M]
  ------------------
  587|   323k|      *info |= SPELL_ORIGCAP;
  ------------------
  |  |   83|   323k|#define SPELL_ORIGCAP (1 << 5)
  ------------------
  588|   323k|      rv = checkword(scw, info, root, suggest_start);
  589|   323k|      if (rv)
  ------------------
  |  Branch (589:11): [True: 151, False: 322k]
  ------------------
  590|    151|        break;
  591|   322k|      if (abbv) {
  ------------------
  |  Branch (591:11): [True: 84.7k, False: 238k]
  ------------------
  592|  84.7k|        std::string u8buffer(scw);
  593|  84.7k|        u8buffer.push_back('.');
  594|  84.7k|        rv = checkword(u8buffer, info, root, suggest_start);
  595|  84.7k|        if (rv)
  ------------------
  |  Branch (595:13): [True: 0, False: 84.7k]
  ------------------
  596|      0|          break;
  597|  84.7k|      }
  598|       |      // Spec. prefix handling for Catalan, French, Italian:
  599|       |      // prefixes separated by apostrophe (SANT'ELIA -> Sant'+Elia).
  600|   322k|      size_t apos = pAMgr ? scw.find('\'') : std::string::npos;
  ------------------
  |  Branch (600:21): [True: 322k, False: 0]
  ------------------
  601|   322k|      if (apos != std::string::npos) {
  ------------------
  |  Branch (601:11): [True: 102k, False: 220k]
  ------------------
  602|   102k|        mkallsmall2(scw, sunicw);
  603|       |        //conversion may result in string with different len to pre-mkallsmall2
  604|       |        //so re-scan
  605|   102k|        if (apos != std::string::npos && apos < scw.size() - 1) {
  ------------------
  |  Branch (605:13): [True: 102k, False: 0]
  |  Branch (605:42): [True: 96.9k, False: 5.86k]
  ------------------
  606|  96.9k|          std::string part1 = scw.substr(0, apos + 1), part2 = scw.substr(apos + 1);
  607|  96.9k|          if (utf8) {
  ------------------
  |  Branch (607:15): [True: 26.0k, False: 70.8k]
  ------------------
  608|  26.0k|            std::vector<w_char> part1u, part2u;
  609|  26.0k|            u8_u16(part1u, part1);
  610|  26.0k|            u8_u16(part2u, part2);
  611|  26.0k|            mkinitcap2(part2, part2u);
  612|  26.0k|            scw = part1 + part2;
  613|  26.0k|            sunicw = std::move(part1u);
  614|  26.0k|            sunicw.insert(sunicw.end(), part2u.begin(), part2u.end());
  615|  26.0k|            rv = checkword(scw, info, root, suggest_start);
  616|  26.0k|            if (rv)
  ------------------
  |  Branch (616:17): [True: 0, False: 26.0k]
  ------------------
  617|      0|              break;
  618|  70.8k|          } else {
  619|  70.8k|            mkinitcap2(part2, sunicw);
  620|  70.8k|            scw = part1 + part2;
  621|  70.8k|            rv = checkword(scw, info, root, suggest_start);
  622|  70.8k|            if (rv)
  ------------------
  |  Branch (622:17): [True: 2, False: 70.8k]
  ------------------
  623|      2|              break;
  624|  70.8k|          }
  625|  96.9k|          mkinitcap2(scw, sunicw);
  626|  96.9k|          rv = checkword(scw, info, root, suggest_start);
  627|  96.9k|          if (rv)
  ------------------
  |  Branch (627:15): [True: 0, False: 96.9k]
  ------------------
  628|      0|            break;
  629|  96.9k|        }
  630|   102k|      }
  631|   322k|      if (pAMgr && pAMgr->get_checksharps() && scw.find("SS") != std::string::npos) {
  ------------------
  |  Branch (631:11): [True: 322k, False: 0]
  |  Branch (631:20): [True: 0, False: 322k]
  |  Branch (631:48): [True: 0, False: 0]
  ------------------
  632|       |
  633|      0|        mkallsmall2(scw, sunicw);
  634|      0|        std::string u8buffer(scw);
  635|      0|        rv = spellsharps(u8buffer, 0, 0, 0, info, root, suggest_start);
  636|      0|        if (!rv) {
  ------------------
  |  Branch (636:13): [True: 0, False: 0]
  ------------------
  637|      0|          mkinitcap2(scw, sunicw);
  638|      0|          rv = spellsharps(scw, 0, 0, 0, info, root, suggest_start);
  639|      0|        }
  640|      0|        if ((abbv) && !(rv)) {
  ------------------
  |  Branch (640:13): [True: 0, False: 0]
  |  Branch (640:23): [True: 0, False: 0]
  ------------------
  641|      0|          u8buffer.push_back('.');
  642|      0|          rv = spellsharps(u8buffer, 0, 0, 0, info, root, suggest_start);
  643|      0|          if (!rv) {
  ------------------
  |  Branch (643:15): [True: 0, False: 0]
  ------------------
  644|      0|            u8buffer = std::string(scw);
  645|      0|            u8buffer.push_back('.');
  646|      0|            rv = spellsharps(u8buffer, 0, 0, 0, info, root, suggest_start);
  647|      0|          }
  648|      0|        }
  649|      0|        if (rv)
  ------------------
  |  Branch (649:13): [True: 0, False: 0]
  ------------------
  650|      0|          break;
  651|      0|      }
  652|   322k|    }
  653|       |      /* FALLTHROUGH */
  654|   901k|    case INITCAP: {
  ------------------
  |  |   93|   901k|#define INITCAP 1
  ------------------
  |  Branch (654:5): [True: 578k, False: 11.6M]
  ------------------
  655|       |      // handle special capitalization of dotted I
  656|   901k|      bool Idot = (utf8 && (unsigned char) scw[0] == 0xc4 && (unsigned char) scw[1] == 0xb0);
  ------------------
  |  Branch (656:20): [True: 173k, False: 727k]
  |  Branch (656:28): [True: 0, False: 173k]
  |  Branch (656:62): [True: 0, False: 0]
  ------------------
  657|   901k|      *info |= SPELL_ORIGCAP;
  ------------------
  |  |   83|   901k|#define SPELL_ORIGCAP (1 << 5)
  ------------------
  658|   901k|      if (captype == ALLCAP) {
  ------------------
  |  |   94|   901k|#define ALLCAP 2
  ------------------
  |  Branch (658:11): [True: 322k, False: 578k]
  ------------------
  659|   322k|          mkallsmall2(scw, sunicw);
  660|   322k|          mkinitcap2(scw, sunicw);
  661|   322k|          if (Idot)
  ------------------
  |  Branch (661:15): [True: 0, False: 322k]
  ------------------
  662|      0|             scw.replace(0, 1, "\xc4\xb0");
  663|   322k|      }
  664|   901k|      if (captype == INITCAP)
  ------------------
  |  |   93|   901k|#define INITCAP 1
  ------------------
  |  Branch (664:11): [True: 578k, False: 322k]
  ------------------
  665|   578k|        *info |= SPELL_INITCAP;
  ------------------
  |  |   82|   578k|#define SPELL_INITCAP (1 << 4)
  ------------------
  666|   901k|      rv = checkword(scw, info, root, suggest_start);
  667|   901k|      if (captype == INITCAP)
  ------------------
  |  |   93|   901k|#define INITCAP 1
  ------------------
  |  Branch (667:11): [True: 578k, False: 322k]
  ------------------
  668|   578k|        *info &= ~SPELL_INITCAP;
  ------------------
  |  |   82|   578k|#define SPELL_INITCAP (1 << 4)
  ------------------
  669|       |      // forbid bad capitalization
  670|       |      // (for example, ijs -> Ijs instead of IJs in Dutch)
  671|       |      // use explicit forms in dic: Ijs/F (F = FORBIDDENWORD flag)
  672|   901k|      if (*info & SPELL_FORBIDDEN) {
  ------------------
  |  |   79|   901k|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  |  Branch (672:11): [True: 0, False: 901k]
  ------------------
  673|      0|        rv = nullptr;
  674|      0|        break;
  675|      0|      }
  676|   901k|      if (rv && is_keepcase(rv) && (captype == ALLCAP))
  ------------------
  |  |   94|     13|#define ALLCAP 2
  ------------------
  |  Branch (676:11): [True: 15.7k, False: 885k]
  |  Branch (676:17): [True: 13, False: 15.7k]
  |  Branch (676:36): [True: 1, False: 12]
  ------------------
  677|      1|        rv = nullptr;
  678|   901k|      if (rv || (Idot && langnum != LANG_az && langnum != LANG_tr && langnum != LANG_crh))
  ------------------
  |  Branch (678:11): [True: 15.7k, False: 885k]
  |  Branch (678:18): [True: 0, False: 885k]
  |  Branch (678:26): [True: 0, False: 0]
  |  Branch (678:48): [True: 0, False: 0]
  |  Branch (678:70): [True: 0, False: 0]
  ------------------
  679|  15.7k|        break;
  680|       |
  681|   885k|      mkallsmall2(scw, sunicw);
  682|   885k|      std::string u8buffer(scw);
  683|   885k|      mkinitcap2(scw, sunicw);
  684|       |
  685|   885k|      rv = checkword(u8buffer, info, root, suggest_start);
  686|   885k|      if (abbv && !rv) {
  ------------------
  |  Branch (686:11): [True: 217k, False: 668k]
  |  Branch (686:19): [True: 213k, False: 4.17k]
  ------------------
  687|   213k|        u8buffer.push_back('.');
  688|   213k|        rv = checkword(u8buffer, info, root, suggest_start);
  689|   213k|        if (!rv) {
  ------------------
  |  Branch (689:13): [True: 213k, False: 0]
  ------------------
  690|   213k|          u8buffer = scw;
  691|   213k|          u8buffer.push_back('.');
  692|   213k|          if (captype == INITCAP)
  ------------------
  |  |   93|   213k|#define INITCAP 1
  ------------------
  |  Branch (692:15): [True: 128k, False: 84.7k]
  ------------------
  693|   128k|            *info |= SPELL_INITCAP;
  ------------------
  |  |   82|   128k|#define SPELL_INITCAP (1 << 4)
  ------------------
  694|   213k|          rv = checkword(u8buffer, info, root, suggest_start);
  695|   213k|          if (captype == INITCAP)
  ------------------
  |  |   93|   213k|#define INITCAP 1
  ------------------
  |  Branch (695:15): [True: 128k, False: 84.7k]
  ------------------
  696|   128k|            *info &= ~SPELL_INITCAP;
  ------------------
  |  |   82|   128k|#define SPELL_INITCAP (1 << 4)
  ------------------
  697|   213k|          if (rv && is_keepcase(rv) && (captype == ALLCAP))
  ------------------
  |  |   94|     22|#define ALLCAP 2
  ------------------
  |  Branch (697:15): [True: 22, False: 213k]
  |  Branch (697:21): [True: 22, False: 0]
  |  Branch (697:40): [True: 7, False: 15]
  ------------------
  698|      7|            rv = nullptr;
  699|   213k|          break;
  700|   213k|        }
  701|   213k|      }
  702|   672k|      if (rv && is_keepcase(rv) &&
  ------------------
  |  Branch (702:11): [True: 14.0k, False: 658k]
  |  Branch (702:17): [True: 3, False: 14.0k]
  ------------------
  703|      3|          ((captype == ALLCAP) ||
  ------------------
  |  |   94|      3|#define ALLCAP 2
  ------------------
  |  Branch (703:12): [True: 0, False: 3]
  ------------------
  704|       |           // if CHECKSHARPS: KEEPCASE words with \xDF  are allowed
  705|       |           // in INITCAP form, too.
  706|      3|           !(pAMgr->get_checksharps() &&
  ------------------
  |  Branch (706:14): [True: 0, False: 3]
  ------------------
  707|      0|             ((utf8 && u8buffer.find("\xC3\x9F") != std::string::npos) ||
  ------------------
  |  Branch (707:16): [True: 0, False: 0]
  |  Branch (707:24): [True: 0, False: 0]
  ------------------
  708|      0|              (!utf8 && u8buffer.find('\xDF') != std::string::npos)))))
  ------------------
  |  Branch (708:16): [True: 0, False: 0]
  |  Branch (708:25): [True: 0, False: 0]
  ------------------
  709|      3|        rv = nullptr;
  710|   672k|      break;
  711|   885k|    }
  712|  12.2M|  }
  713|       |
  714|  12.2M|  if (rv) {
  ------------------
  |  Branch (714:7): [True: 119k, False: 12.0M]
  ------------------
  715|   119k|    if (pAMgr && pAMgr->get_warn() && rv->astr &&
  ------------------
  |  Branch (715:9): [True: 119k, False: 0]
  |  Branch (715:9): [True: 6, False: 119k]
  |  Branch (715:18): [True: 10.4k, False: 108k]
  |  Branch (715:39): [True: 29, False: 10.4k]
  ------------------
  716|     29|        TESTAFF(rv->astr, pAMgr->get_warn(), rv->alen)) {
  ------------------
  |  |   99|     29|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 6, False: 23]
  |  |  ------------------
  ------------------
  717|      6|      *info |= SPELL_WARN;
  ------------------
  |  |   84|      6|#define SPELL_WARN (1 << 6)
  ------------------
  718|      6|      if (pAMgr->get_forbidwarn())
  ------------------
  |  Branch (718:11): [True: 0, False: 6]
  ------------------
  719|      0|        return false;
  720|      6|      return true;
  721|      6|    }
  722|   119k|    return true;
  723|   119k|  }
  724|       |
  725|       |  // recursive breaking at break points
  726|  12.0M|  if (!wordbreak.empty() && !(*info & SPELL_FORBIDDEN)) {
  ------------------
  |  |   79|  12.0M|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  |  Branch (726:7): [True: 12.0M, False: 0]
  |  Branch (726:29): [True: 12.0M, False: 0]
  ------------------
  727|       |
  728|  12.0M|    int nbr = 0;
  729|  12.0M|    wl = scw.size();
  730|       |
  731|       |    // calculate break points for recursion limit
  732|  36.1M|    for (auto& j : wordbreak) {
  ------------------
  |  Branch (732:18): [True: 36.1M, False: 12.0M]
  ------------------
  733|  36.1M|      size_t pos = 0;
  734|  49.1M|      while ((pos = scw.find(j, pos)) != std::string::npos) {
  ------------------
  |  Branch (734:14): [True: 12.9M, False: 36.1M]
  ------------------
  735|  12.9M|        ++nbr;
  736|  12.9M|        pos += j.size();
  737|  12.9M|      }
  738|  36.1M|    }
  739|  12.0M|    if (nbr >= MAXBREAKDEPTH)
  ------------------
  |  |   87|  12.0M|#define MAXBREAKDEPTH 10
  ------------------
  |  Branch (739:9): [True: 5.67k, False: 12.0M]
  ------------------
  740|  5.67k|      return false;
  741|       |
  742|       |    // check boundary patterns (^begin and end$)
  743|  36.0M|    for (auto& j : wordbreak) {
  ------------------
  |  Branch (743:18): [True: 36.0M, False: 10.8M]
  ------------------
  744|  36.0M|      size_t plen = j.size();
  745|  36.0M|      if (plen == 1 || plen > wl)
  ------------------
  |  Branch (745:11): [True: 12.0M, False: 23.9M]
  |  Branch (745:24): [True: 2.81M, False: 21.1M]
  ------------------
  746|  14.8M|        continue;
  747|       |
  748|  21.1M|      if (j[0] == '^' && scw.compare(0, plen - 1, j, 1, plen - 1) == 0 &&
  ------------------
  |  Branch (748:11): [True: 10.6M, False: 10.5M]
  |  Branch (748:11): [True: 96.9k, False: 21.0M]
  |  Branch (748:26): [True: 920k, False: 9.70M]
  ------------------
  749|   920k|          spell(scw.substr(plen - 1), candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (749:11): [True: 96.9k, False: 823k]
  ------------------
  750|  96.9k|        *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|  96.9k|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  751|  96.9k|        return true;
  752|  96.9k|      }
  753|       |
  754|  21.0M|      if (j[plen - 1] == '$' &&
  ------------------
  |  Branch (754:11): [True: 10.5M, False: 10.5M]
  ------------------
  755|  10.5M|          scw.compare(wl - plen + 1, plen - 1, j, 0, plen - 1) == 0) {
  ------------------
  |  Branch (755:11): [True: 3.93M, False: 6.59M]
  ------------------
  756|  3.93M|        std::string suffix(scw.substr(wl - plen + 1));
  757|  3.93M|        scw.resize(wl - plen + 1);
  758|  3.93M|        if (spell(scw, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (758:13): [True: 1.10M, False: 2.82M]
  ------------------
  759|  1.10M|          *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|  1.10M|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  760|  1.10M|          return true;
  761|  1.10M|        }
  762|  2.82M|        scw.append(suffix);
  763|  2.82M|      }
  764|  21.0M|    }
  765|       |
  766|       |    // other patterns
  767|  32.4M|    for (auto& j : wordbreak) {
  ------------------
  |  Branch (767:18): [True: 32.4M, False: 10.8M]
  ------------------
  768|  32.4M|      size_t plen = j.size();
  769|  32.4M|      size_t found = scw.find(j);
  770|  32.4M|      if ((found > 0) && (found < wl - plen)) {
  ------------------
  |  Branch (770:11): [True: 30.9M, False: 1.55M]
  |  Branch (770:26): [True: 3.56M, False: 27.3M]
  ------------------
  771|  3.56M|        size_t found2 = scw.find(j, found + 1);
  772|       |        // try to break at the second occurance
  773|       |        // to recognize dictionary words with wordbreak
  774|  3.56M|        if (found2 > 0 && (found2 < wl - plen))
  ------------------
  |  Branch (774:13): [True: 3.56M, False: 0]
  |  Branch (774:27): [True: 1.38M, False: 2.17M]
  ------------------
  775|  1.38M|            found = found2;
  776|  3.56M|        std::string substring(scw.substr(found + plen));
  777|  3.56M|        if (!spell(substring, candidate_stack, nullptr, nullptr, suggest_start))
  ------------------
  |  Branch (777:13): [True: 2.64M, False: 915k]
  ------------------
  778|  2.64M|          continue;
  779|   915k|        std::string suffix(scw.substr(found));
  780|   915k|        scw.resize(found);
  781|       |        // examine 2 sides of the break point
  782|   915k|        if (spell(scw, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (782:13): [True: 48.7k, False: 866k]
  ------------------
  783|  48.7k|          *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|  48.7k|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  784|  48.7k|          return true;
  785|  48.7k|        }
  786|   866k|        scw.append(suffix);
  787|       |
  788|       |        // LANG_hu: spec. dash rule
  789|   866k|        if (langnum == LANG_hu && j == "-") {
  ------------------
  |  Branch (789:13): [True: 198, False: 866k]
  |  Branch (789:35): [True: 198, False: 0]
  ------------------
  790|    198|          suffix = scw.substr(found + 1);
  791|    198|          scw.resize(found + 1);
  792|    198|          if (spell(scw, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (792:15): [True: 0, False: 198]
  ------------------
  793|      0|            *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|      0|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  794|      0|            return true;  // check the first part with dash
  795|      0|          }
  796|    198|          scw.append(suffix);
  797|    198|        }
  798|       |        // end of LANG specific region
  799|   866k|      }
  800|  32.4M|    }
  801|       |
  802|       |    // other patterns (break at first break point)
  803|  32.3M|    for (auto& j : wordbreak) {
  ------------------
  |  Branch (803:18): [True: 32.3M, False: 10.8M]
  ------------------
  804|  32.3M|      size_t plen = j.size(), found = scw.find(j);
  805|  32.3M|      if ((found > 0) && (found < wl - plen)) {
  ------------------
  |  Branch (805:11): [True: 30.8M, False: 1.55M]
  |  Branch (805:26): [True: 3.50M, False: 27.3M]
  ------------------
  806|  3.50M|        if (!spell(scw.substr(found + plen), candidate_stack, nullptr, nullptr, suggest_start))
  ------------------
  |  Branch (806:13): [True: 2.79M, False: 709k]
  ------------------
  807|  2.79M|          continue;
  808|   709k|        std::string suffix(scw.substr(found));
  809|   709k|        scw.resize(found);
  810|       |        // examine 2 sides of the break point
  811|   709k|        if (spell(scw, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (811:13): [True: 4.51k, False: 704k]
  ------------------
  812|  4.51k|          *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|  4.51k|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  813|  4.51k|          return true;
  814|  4.51k|        }
  815|   704k|        scw.append(suffix);
  816|       |
  817|       |        // LANG_hu: spec. dash rule
  818|   704k|        if (langnum == LANG_hu && j == "-") {
  ------------------
  |  Branch (818:13): [True: 103, False: 704k]
  |  Branch (818:35): [True: 103, False: 0]
  ------------------
  819|    103|          suffix = scw.substr(found + 1);
  820|    103|          scw.resize(found + 1);
  821|    103|          if (spell(scw, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (821:15): [True: 0, False: 103]
  ------------------
  822|      0|            *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|      0|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  823|      0|            return true;  // check the first part with dash
  824|      0|          }
  825|    103|          scw.append(suffix);
  826|    103|        }
  827|       |        // end of LANG specific region
  828|   704k|      }
  829|  32.3M|    }
  830|  10.8M|  }
  831|       |
  832|  10.8M|  return false;
  833|  12.0M|}
_ZN12HunspellImpl9checkwordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPiPS6_NS0_6chrono10time_pointINSB_12steady_clockENSB_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
  836|  15.8M|                                       std::chrono::steady_clock::time_point suggest_start) {
  837|       |  // check overall suggest time limit
  838|  15.8M|  if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  15.8M|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (838:7): [True: 0, False: 15.8M]
  ------------------
  839|      0|    return nullptr;
  840|       |
  841|  15.8M|  std::string word;
  842|       |
  843|       |  // remove IGNORE characters from the string
  844|  15.8M|  clean_ignore(word, w);
  845|       |
  846|  15.8M|  if (word.empty())
  ------------------
  |  Branch (846:7): [True: 133, False: 15.8M]
  ------------------
  847|    133|    return nullptr;
  848|       |
  849|       |  // word reversing wrapper for complex prefixes
  850|  15.8M|  if (complexprefixes) {
  ------------------
  |  Branch (850:7): [True: 987k, False: 14.9M]
  ------------------
  851|   987k|    if (utf8)
  ------------------
  |  Branch (851:9): [True: 0, False: 987k]
  ------------------
  852|      0|      reverseword_utf(word);
  853|   987k|    else
  854|   987k|      reverseword(word);
  855|   987k|  }
  856|       |
  857|  15.8M|  int len = word.size();
  858|       |
  859|       |  // look word in hash table
  860|  15.8M|  struct hentry* he = nullptr;
  861|  31.7M|  for (size_t i = 0; (i < m_HMgrs.size()) && !he; ++i) {
  ------------------
  |  Branch (861:22): [True: 15.8M, False: 15.8M]
  |  Branch (861:46): [True: 15.8M, False: 0]
  ------------------
  862|  15.8M|    he = m_HMgrs[i]->lookup(word.c_str(), word.size());
  863|       |
  864|       |    // check forbidden and onlyincompound words
  865|  15.8M|    if ((he) && (he->astr) && (pAMgr) &&
  ------------------
  |  Branch (865:9): [True: 119k, False: 15.7M]
  |  Branch (865:9): [True: 0, False: 15.8M]
  |  Branch (865:17): [True: 658, False: 118k]
  |  Branch (865:31): [True: 658, False: 0]
  ------------------
  866|    658|        TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) {
  ------------------
  |  |   99|    658|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 658]
  |  |  ------------------
  ------------------
  867|      0|      if (info)
  ------------------
  |  Branch (867:11): [True: 0, False: 0]
  ------------------
  868|      0|        *info |= SPELL_FORBIDDEN;
  ------------------
  |  |   79|      0|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  869|       |      // LANG_hu section: set dash information for suggestions
  870|      0|      if (langnum == LANG_hu) {
  ------------------
  |  Branch (870:11): [True: 0, False: 0]
  ------------------
  871|      0|        if (pAMgr->get_compoundflag() &&
  ------------------
  |  Branch (871:13): [True: 0, False: 0]
  |  Branch (871:13): [True: 0, False: 0]
  ------------------
  872|      0|            TESTAFF(he->astr, pAMgr->get_compoundflag(), he->alen)) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  873|      0|          if (info)
  ------------------
  |  Branch (873:15): [True: 0, False: 0]
  ------------------
  874|      0|            *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|      0|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  875|      0|        }
  876|      0|      }
  877|      0|      return nullptr;
  878|      0|    }
  879|       |
  880|       |    // he = next not needaffix, onlyincompound homonym or onlyupcase word
  881|  15.8M|    while (he && (he->astr) && pAMgr &&
  ------------------
  |  Branch (881:12): [True: 119k, False: 15.7M]
  |  Branch (881:12): [True: 0, False: 15.8M]
  |  Branch (881:18): [True: 658, False: 118k]
  |  Branch (881:32): [True: 658, False: 0]
  ------------------
  882|    658|           ((pAMgr->get_needaffix() &&
  ------------------
  |  Branch (882:14): [True: 35, False: 623]
  ------------------
  883|     35|             TESTAFF(he->astr, pAMgr->get_needaffix(), he->alen)) ||
  ------------------
  |  |   99|     35|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 35]
  |  |  ------------------
  ------------------
  884|    658|            (pAMgr->get_onlyincompound() &&
  ------------------
  |  Branch (884:14): [True: 0, False: 658]
  ------------------
  885|      0|             TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  886|    658|            (info && (*info & SPELL_INITCAP) &&
  ------------------
  |  |   82|    658|#define SPELL_INITCAP (1 << 4)
  ------------------
  |  Branch (886:14): [True: 658, False: 0]
  |  Branch (886:22): [True: 27, False: 631]
  ------------------
  887|     27|             TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen))))
  ------------------
  |  |   99|     27|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 27]
  |  |  ------------------
  ------------------
  888|      0|      he = he->next_homonym;
  889|  15.8M|  }
  890|       |
  891|       |  // check with affixes
  892|  15.8M|  if (!he && pAMgr) {
  ------------------
  |  Branch (892:7): [True: 15.7M, False: 119k]
  |  Branch (892:14): [True: 15.7M, False: 0]
  ------------------
  893|       |    // try stripping off affixes
  894|  15.7M|    AffixScratch scratch;
  895|       |    // For an initial-capital query, make affix_check skip an all-uppercase-only
  896|       |    // stem and keep looking, so a valid mixed-case match behind it is found.
  897|  15.7M|    FLAG avoidflag = (info && (*info & SPELL_INITCAP)) ? ONLYUPCASEFLAG : FLAG_NULL;
  ------------------
  |  |   95|  15.7M|#define FLAG unsigned short
  ------------------
                  FLAG avoidflag = (info && (*info & SPELL_INITCAP)) ? ONLYUPCASEFLAG : FLAG_NULL;
  ------------------
  |  |   82|  15.7M|#define SPELL_INITCAP (1 << 4)
  ------------------
                  FLAG avoidflag = (info && (*info & SPELL_INITCAP)) ? ONLYUPCASEFLAG : FLAG_NULL;
  ------------------
  |  |  128|   692k|#define ONLYUPCASEFLAG 65511
  ------------------
                  FLAG avoidflag = (info && (*info & SPELL_INITCAP)) ? ONLYUPCASEFLAG : FLAG_NULL;
  ------------------
  |  |   96|  30.8M|#define FLAG_NULL 0x00
  ------------------
  |  Branch (897:23): [True: 15.7M, False: 0]
  |  Branch (897:31): [True: 692k, False: 15.0M]
  ------------------
  898|  15.7M|    he = pAMgr->affix_check(word, 0, len, scratch, 0, IN_CPD_NOT, avoidflag);
  ------------------
  |  |   72|  15.7M|#define IN_CPD_NOT 0
  ------------------
  899|       |
  900|       |    // check compound restriction and onlyupcase
  901|  15.7M|    if (he && he->astr &&
  ------------------
  |  Branch (901:9): [True: 0, False: 15.7M]
  |  Branch (901:9): [True: 0, False: 15.7M]
  |  Branch (901:15): [True: 0, False: 0]
  ------------------
  902|      0|        ((pAMgr->get_onlyincompound() &&
  ------------------
  |  Branch (902:11): [True: 0, False: 0]
  ------------------
  903|      0|          TESTAFF(he->astr, pAMgr->get_onlyincompound(), he->alen)) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  904|      0|         (info && (*info & SPELL_INITCAP) &&
  ------------------
  |  |   82|      0|#define SPELL_INITCAP (1 << 4)
  ------------------
  |  Branch (904:11): [True: 0, False: 0]
  |  Branch (904:19): [True: 0, False: 0]
  ------------------
  905|      0|          TESTAFF(he->astr, ONLYUPCASEFLAG, he->alen)))) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  906|      0|      he = nullptr;
  907|      0|    }
  908|       |
  909|  15.7M|    if (he) {
  ------------------
  |  Branch (909:9): [True: 0, False: 15.7M]
  ------------------
  910|      0|      if ((he->astr) && (pAMgr) &&
  ------------------
  |  Branch (910:11): [True: 0, False: 0]
  |  Branch (910:11): [True: 0, False: 0]
  |  Branch (910:25): [True: 0, False: 0]
  ------------------
  911|      0|          TESTAFF(he->astr, pAMgr->get_forbiddenword(), he->alen)) {
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  912|      0|        if (info)
  ------------------
  |  Branch (912:13): [True: 0, False: 0]
  ------------------
  913|      0|          *info |= SPELL_FORBIDDEN;
  ------------------
  |  |   79|      0|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  914|      0|        return nullptr;
  915|      0|      }
  916|      0|      if (root) {
  ------------------
  |  Branch (916:11): [True: 0, False: 0]
  ------------------
  917|      0|        root->assign(he->word);
  918|      0|        if (complexprefixes) {
  ------------------
  |  Branch (918:13): [True: 0, False: 0]
  ------------------
  919|      0|          if (utf8)
  ------------------
  |  Branch (919:15): [True: 0, False: 0]
  ------------------
  920|      0|            reverseword_utf(*root);
  921|      0|          else
  922|      0|            reverseword(*root);
  923|      0|        }
  924|      0|      }
  925|       |      // try check compound word
  926|  15.7M|    } else if (pAMgr->get_compound()) {
  ------------------
  |  Branch (926:16): [True: 3.91M, False: 11.8M]
  ------------------
  927|  3.91M|      struct hentry* rwords[100] = {};  // buffer for COMPOUND pattern checking
  928|       |
  929|       |      // first allow only 2 words in the compound
  930|  3.91M|      int setinfo = SPELL_COMPOUND_2;
  ------------------
  |  |   85|  3.91M|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  931|  3.91M|      if (info)
  ------------------
  |  Branch (931:11): [True: 3.91M, False: 0]
  ------------------
  932|  3.91M|        setinfo |= *info;
  933|  3.91M|      he = pAMgr->compound_check(word, 0, 0, 100, 0, nullptr, (hentry**)&rwords, 0, 0, &setinfo, scratch);
  934|  3.91M|      if (info)
  ------------------
  |  Branch (934:11): [True: 3.91M, False: 0]
  ------------------
  935|  3.91M|        *info = setinfo & ~SPELL_COMPOUND_2;
  ------------------
  |  |   85|  3.91M|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  936|       |      // if not 2-word compoud word, try with 3 or more words
  937|       |      // (only if original info didn't forbid it)
  938|  3.91M|      if (!he && info && !(*info & SPELL_COMPOUND_2)) {
  ------------------
  |  |   85|  3.91M|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  |  Branch (938:11): [True: 3.91M, False: 0]
  |  Branch (938:18): [True: 3.91M, False: 0]
  |  Branch (938:26): [True: 3.91M, False: 0]
  ------------------
  939|  3.91M|        *info &= ~SPELL_COMPOUND_2;
  ------------------
  |  |   85|  3.91M|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  940|  3.91M|        he = pAMgr->compound_check(word, 0, 0, 100, 0, nullptr, (hentry**)&rwords, 0, 0, info, scratch);
  941|       |        // accept the compound with 3 or more words only if it is
  942|       |        // - not a dictionary word with a typo and
  943|       |        // - not two words written separately,
  944|       |        // - or if it's an arbitrary number accepted by compound rules (e.g. 999%)
  945|  3.91M|        if (he && !isdigit(word[0]))
  ------------------
  |  Branch (945:13): [True: 0, False: 3.91M]
  |  Branch (945:19): [True: 0, False: 0]
  ------------------
  946|      0|        {
  947|      0|          std::vector<std::string> slst;
  948|      0|          if (pSMgr->suggest(slst, word, nullptr, /*test_simplesug=*/true))
  ------------------
  |  Branch (948:15): [True: 0, False: 0]
  ------------------
  949|      0|            he = nullptr;
  950|      0|        }
  951|  3.91M|      }
  952|       |
  953|       |      // LANG_hu section: `moving rule' with last dash
  954|  3.91M|      if ((!he) && (langnum == LANG_hu) && (word[len - 1] == '-')) {
  ------------------
  |  Branch (954:11): [True: 3.91M, False: 0]
  |  Branch (954:20): [True: 32.4k, False: 3.88M]
  |  Branch (954:44): [True: 12.1k, False: 20.2k]
  ------------------
  955|  12.1k|        std::string dup(word, 0, len - 1);
  956|  12.1k|        he = pAMgr->compound_check(dup, -5, 0, 100, 0, nullptr, (hentry**)&rwords, 1, 0, info, scratch);
  957|  12.1k|      }
  958|       |      // end of LANG specific region
  959|  3.91M|      if (he) {
  ------------------
  |  Branch (959:11): [True: 0, False: 3.91M]
  ------------------
  960|      0|        if (root) {
  ------------------
  |  Branch (960:13): [True: 0, False: 0]
  ------------------
  961|      0|          root->assign(he->word);
  962|      0|          if (complexprefixes) {
  ------------------
  |  Branch (962:15): [True: 0, False: 0]
  ------------------
  963|      0|            if (utf8)
  ------------------
  |  Branch (963:17): [True: 0, False: 0]
  ------------------
  964|      0|              reverseword_utf(*root);
  965|      0|            else
  966|      0|              reverseword(*root);
  967|      0|          }
  968|      0|        }
  969|      0|        if (info)
  ------------------
  |  Branch (969:13): [True: 0, False: 0]
  ------------------
  970|      0|          *info |= SPELL_COMPOUND;
  ------------------
  |  |   78|      0|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  971|      0|      }
  972|  3.91M|    }
  973|  15.7M|  }
  974|       |
  975|  15.8M|  return he;
  976|  15.8M|}
_ZN12HunspellImpl7suggestERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorIS6_NS4_IS6_EEEENS0_6chrono10time_pointINSD_12steady_clockENSD_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
  984|  89.0k|std::vector<std::string> HunspellImpl::suggest(const std::string& word, std::vector<std::string>& suggest_candidate_stack, std::chrono::steady_clock::time_point suggest_start) {
  985|       |
  986|  89.0k|  if (suggest_candidate_stack.size() > MAX_CANDIDATE_STACK_DEPTH || // apply a fairly arbitrary depth limit
  ------------------
  |  |  979|   178k|#define MAX_CANDIDATE_STACK_DEPTH 512
  ------------------
  |  Branch (986:7): [True: 0, False: 89.0k]
  |  Branch (986:7): [True: 0, False: 89.0k]
  ------------------
  987|       |      // something very broken if suggest ends up calling itself with the same word
  988|  89.0k|      std::find(suggest_candidate_stack.begin(), suggest_candidate_stack.end(), word) != suggest_candidate_stack.end()) {
  ------------------
  |  Branch (988:7): [True: 0, False: 89.0k]
  ------------------
  989|      0|    return { };
  990|      0|  }
  991|       |
  992|  89.0k|  if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  89.0k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (992:7): [True: 0, False: 89.0k]
  ------------------
  993|      0|    return { };
  994|       |
  995|  89.0k|  bool capwords;
  996|  89.0k|  size_t abbv;
  997|  89.0k|  int captype;
  998|  89.0k|  std::vector<std::string> spell_candidate_stack;
  999|  89.0k|  suggest_candidate_stack.push_back(word);
 1000|  89.0k|  std::vector<std::string> slst = suggest_internal(word, spell_candidate_stack, suggest_candidate_stack,
 1001|  89.0k|                                                   capwords, abbv, captype, suggest_start);
 1002|  89.0k|  suggest_candidate_stack.pop_back();
 1003|       |  // word reversing wrapper for complex prefixes
 1004|  89.0k|  if (complexprefixes) {
  ------------------
  |  Branch (1004:7): [True: 4.59k, False: 84.4k]
  ------------------
 1005|  4.59k|    for (auto& j : slst) {
  ------------------
  |  Branch (1005:18): [True: 2.08k, False: 4.59k]
  ------------------
 1006|  2.08k|      if (utf8)
  ------------------
  |  Branch (1006:11): [True: 0, False: 2.08k]
  ------------------
 1007|      0|        reverseword_utf(j);
 1008|  2.08k|      else
 1009|  2.08k|        reverseword(j);
 1010|  2.08k|    }
 1011|  4.59k|  }
 1012|       |
 1013|       |  // capitalize
 1014|  89.0k|  if (capwords) {
  ------------------
  |  Branch (1014:7): [True: 24.5k, False: 64.4k]
  ------------------
 1015|  24.5k|    for (auto& j : slst) {
  ------------------
  |  Branch (1015:18): [True: 16.0k, False: 24.5k]
  ------------------
 1016|  16.0k|      std::string capitalized(j);
 1017|  16.0k|      mkinitcap(capitalized);
 1018|  16.0k|      if (capitalized == word)
  ------------------
  |  Branch (1018:11): [True: 13, False: 16.0k]
  ------------------
 1019|     13|        continue;  // capitalizing would just reproduce the misspelled word
 1020|  16.0k|      j = std::move(capitalized);
 1021|  16.0k|    }
 1022|  24.5k|  }
 1023|       |
 1024|       |  // expand suggestions with dot(s)
 1025|  89.0k|  if (abbv && pAMgr && pAMgr->get_sugswithdots() && word.size() >= abbv) {
  ------------------
  |  Branch (1025:7): [True: 3.67k, False: 85.3k]
  |  Branch (1025:15): [True: 3.67k, False: 0]
  |  Branch (1025:24): [True: 0, False: 3.67k]
  |  Branch (1025:53): [True: 0, False: 0]
  ------------------
 1026|      0|    for (auto& j : slst) {
  ------------------
  |  Branch (1026:18): [True: 0, False: 0]
  ------------------
 1027|      0|      j.append(word.substr(word.size() - abbv));
 1028|      0|    }
 1029|      0|  }
 1030|       |
 1031|       |  // remove bad capitalized and forbidden forms
 1032|  89.0k|  if (pAMgr && (pAMgr->get_keepcase() || pAMgr->get_forbiddenword())) {
  ------------------
  |  Branch (1032:7): [True: 89.0k, False: 0]
  |  Branch (1032:17): [True: 4.63k, False: 84.3k]
  |  Branch (1032:42): [True: 84.3k, False: 0]
  ------------------
 1033|  89.0k|    switch (captype) {
  ------------------
  |  Branch (1033:13): [True: 46.8k, False: 42.1k]
  ------------------
 1034|  11.2k|      case INITCAP:
  ------------------
  |  |   93|  11.2k|#define INITCAP 1
  ------------------
  |  Branch (1034:7): [True: 11.2k, False: 77.7k]
  ------------------
 1035|  20.3k|      case ALLCAP:
  ------------------
  |  |   94|  20.3k|#define ALLCAP 2
  ------------------
  |  Branch (1035:7): [True: 9.14k, False: 79.8k]
  ------------------
 1036|  33.5k|      case HUHCAP:
  ------------------
  |  |   95|  33.5k|#define HUHCAP 3
  ------------------
  |  Branch (1036:7): [True: 13.1k, False: 75.8k]
  ------------------
 1037|  46.8k|      case HUHINITCAP: {
  ------------------
  |  |   96|  46.8k|#define HUHINITCAP 4
  ------------------
  |  Branch (1037:7): [True: 13.3k, False: 75.6k]
  ------------------
 1038|  46.8k|        size_t l = 0;
 1039|  76.3k|        for (size_t j = 0; j < slst.size(); ++j) {
  ------------------
  |  Branch (1039:28): [True: 29.4k, False: 46.8k]
  ------------------
 1040|       |          // A space-containing suggestion can be an "insert a space" split
 1041|       |          // whose parts each spell on their own, so it is good when every
 1042|       |          // part spells even though the whole string does not.
 1043|  29.4k|          bool bad = !spell(slst[j], spell_candidate_stack, nullptr, nullptr, suggest_start);
 1044|  29.4k|          if (bad && slst[j].find(' ') != std::string::npos) {
  ------------------
  |  Branch (1044:15): [True: 15.0k, False: 14.3k]
  |  Branch (1044:22): [True: 6.77k, False: 8.28k]
  ------------------
 1045|  6.77k|            bad = false;
 1046|  14.9k|            for (size_t start = 0; start <= slst[j].size(); ) {
  ------------------
  |  Branch (1046:36): [True: 14.9k, False: 0]
  ------------------
 1047|  14.9k|              size_t sp = slst[j].find(' ', start);
 1048|  14.9k|              size_t end = (sp == std::string::npos) ? slst[j].size() : sp;
  ------------------
  |  Branch (1048:28): [True: 2.11k, False: 12.8k]
  ------------------
 1049|  14.9k|              std::string part = slst[j].substr(start, end - start);
 1050|  14.9k|              if (!part.empty() &&
  ------------------
  |  Branch (1050:19): [True: 9.49k, False: 5.46k]
  ------------------
 1051|  9.49k|                  !spell(part, spell_candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1051:19): [True: 5.66k, False: 3.83k]
  ------------------
 1052|  5.66k|                bad = true;
 1053|  5.66k|                break;
 1054|  5.66k|              }
 1055|  9.29k|              if (sp == std::string::npos)
  ------------------
  |  Branch (1055:19): [True: 1.11k, False: 8.17k]
  ------------------
 1056|  1.11k|                break;
 1057|  8.17k|              start = sp + 1;
 1058|  8.17k|            }
 1059|  6.77k|          }
 1060|  29.4k|          if (bad) {
  ------------------
  |  Branch (1060:15): [True: 13.9k, False: 15.5k]
  ------------------
 1061|  13.9k|            std::string s;
 1062|  13.9k|            std::vector<w_char> w;
 1063|  13.9k|            if (utf8) {
  ------------------
  |  Branch (1063:17): [True: 5.76k, False: 8.18k]
  ------------------
 1064|  5.76k|              u8_u16(w, slst[j]);
 1065|  8.18k|            } else {
 1066|  8.18k|              s = slst[j];
 1067|  8.18k|            }
 1068|  13.9k|            mkallsmall2(s, w);
 1069|  13.9k|            if (spell(s, spell_candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1069:17): [True: 20, False: 13.9k]
  ------------------
 1070|     20|              slst[l] = std::move(s);
 1071|     20|              ++l;
 1072|  13.9k|            } else {
 1073|  13.9k|              mkinitcap2(s, w);
 1074|  13.9k|              if (spell(s, spell_candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1074:19): [True: 8, False: 13.9k]
  ------------------
 1075|      8|                slst[l] = std::move(s);
 1076|      8|                ++l;
 1077|      8|              }
 1078|  13.9k|            }
 1079|  15.5k|          } else {
 1080|  15.5k|            slst[l] = slst[j];
 1081|  15.5k|            ++l;
 1082|  15.5k|          }
 1083|  29.4k|        }
 1084|  46.8k|        slst.resize(l);
 1085|  46.8k|      }
 1086|  89.0k|    }
 1087|  89.0k|  }
 1088|       |
 1089|       |  // remove duplications
 1090|  89.0k|  size_t l = 0;
 1091|   107k|  for (size_t j = 0; j < slst.size(); ++j) {
  ------------------
  |  Branch (1091:22): [True: 18.0k, False: 89.0k]
  ------------------
 1092|  18.0k|    slst[l] = slst[j];
 1093|  26.8k|    for (size_t k = 0; k < l; ++k) {
  ------------------
  |  Branch (1093:24): [True: 9.65k, False: 17.2k]
  ------------------
 1094|  9.65k|      if (slst[k] == slst[j]) {
  ------------------
  |  Branch (1094:11): [True: 785, False: 8.87k]
  ------------------
 1095|    785|        --l;
 1096|    785|        break;
 1097|    785|      }
 1098|  9.65k|    }
 1099|  18.0k|    ++l;
 1100|  18.0k|  }
 1101|  89.0k|  slst.resize(l);
 1102|       |
 1103|       |  // output conversion
 1104|  89.0k|  RepList* rl = (pAMgr) ? pAMgr->get_oconvtable() : nullptr;
  ------------------
  |  Branch (1104:17): [True: 89.0k, False: 0]
  ------------------
 1105|  89.0k|  if (rl) {
  ------------------
  |  Branch (1105:7): [True: 4.78k, False: 84.2k]
  ------------------
 1106|  4.78k|    size_t l = 0;
 1107|  5.55k|    for (size_t i = 0; i < slst.size(); ++i) {
  ------------------
  |  Branch (1107:24): [True: 770, False: 4.78k]
  ------------------
 1108|    770|      std::string wspace;
 1109|    770|      if (rl->conv(slst[i], wspace)) {
  ------------------
  |  Branch (1109:11): [True: 213, False: 557]
  ------------------
 1110|    213|        slst[i] = std::move(wspace);
 1111|    213|      }
 1112|       |      // gh#1002: OCONV can map a generated form back to the input word
 1113|       |      // (e.g. "románórum" -> "romanórum" when the user typed "romanórum"),
 1114|       |      // leaving the misspelled word as its own suggestion.
 1115|    770|      if (slst[i] == word)
  ------------------
  |  Branch (1115:11): [True: 0, False: 770]
  ------------------
 1116|      0|        continue;
 1117|    770|      if (l != i)
  ------------------
  |  Branch (1117:11): [True: 0, False: 770]
  ------------------
 1118|      0|        slst[l] = std::move(slst[i]);
 1119|    770|      ++l;
 1120|    770|    }
 1121|  4.78k|    slst.resize(l);
 1122|  4.78k|  }
 1123|  89.0k|  return slst;
 1124|  89.0k|}
_ZN12HunspellImpl7suggestERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1126|  60.4k|std::vector<std::string> HunspellImpl::suggest(const std::string& word) {
 1127|  60.4k|  std::vector<std::string> suggest_candidate_stack;
 1128|  60.4k|  auto suggest_start = std::chrono::steady_clock::now();
 1129|  60.4k|  return suggest(word, suggest_candidate_stack, suggest_start);
 1130|  60.4k|}
_ZN12HunspellImpl16suggest_internalERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorIS6_NS4_IS6_EEEESC_RbRmRiNS0_6chrono10time_pointINSG_12steady_clockENSG_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
 1136|  89.0k|        std::chrono::steady_clock::time_point suggest_start) {
 1137|  89.0k|  captype = NOCAP;
  ------------------
  |  |   92|  89.0k|#define NOCAP 0
  ------------------
 1138|  89.0k|  abbv = 0;
 1139|  89.0k|  capwords = false;
 1140|       |
 1141|  89.0k|  std::vector<std::string> slst;
 1142|       |
 1143|  89.0k|  int onlycmpdsug = 0;
 1144|  89.0k|  if (!pSMgr || m_HMgrs.empty())
  ------------------
  |  Branch (1144:7): [True: 0, False: 89.0k]
  |  Branch (1144:17): [True: 0, False: 89.0k]
  ------------------
 1145|      0|    return slst;
 1146|       |
 1147|       |  // process XML input of the simplified API (see manual)
 1148|  89.0k|  if (word.compare(0, sizeof(SPELL_XML) - 3, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) {
  ------------------
  |  |   80|  89.0k|#define SPELL_XML "<?xml?>"
  ------------------
                if (word.compare(0, sizeof(SPELL_XML) - 3, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) {
  ------------------
  |  |   80|  89.0k|#define SPELL_XML "<?xml?>"
  ------------------
                if (word.compare(0, sizeof(SPELL_XML) - 3, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) {
  ------------------
  |  |   80|  89.0k|#define SPELL_XML "<?xml?>"
  ------------------
  |  Branch (1148:7): [True: 21.2k, False: 67.7k]
  ------------------
 1149|  21.2k|    if (word.size() > MAXSPELLMLLEN)
  ------------------
  |  |   87|  21.2k|#define MAXSPELLMLLEN 8192
  ------------------
  |  Branch (1149:9): [True: 589, False: 20.6k]
  ------------------
 1150|    589|      return slst;
 1151|  20.6k|    return spellml(word);
 1152|  21.2k|  }
 1153|  67.7k|  if (utf8) {
  ------------------
  |  Branch (1153:7): [True: 32.6k, False: 35.0k]
  ------------------
 1154|  32.6k|    if (word.size() >= MAXWORDUTF8LEN)
  ------------------
  |  |   86|  32.6k|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|  32.6k|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
  |  Branch (1154:9): [True: 126, False: 32.5k]
  ------------------
 1155|    126|      return slst;
 1156|  35.0k|  } else {
 1157|  35.0k|    if (word.size() >= MAXWORDLEN)
  ------------------
  |  |   90|  35.0k|#define MAXWORDLEN 100
  ------------------
  |  Branch (1157:9): [True: 170, False: 34.9k]
  ------------------
 1158|    170|      return slst;
 1159|  35.0k|  }
 1160|  67.4k|  size_t wl = 0;
 1161|       |
 1162|  67.4k|  std::string scw;
 1163|  67.4k|  std::vector<w_char> sunicw;
 1164|       |
 1165|       |  // input conversion
 1166|  67.4k|  RepList* rl = (pAMgr) ? pAMgr->get_iconvtable() : nullptr;
  ------------------
  |  Branch (1166:17): [True: 67.4k, False: 0]
  ------------------
 1167|  67.4k|  {
 1168|  67.4k|    std::string wspace;
 1169|       |
 1170|  67.4k|    bool convstatus = rl ? rl->conv(word, wspace) : false;
  ------------------
  |  Branch (1170:23): [True: 3.64k, False: 63.7k]
  ------------------
 1171|  67.4k|    if (convstatus) {
  ------------------
  |  Branch (1171:9): [True: 0, False: 67.4k]
  ------------------
 1172|       |      // the input conversion can grow the word without limit, so hold the
 1173|       |      // converted word to the same maximum length as the raw word
 1174|      0|      if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   86|      0|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
                    if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   90|      0|#define MAXWORDLEN 100
  ------------------
  |  Branch (1174:11): [True: 0, False: 0]
  |  Branch (1174:11): [True: 0, False: 0]
  ------------------
 1175|      0|        return slst;
 1176|      0|      wl = cleanword2(scw, sunicw, wspace, &captype, &abbv);
 1177|      0|    } else
 1178|  67.4k|      wl = cleanword2(scw, sunicw, word, &captype, &abbv);
 1179|       |
 1180|  67.4k|    if (wl == 0)
  ------------------
  |  Branch (1180:9): [True: 0, False: 67.4k]
  ------------------
 1181|      0|      return slst;
 1182|       |
 1183|  67.4k|#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
 1184|  67.4k|    if (wl > 32768)
  ------------------
  |  Branch (1184:9): [True: 0, False: 67.4k]
  ------------------
 1185|      0|      return slst;
 1186|  67.4k|#endif
 1187|  67.4k|  }
 1188|       |
 1189|  67.4k|  bool good = false;
 1190|       |
 1191|       |  // check capitalized form for FORCEUCASE
 1192|  67.4k|  if (pAMgr && captype == NOCAP && pAMgr->get_forceucase()) {
  ------------------
  |  |   92|   134k|#define NOCAP 0
  ------------------
  |  Branch (1192:7): [True: 67.4k, False: 0]
  |  Branch (1192:16): [True: 20.5k, False: 46.8k]
  |  Branch (1192:36): [True: 0, False: 20.5k]
  ------------------
 1193|      0|    int info = SPELL_ORIGCAP;
  ------------------
  |  |   83|      0|#define SPELL_ORIGCAP (1 << 5)
  ------------------
 1194|      0|    if (checkword(scw, &info, nullptr, suggest_start)) {
  ------------------
  |  Branch (1194:9): [True: 0, False: 0]
  ------------------
 1195|      0|      std::string form(std::move(scw));
 1196|      0|      mkinitcap(form);
 1197|      0|      slst.push_back(std::move(form));
 1198|      0|      return slst;
 1199|      0|    }
 1200|      0|  }
 1201|       |
 1202|  67.4k|  switch (captype) {
  ------------------
  |  Branch (1202:11): [True: 67.4k, False: 0]
  ------------------
 1203|  20.5k|    case NOCAP: {
  ------------------
  |  |   92|  20.5k|#define NOCAP 0
  ------------------
  |  Branch (1203:5): [True: 20.5k, False: 46.8k]
  ------------------
 1204|  20.5k|      good |= pSMgr->suggest(slst, scw, &onlycmpdsug);
 1205|  20.5k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  20.5k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1205:11): [True: 0, False: 20.5k]
  ------------------
 1206|      0|          return slst;
 1207|  20.5k|      if (abbv) {
  ------------------
  |  Branch (1207:11): [True: 1.69k, False: 18.8k]
  ------------------
 1208|  1.69k|        std::string wspace(scw);
 1209|  1.69k|        wspace.push_back('.');
 1210|  1.69k|        good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1211|  1.69k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  1.69k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1211:13): [True: 0, False: 1.69k]
  ------------------
 1212|      0|            return slst;
 1213|  1.69k|      }
 1214|  20.5k|      break;
 1215|  20.5k|    }
 1216|       |
 1217|  20.5k|    case INITCAP: {
  ------------------
  |  |   93|  11.2k|#define INITCAP 1
  ------------------
  |  Branch (1217:5): [True: 11.2k, False: 56.2k]
  ------------------
 1218|  11.2k|      capwords = true;
 1219|  11.2k|      good |= pSMgr->suggest(slst, scw, &onlycmpdsug);
 1220|  11.2k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  11.2k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1220:11): [True: 0, False: 11.2k]
  ------------------
 1221|      0|          return slst;
 1222|  11.2k|      std::string wspace(scw);
 1223|  11.2k|      mkallsmall2(wspace, sunicw);
 1224|  11.2k|      good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1225|  11.2k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  11.2k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1225:11): [True: 0, False: 11.2k]
  ------------------
 1226|      0|          return slst;
 1227|  11.2k|      break;
 1228|  11.2k|    }
 1229|  13.3k|    case HUHINITCAP:
  ------------------
  |  |   96|  13.3k|#define HUHINITCAP 4
  ------------------
  |  Branch (1229:5): [True: 13.3k, False: 54.0k]
  ------------------
 1230|  13.3k|      capwords = true;
 1231|       |      /* FALLTHROUGH */
 1232|  26.5k|    case HUHCAP: {
  ------------------
  |  |   95|  26.5k|#define HUHCAP 3
  ------------------
  |  Branch (1232:5): [True: 13.1k, False: 54.2k]
  ------------------
 1233|  26.5k|      good |= pSMgr->suggest(slst, scw, &onlycmpdsug);
 1234|  26.5k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  26.5k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1234:11): [True: 0, False: 26.5k]
  ------------------
 1235|      0|          return slst;
 1236|       |      // something.The -> something. The
 1237|  26.5k|      size_t dot_pos = scw.find('.');
 1238|  26.5k|      if (dot_pos != std::string::npos) {
  ------------------
  |  Branch (1238:11): [True: 8.65k, False: 17.8k]
  ------------------
 1239|  8.65k|        std::string postdot = scw.substr(dot_pos + 1);
 1240|  8.65k|        int captype_;
 1241|  8.65k|        if (utf8) {
  ------------------
  |  Branch (1241:13): [True: 2.08k, False: 6.56k]
  ------------------
 1242|  2.08k|          std::vector<w_char> postdotu;
 1243|  2.08k|          u8_u16(postdotu, postdot);
 1244|  2.08k|          captype_ = get_captype_utf8(postdotu, langnum);
 1245|  6.56k|        } else {
 1246|  6.56k|          captype_ = get_captype(postdot, csconv);
 1247|  6.56k|        }
 1248|  8.65k|        if (captype_ == INITCAP) {
  ------------------
  |  |   93|  8.65k|#define INITCAP 1
  ------------------
  |  Branch (1248:13): [True: 3.72k, False: 4.92k]
  ------------------
 1249|  3.72k|          std::string str(scw);
 1250|  3.72k|          str.insert(dot_pos + 1, 1, ' ');
 1251|  3.72k|          insert_sug(slst, str);
 1252|  3.72k|        }
 1253|  8.65k|      }
 1254|       |
 1255|  26.5k|      std::string wspace;
 1256|       |
 1257|  26.5k|      if (captype == HUHINITCAP) {
  ------------------
  |  |   96|  26.5k|#define HUHINITCAP 4
  ------------------
  |  Branch (1257:11): [True: 13.3k, False: 13.1k]
  ------------------
 1258|       |        // TheOpenOffice.org -> The OpenOffice.org
 1259|  13.3k|        wspace = scw;
 1260|  13.3k|        mkinitsmall2(wspace, sunicw);
 1261|  13.3k|        good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1262|  13.3k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  13.3k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1262:13): [True: 0, False: 13.3k]
  ------------------
 1263|      0|            return slst;
 1264|  13.3k|      }
 1265|  26.5k|      wspace = scw;
 1266|  26.5k|      mkallsmall2(wspace, sunicw);
 1267|  26.5k|      if (spell(wspace, spell_candidate_stack, nullptr, nullptr, suggest_start))
  ------------------
  |  Branch (1267:11): [True: 1.18k, False: 25.3k]
  ------------------
 1268|  1.18k|        insert_sug(slst, wspace);
 1269|  26.5k|      size_t prevns = slst.size();
 1270|  26.5k|      good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1271|  26.5k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  26.5k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1271:11): [True: 0, False: 26.5k]
  ------------------
 1272|      0|          return slst;
 1273|  26.5k|      if (captype == HUHINITCAP) {
  ------------------
  |  |   96|  26.5k|#define HUHINITCAP 4
  ------------------
  |  Branch (1273:11): [True: 13.3k, False: 13.1k]
  ------------------
 1274|  13.3k|        mkinitcap2(wspace, sunicw);
 1275|  13.3k|        if (spell(wspace, spell_candidate_stack, nullptr, nullptr, suggest_start))
  ------------------
  |  Branch (1275:13): [True: 424, False: 12.9k]
  ------------------
 1276|    424|          insert_sug(slst, wspace);
 1277|  13.3k|        good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1278|  13.3k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  13.3k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1278:13): [True: 0, False: 13.3k]
  ------------------
 1279|      0|            return slst;
 1280|  13.3k|      }
 1281|       |      // aNew -> "a New" (instead of "a new")
 1282|  27.4k|      for (size_t j = prevns; j < slst.size(); ++j) {
  ------------------
  |  Branch (1282:31): [True: 920, False: 26.5k]
  ------------------
 1283|    920|        const char* space = strchr(slst[j].c_str(), ' ');
 1284|    920|        if (space) {
  ------------------
  |  Branch (1284:13): [True: 374, False: 546]
  ------------------
 1285|    374|          size_t slen = strlen(space + 1);
 1286|       |          // different case after space (need capitalisation)
 1287|    374|          if ((slen < wl) && strcmp(scw.c_str() + wl - slen, space + 1) != 0) {
  ------------------
  |  Branch (1287:15): [True: 374, False: 0]
  |  Branch (1287:30): [True: 364, False: 10]
  ------------------
 1288|    364|            std::string first(slst[j].c_str(), space + 1);
 1289|    364|            std::string second(space + 1);
 1290|    364|            std::vector<w_char> w;
 1291|    364|            if (utf8)
  ------------------
  |  Branch (1291:17): [True: 116, False: 248]
  ------------------
 1292|    116|              u8_u16(w, second);
 1293|    364|            mkinitcap2(second, w);
 1294|       |            // set as first suggestion
 1295|    364|            slst.erase(slst.begin() + j);
 1296|    364|            slst.insert(slst.begin(), first + second);
 1297|    364|          }
 1298|    374|        }
 1299|    920|      }
 1300|  26.5k|      break;
 1301|  26.5k|    }
 1302|       |
 1303|  9.14k|    case ALLCAP: {
  ------------------
  |  |   94|  9.14k|#define ALLCAP 2
  ------------------
  |  Branch (1303:5): [True: 9.14k, False: 58.2k]
  ------------------
 1304|  9.14k|      std::string wspace(scw);
 1305|  9.14k|      mkallsmall2(wspace, sunicw);
 1306|  9.14k|      good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1307|  9.14k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  9.14k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1307:11): [True: 0, False: 9.14k]
  ------------------
 1308|      0|          return slst;
 1309|  9.14k|      if (pAMgr && pAMgr->get_keepcase() && spell(wspace, spell_candidate_stack, nullptr, nullptr, suggest_start))
  ------------------
  |  Branch (1309:11): [True: 9.14k, False: 0]
  |  Branch (1309:20): [True: 407, False: 8.74k]
  |  Branch (1309:45): [True: 0, False: 407]
  ------------------
 1310|      0|        insert_sug(slst, wspace);
 1311|  9.14k|      mkinitcap2(wspace, sunicw);
 1312|  9.14k|      good |= pSMgr->suggest(slst, wspace, &onlycmpdsug);
 1313|  9.14k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  9.14k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1313:11): [True: 0, False: 9.14k]
  ------------------
 1314|      0|          return slst;
 1315|  9.14k|      for (auto& j : slst) {
  ------------------
  |  Branch (1315:20): [True: 473, False: 9.14k]
  ------------------
 1316|    473|        mkallcap(j);
 1317|    473|        if (pAMgr && pAMgr->get_checksharps()) {
  ------------------
  |  Branch (1317:13): [True: 473, False: 0]
  |  Branch (1317:22): [True: 0, False: 473]
  ------------------
 1318|      0|          if (utf8) {
  ------------------
  |  Branch (1318:15): [True: 0, False: 0]
  ------------------
 1319|      0|            mystrrep(j, "\xC3\x9F", "SS");
 1320|      0|          } else {
 1321|      0|            mystrrep(j, "\xDF", "SS");
 1322|      0|          }
 1323|      0|        }
 1324|    473|      }
 1325|  9.14k|      break;
 1326|  9.14k|    }
 1327|  67.4k|  }
 1328|       |
 1329|       |  // LANG_hu section: replace '-' with ' ' in Hungarian
 1330|  67.4k|  if (langnum == LANG_hu) {
  ------------------
  |  Branch (1330:7): [True: 3.70k, False: 63.7k]
  ------------------
 1331|  3.70k|    for (auto& j : slst) {
  ------------------
  |  Branch (1331:18): [True: 314, False: 3.70k]
  ------------------
 1332|    314|      size_t pos = j.find('-');
 1333|    314|      if (pos != std::string::npos) {
  ------------------
  |  Branch (1333:11): [True: 89, False: 225]
  ------------------
 1334|     89|        int info = 0;
 1335|     89|        std::string w(j.substr(0, pos));
 1336|     89|        w.append(j.substr(pos + 1));
 1337|     89|        (void)spell(w, spell_candidate_stack, &info, nullptr, suggest_start);
 1338|     89|        if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) {
  ------------------
  |  |   78|     89|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
                      if ((info & SPELL_COMPOUND) && (info & SPELL_FORBIDDEN)) {
  ------------------
  |  |   79|      0|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  |  Branch (1338:13): [True: 0, False: 89]
  |  Branch (1338:40): [True: 0, False: 0]
  ------------------
 1339|      0|          j[pos] = ' ';
 1340|      0|        } else
 1341|     89|          j[pos] = '-';
 1342|     89|      }
 1343|    314|    }
 1344|  3.70k|  }
 1345|       |  // END OF LANG_hu section
 1346|       |  // try ngram approach since found nothing good suggestion
 1347|  67.4k|  if (!good && pAMgr && (slst.empty() || onlycmpdsug) && (pAMgr->get_maxngramsugs() != 0)) {
  ------------------
  |  Branch (1347:7): [True: 67.3k, False: 56]
  |  Branch (1347:16): [True: 67.3k, False: 0]
  |  Branch (1347:26): [True: 59.6k, False: 7.68k]
  |  Branch (1347:42): [True: 7.51k, False: 171]
  |  Branch (1347:58): [True: 59.9k, False: 7.29k]
  ------------------
 1348|  59.9k|    switch (captype) {
  ------------------
  |  Branch (1348:13): [True: 59.9k, False: 0]
  ------------------
 1349|  17.5k|      case NOCAP: {
  ------------------
  |  |   92|  17.5k|#define NOCAP 0
  ------------------
  |  Branch (1349:7): [True: 17.5k, False: 42.4k]
  ------------------
 1350|  17.5k|        pSMgr->ngsuggest(slst, scw.c_str(), m_HMgrs, NOCAP);
  ------------------
  |  |   92|  17.5k|#define NOCAP 0
  ------------------
 1351|  17.5k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  17.5k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1351:13): [True: 0, False: 17.5k]
  ------------------
 1352|      0|            return slst;
 1353|  17.5k|        break;
 1354|  17.5k|      }
 1355|       |      /* FALLTHROUGH */
 1356|  17.5k|      case HUHINITCAP:
  ------------------
  |  |   96|  12.6k|#define HUHINITCAP 4
  ------------------
  |  Branch (1356:7): [True: 12.6k, False: 47.3k]
  ------------------
 1357|  12.6k|        capwords = true;
 1358|       |      /* FALLTHROUGH */
 1359|  24.8k|      case HUHCAP: {
  ------------------
  |  |   95|  24.8k|#define HUHCAP 3
  ------------------
  |  Branch (1359:7): [True: 12.2k, False: 47.6k]
  ------------------
 1360|  24.8k|        std::string wspace(scw);
 1361|  24.8k|        mkallsmall2(wspace, sunicw);
 1362|  24.8k|        pSMgr->ngsuggest(slst, wspace.c_str(), m_HMgrs, HUHCAP);
  ------------------
  |  |   95|  24.8k|#define HUHCAP 3
  ------------------
 1363|  24.8k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  24.8k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1363:13): [True: 0, False: 24.8k]
  ------------------
 1364|      0|            return slst;
 1365|  24.8k|        break;
 1366|  24.8k|      }
 1367|  24.8k|      case INITCAP: {
  ------------------
  |  |   93|  9.56k|#define INITCAP 1
  ------------------
  |  Branch (1367:7): [True: 9.56k, False: 50.3k]
  ------------------
 1368|  9.56k|        capwords = true;
 1369|  9.56k|        std::string wspace(scw);
 1370|  9.56k|        mkallsmall2(wspace, sunicw);
 1371|  9.56k|        pSMgr->ngsuggest(slst, wspace.c_str(), m_HMgrs, INITCAP);
  ------------------
  |  |   93|  9.56k|#define INITCAP 1
  ------------------
 1372|  9.56k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  9.56k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1372:13): [True: 0, False: 9.56k]
  ------------------
 1373|      0|            return slst;
 1374|  9.56k|        break;
 1375|  9.56k|      }
 1376|  9.56k|      case ALLCAP: {
  ------------------
  |  |   94|  8.01k|#define ALLCAP 2
  ------------------
  |  Branch (1376:7): [True: 8.01k, False: 51.8k]
  ------------------
 1377|  8.01k|        std::string wspace(scw);
 1378|  8.01k|        mkallsmall2(wspace, sunicw);
 1379|  8.01k|        size_t oldns = slst.size();
 1380|  8.01k|        pSMgr->ngsuggest(slst, wspace.c_str(), m_HMgrs, ALLCAP);
  ------------------
  |  |   94|  8.01k|#define ALLCAP 2
  ------------------
 1381|  8.01k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  8.01k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1381:13): [True: 0, False: 8.01k]
  ------------------
 1382|      0|            return slst;
 1383|  9.84k|        for (size_t j = oldns; j < slst.size(); ++j) {
  ------------------
  |  Branch (1383:32): [True: 1.83k, False: 8.01k]
  ------------------
 1384|  1.83k|          mkallcap(slst[j]);
 1385|  1.83k|        }
 1386|  8.01k|        break;
 1387|  8.01k|      }
 1388|  59.9k|    }
 1389|  59.9k|  }
 1390|       |
 1391|       |  // try dash suggestion (Afo-American -> Afro-American)
 1392|       |  // Note: LibreOffice was modified to treat dashes as word
 1393|       |  // characters to check "scot-free" etc. word forms, but
 1394|       |  // we need to handle suggestions for "Afo-American", etc.,
 1395|       |  // while "Afro-American" is missing from the dictionary.
 1396|       |  // TODO avoid possible overgeneration
 1397|  67.4k|  size_t dash_pos = scw.find('-');
 1398|  67.4k|  if (dash_pos != std::string::npos) {
  ------------------
  |  Branch (1398:7): [True: 33.2k, False: 34.2k]
  ------------------
 1399|  33.2k|    int nodashsug = 1;
 1400|  40.7k|    for (size_t j = 0; j < slst.size() && nodashsug == 1; ++j) {
  ------------------
  |  Branch (1400:24): [True: 8.02k, False: 32.7k]
  |  Branch (1400:43): [True: 7.57k, False: 456]
  ------------------
 1401|  7.57k|      if (slst[j].find('-') != std::string::npos)
  ------------------
  |  Branch (1401:11): [True: 3.97k, False: 3.59k]
  ------------------
 1402|  3.97k|        nodashsug = 0;
 1403|  7.57k|    }
 1404|       |
 1405|  33.2k|    size_t prev_pos = 0;
 1406|  33.2k|    bool last = false;
 1407|       |
 1408|   104k|    while (!good && nodashsug && !last) {
  ------------------
  |  Branch (1408:12): [True: 104k, False: 33]
  |  Branch (1408:21): [True: 71.7k, False: 32.5k]
  |  Branch (1408:34): [True: 71.1k, False: 620]
  ------------------
 1409|  71.1k|      if (dash_pos == scw.size())
  ------------------
  |  Branch (1409:11): [True: 5.81k, False: 65.3k]
  ------------------
 1410|  5.81k|        last = true;
 1411|  71.1k|      std::string chunk = scw.substr(prev_pos, dash_pos - prev_pos);
 1412|  71.1k|      if (chunk != word && !spell(chunk, spell_candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1412:11): [True: 71.1k, False: 0]
  |  Branch (1412:28): [True: 28.5k, False: 42.5k]
  ------------------
 1413|  28.5k|        std::vector<std::string> nlst = suggest(chunk, suggest_candidate_stack, suggest_start);
 1414|  28.5k|        if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|  28.5k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1414:13): [True: 0, False: 28.5k]
  ------------------
 1415|      0|            return slst;
 1416|  38.3k|        for (auto j = nlst.rbegin(); j != nlst.rend(); ++j) {
  ------------------
  |  Branch (1416:38): [True: 9.79k, False: 28.5k]
  ------------------
 1417|  9.79k|          std::string wspace = scw.substr(0, prev_pos);
 1418|  9.79k|          wspace.append(*j);
 1419|  9.79k|          if (!last) {
  ------------------
  |  Branch (1419:15): [True: 7.93k, False: 1.85k]
  ------------------
 1420|  7.93k|            wspace.append("-");
 1421|  7.93k|            wspace.append(scw.substr(dash_pos + 1));
 1422|  7.93k|          }
 1423|  9.79k|          int info = 0;
 1424|  9.79k|          if (pAMgr && pAMgr->get_forbiddenword())
  ------------------
  |  Branch (1424:15): [True: 9.79k, False: 0]
  |  Branch (1424:24): [True: 9.79k, False: 0]
  ------------------
 1425|  9.79k|            checkword(wspace, &info, nullptr, suggest_start);
 1426|  9.79k|          if (!(info & SPELL_FORBIDDEN))
  ------------------
  |  |   79|  9.79k|#define SPELL_FORBIDDEN (1 << 1)
  ------------------
  |  Branch (1426:15): [True: 9.79k, False: 0]
  ------------------
 1427|  9.79k|            insert_sug(slst, wspace);
 1428|  9.79k|        }
 1429|  28.5k|        nodashsug = 0;
 1430|  28.5k|      }
 1431|  71.1k|      if (!last) {
  ------------------
  |  Branch (1431:11): [True: 65.3k, False: 5.81k]
  ------------------
 1432|  65.3k|        prev_pos = dash_pos + 1;
 1433|  65.3k|        dash_pos = scw.find('-', prev_pos);
 1434|  65.3k|      }
 1435|  71.1k|      if (dash_pos == std::string::npos)
  ------------------
  |  Branch (1435:11): [True: 12.7k, False: 58.4k]
  ------------------
 1436|  12.7k|        dash_pos = scw.size();
 1437|  71.1k|    }
 1438|  33.2k|  }
 1439|  67.4k|  return slst;
 1440|  67.4k|}
_ZN12HunspellImpl4stemERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEE:
 1446|  1.04k|std::vector<std::string> HunspellImpl::stem(const std::vector<std::string>& desc) {
 1447|  1.04k|  std::vector<std::string> slst;
 1448|       |
 1449|  1.04k|  std::string result2;
 1450|  1.04k|  if (desc.empty())
  ------------------
  |  Branch (1450:7): [True: 975, False: 70]
  ------------------
 1451|    975|    return slst;
 1452|     80|  for (const auto& i : desc) {
  ------------------
  |  Branch (1452:22): [True: 80, False: 70]
  ------------------
 1453|     80|    std::string result;
 1454|       |
 1455|       |    // add compound word parts (except the last one)
 1456|     80|    std::string tok(i, append_compound_parts(i, result));
 1457|     80|    size_t alt = 0;
 1458|     80|    while ((alt = tok.find(" | ", alt)) != std::string::npos) {
  ------------------
  |  Branch (1458:12): [True: 0, False: 80]
  ------------------
 1459|      0|      tok[alt + 1] = MSEP_ALT;
  ------------------
  |  |  123|      0|#define MSEP_ALT '\v'
  ------------------
 1460|      0|    }
 1461|     80|    std::vector<std::string> pl = line_tok(tok, MSEP_ALT);
  ------------------
  |  |  123|     80|#define MSEP_ALT '\v'
  ------------------
 1462|     80|    for (auto& k : pl) {
  ------------------
  |  Branch (1462:18): [True: 80, False: 80]
  ------------------
 1463|       |      // add derivational suffixes
 1464|     80|      if (k.find(MORPH_DERI_SFX) != std::string::npos) {
  ------------------
  |  |  109|     80|#define MORPH_DERI_SFX "ds:"
  ------------------
  |  Branch (1464:11): [True: 0, False: 80]
  ------------------
 1465|       |        // remove inflectional suffixes
 1466|      0|        const size_t is = k.find(MORPH_INFL_SFX);
  ------------------
  |  |  110|      0|#define MORPH_INFL_SFX "is:"
  ------------------
 1467|      0|        if (is != std::string::npos)
  ------------------
  |  Branch (1467:13): [True: 0, False: 0]
  ------------------
 1468|      0|          k.resize(is);
 1469|      0|        std::vector<std::string> singlepl;
 1470|      0|        singlepl.push_back(k);
 1471|      0|        std::string sg = pSMgr->suggest_gen(singlepl, k);
 1472|      0|        if (!sg.empty()) {
  ------------------
  |  Branch (1472:13): [True: 0, False: 0]
  ------------------
 1473|      0|          std::vector<std::string> gen = line_tok(sg, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1474|      0|          for (auto& j : gen) {
  ------------------
  |  Branch (1474:24): [True: 0, False: 0]
  ------------------
 1475|      0|            result2.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1476|      0|            result2.append(result);
 1477|      0|            result2.append(j);
 1478|      0|          }
 1479|      0|        }
 1480|     80|      } else {
 1481|     80|        result2.push_back(MSEP_REC);
  ------------------
  |  |  122|     80|#define MSEP_REC '\n'
  ------------------
 1482|     80|        result2.append(result);
 1483|     80|        if (k.find(MORPH_SURF_PFX) != std::string::npos) {
  ------------------
  |  |  112|     80|#define MORPH_SURF_PFX "sp:"
  ------------------
  |  Branch (1483:13): [True: 0, False: 80]
  ------------------
 1484|      0|          std::string field;
 1485|      0|          copy_field(field, k, MORPH_SURF_PFX);
  ------------------
  |  |  112|      0|#define MORPH_SURF_PFX "sp:"
  ------------------
 1486|      0|          result2.append(field);
 1487|      0|        }
 1488|     80|        std::string field;
 1489|     80|        copy_field(field, k, MORPH_STEM);
  ------------------
  |  |  103|     80|#define MORPH_STEM "st:"
  ------------------
 1490|     80|        result2.append(field);
 1491|     80|      }
 1492|     80|    }
 1493|     80|  }
 1494|     70|  slst = line_tok(result2, MSEP_REC);
  ------------------
  |  |  122|     70|#define MSEP_REC '\n'
  ------------------
 1495|     70|  uniqlist(slst);
 1496|     70|  return slst;
 1497|  1.04k|}
_ZN12HunspellImpl4stemERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1499|  1.04k|std::vector<std::string> HunspellImpl::stem(const std::string& word) {
 1500|  1.04k|  return stem(analyze(word));
 1501|  1.04k|}
_ZN12HunspellImpl9mkinitcapERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1511|  16.0k|void HunspellImpl::mkinitcap(std::string& u8) {
 1512|  16.0k|  if (utf8) {
  ------------------
  |  Branch (1512:7): [True: 5.03k, False: 10.9k]
  ------------------
 1513|  5.03k|    std::vector<w_char> u16;
 1514|  5.03k|    u8_u16(u16, u8);
 1515|  5.03k|    ::mkinitcap_utf(u16, langnum);
 1516|  5.03k|    u16_u8(u8, u16);
 1517|  10.9k|  } else {
 1518|  10.9k|    ::mkinitcap(u8, csconv);
 1519|  10.9k|  }
 1520|  16.0k|}
_ZN12HunspellImpl10mkinitcap2ERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorI6w_charNS4_IS9_EEEE:
 1522|  1.44M|int HunspellImpl::mkinitcap2(std::string& u8, std::vector<w_char>& u16) {
 1523|  1.44M|  if (utf8) {
  ------------------
  |  Branch (1523:7): [True: 311k, False: 1.13M]
  ------------------
 1524|   311k|    ::mkinitcap_utf(u16, langnum);
 1525|   311k|    u16_u8(u8, u16);
 1526|  1.13M|  } else {
 1527|  1.13M|    ::mkinitcap(u8, csconv);
 1528|  1.13M|  }
 1529|  1.44M|  return u8.size();
 1530|  1.44M|}
_ZN12HunspellImpl12mkinitsmall2ERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERNS0_6vectorI6w_charNS4_IS9_EEEE:
 1532|   247k|int HunspellImpl::mkinitsmall2(std::string& u8, std::vector<w_char>& u16) {
 1533|   247k|  if (utf8) {
  ------------------
  |  Branch (1533:7): [True: 31.1k, False: 216k]
  ------------------
 1534|  31.1k|    ::mkinitsmall_utf(u16, langnum);
 1535|  31.1k|    u16_u8(u8, u16);
 1536|   216k|  } else {
 1537|   216k|    ::mkinitsmall(u8, csconv);
 1538|   216k|  }
 1539|   247k|  return u8.size();
 1540|   247k|}
_ZN12HunspellImpl3addERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1542|  5.18k|int HunspellImpl::add(const std::string& word) {
 1543|  5.18k|  if (!m_HMgrs.empty())
  ------------------
  |  Branch (1543:7): [True: 5.18k, False: 0]
  ------------------
 1544|  5.18k|    return m_HMgrs[0]->add(word);
 1545|      0|  return 0;
 1546|  5.18k|}
_ZN12HunspellImpl14add_with_affixERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
 1554|  2.03k|int HunspellImpl::add_with_affix(const std::string& word, const std::string& example) {
 1555|  2.03k|  if (!m_HMgrs.empty())
  ------------------
  |  Branch (1555:7): [True: 2.03k, False: 0]
  ------------------
 1556|  2.03k|    return m_HMgrs[0]->add_with_affix(word, example);
 1557|      0|  return 0;
 1558|  2.03k|}
_ZN12HunspellImpl10cat_resultERNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKS6_:
 1577|   362k|void HunspellImpl::cat_result(std::string& result, const std::string& st) {
 1578|   362k|  if (!st.empty()) {
  ------------------
  |  Branch (1578:7): [True: 2.10k, False: 360k]
  ------------------
 1579|  2.10k|    if (!result.empty())
  ------------------
  |  Branch (1579:9): [True: 0, False: 2.10k]
  ------------------
 1580|      0|      result.append("\n");
 1581|  2.10k|    result.append(st);
 1582|  2.10k|  }
 1583|   362k|}
_ZN12HunspellImpl7analyzeERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1585|  7.10k|std::vector<std::string> HunspellImpl::analyze(const std::string& word) {
 1586|  7.10k|  std::vector<std::string> slst = analyze_internal(word);
 1587|       |  // output conversion
 1588|  7.10k|  RepList* rl = (pAMgr) ? pAMgr->get_oconvtable() : nullptr;
  ------------------
  |  Branch (1588:17): [True: 7.10k, False: 0]
  ------------------
 1589|  7.10k|  if (rl) {
  ------------------
  |  Branch (1589:7): [True: 372, False: 6.73k]
  ------------------
 1590|       |    // the output conversion can multiply the length of every line, so hold the
 1591|       |    // converted analysis to the same ceiling as the raw analysis
 1592|    372|    size_t total = 0;
 1593|    372|    size_t i = 0;
 1594|    448|    for (; i < slst.size(); ++i) {
  ------------------
  |  Branch (1594:12): [True: 76, False: 372]
  ------------------
 1595|     76|      std::string wspace;
 1596|     76|      if (rl->conv(slst[i], wspace)) {
  ------------------
  |  Branch (1596:11): [True: 0, False: 76]
  ------------------
 1597|      0|        slst[i] = std::move(wspace);
 1598|      0|      }
 1599|     76|      total += slst[i].size();
 1600|     76|      if (total > MAXMORPHRESULT) {
  ------------------
  |  |  111|     76|#define MAXMORPHRESULT (4 * 1024 * 1024)
  ------------------
  |  Branch (1600:11): [True: 0, False: 76]
  ------------------
 1601|      0|        ++i;
 1602|      0|        break;
 1603|      0|      }
 1604|     76|    }
 1605|    372|    slst.resize(i);
 1606|    372|  }
 1607|  7.10k|  return slst;
 1608|  7.10k|}
_ZN12HunspellImpl16analyze_internalERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1610|  7.10k|std::vector<std::string> HunspellImpl::analyze_internal(const std::string& word) {
 1611|  7.10k|  std::vector<std::string> candidate_stack, slst;
 1612|  7.10k|  if (!pSMgr || m_HMgrs.empty())
  ------------------
  |  Branch (1612:7): [True: 0, False: 7.10k]
  |  Branch (1612:17): [True: 0, False: 7.10k]
  ------------------
 1613|      0|    return slst;
 1614|  7.10k|  if (utf8) {
  ------------------
  |  Branch (1614:7): [True: 3.35k, False: 3.75k]
  ------------------
 1615|  3.35k|    if (word.size() >= MAXWORDUTF8LEN)
  ------------------
  |  |   86|  3.35k|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|  3.35k|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
  |  Branch (1615:9): [True: 360, False: 2.99k]
  ------------------
 1616|    360|      return slst;
 1617|  3.75k|  } else {
 1618|  3.75k|    if (word.size() >= MAXWORDLEN)
  ------------------
  |  |   90|  3.75k|#define MAXWORDLEN 100
  ------------------
  |  Branch (1618:9): [True: 600, False: 3.15k]
  ------------------
 1619|    600|      return slst;
 1620|  3.75k|  }
 1621|  6.14k|  int captype = NOCAP;
  ------------------
  |  |   92|  6.14k|#define NOCAP 0
  ------------------
 1622|  6.14k|  size_t abbv = 0;
 1623|  6.14k|  size_t wl = 0;
 1624|       |
 1625|  6.14k|  std::string scw;
 1626|  6.14k|  std::vector<w_char> sunicw;
 1627|       |
 1628|       |  // input conversion
 1629|  6.14k|  RepList* rl = (pAMgr) ? pAMgr->get_iconvtable() : nullptr;
  ------------------
  |  Branch (1629:17): [True: 6.14k, False: 0]
  ------------------
 1630|  6.14k|  {
 1631|  6.14k|    std::string wspace;
 1632|       |
 1633|  6.14k|    bool convstatus = rl ? rl->conv(word, wspace) : false;
  ------------------
  |  Branch (1633:23): [True: 332, False: 5.81k]
  ------------------
 1634|  6.14k|    if (convstatus) {
  ------------------
  |  Branch (1634:9): [True: 0, False: 6.14k]
  ------------------
 1635|       |      // the input conversion can grow the word without limit, so hold the
 1636|       |      // converted word to the same maximum length as the raw word
 1637|      0|      if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   86|      0|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|      0|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
                    if (utf8 ? wspace.size() >= MAXWORDUTF8LEN : wspace.size() >= MAXWORDLEN)
  ------------------
  |  |   90|      0|#define MAXWORDLEN 100
  ------------------
  |  Branch (1637:11): [True: 0, False: 0]
  |  Branch (1637:11): [True: 0, False: 0]
  ------------------
 1638|      0|        return slst;
 1639|      0|      wl = cleanword2(scw, sunicw, wspace, &captype, &abbv);
 1640|      0|    } else
 1641|  6.14k|      wl = cleanword2(scw, sunicw, word, &captype, &abbv);
 1642|       |
 1643|  6.14k|#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
 1644|  6.14k|    if (wl > 32768)
  ------------------
  |  Branch (1644:9): [True: 0, False: 6.14k]
  ------------------
 1645|      0|      return slst;
 1646|  6.14k|#endif
 1647|  6.14k|  }
 1648|       |
 1649|  6.14k|  if (wl == 0) {
  ------------------
  |  Branch (1649:7): [True: 411, False: 5.73k]
  ------------------
 1650|    411|    if (abbv) {
  ------------------
  |  Branch (1650:9): [True: 247, False: 164]
  ------------------
 1651|    247|      scw.clear();
 1652|  4.57k|      for (wl = 0; wl < abbv; wl++)
  ------------------
  |  Branch (1652:20): [True: 4.33k, False: 247]
  ------------------
 1653|  4.33k|        scw.push_back('.');
 1654|    247|      abbv = 0;
 1655|    247|    } else
 1656|    164|      return slst;
 1657|    411|  }
 1658|       |
 1659|  5.98k|  std::string result;
 1660|       |
 1661|  5.98k|  auto suggest_start = std::chrono::steady_clock::now();
 1662|       |
 1663|  5.98k|  size_t n = 0;
 1664|       |  // test numbers
 1665|       |  // LANG_hu section: set dash information for suggestions
 1666|  5.98k|  if (langnum == LANG_hu) {
  ------------------
  |  Branch (1666:7): [True: 324, False: 5.65k]
  ------------------
 1667|    324|    size_t n2 = 0;
 1668|    324|    size_t n3 = 0;
 1669|       |
 1670|    478|    while ((n < wl) && (((scw[n] <= '9') && (scw[n] >= '0')) ||
  ------------------
  |  Branch (1670:12): [True: 458, False: 20]
  |  Branch (1670:26): [True: 252, False: 206]
  |  Branch (1670:45): [True: 154, False: 98]
  ------------------
 1671|    304|                        (((scw[n] == '.') || (scw[n] == ',')) && (n > 0)))) {
  ------------------
  |  Branch (1671:27): [True: 22, False: 282]
  |  Branch (1671:46): [True: 0, False: 282]
  |  Branch (1671:66): [True: 0, False: 22]
  ------------------
 1672|    154|      n++;
 1673|    154|      if ((scw[n] == '.') || (scw[n] == ',')) {
  ------------------
  |  Branch (1673:11): [True: 0, False: 154]
  |  Branch (1673:30): [True: 0, False: 154]
  ------------------
 1674|      0|        if (((n2 == 0) && (n > 3)) ||
  ------------------
  |  Branch (1674:14): [True: 0, False: 0]
  |  Branch (1674:27): [True: 0, False: 0]
  ------------------
 1675|      0|            ((n2 > 0) && ((scw[n - 1] == '.') || (scw[n - 1] == ','))))
  ------------------
  |  Branch (1675:14): [True: 0, False: 0]
  |  Branch (1675:27): [True: 0, False: 0]
  |  Branch (1675:50): [True: 0, False: 0]
  ------------------
 1676|      0|          break;
 1677|      0|        n2++;
 1678|      0|        n3 = n;
 1679|      0|      }
 1680|    154|    }
 1681|       |
 1682|    324|    if ((n == wl) && (n3 > 0) && (n - n3 > 3))
  ------------------
  |  Branch (1682:9): [True: 20, False: 304]
  |  Branch (1682:22): [True: 0, False: 20]
  |  Branch (1682:34): [True: 0, False: 0]
  ------------------
 1683|      0|      return slst;
 1684|    324|    if ((n == wl) || ((n > 0) && ((scw[n] == '%') || (scw[n] == '\xB0')) && checkword(scw.substr(n), nullptr, nullptr, suggest_start))) {
  ------------------
  |  Branch (1684:9): [True: 20, False: 304]
  |  Branch (1684:9): [True: 20, False: 304]
  |  Branch (1684:23): [True: 8, False: 296]
  |  Branch (1684:35): [True: 0, False: 8]
  |  Branch (1684:54): [True: 0, False: 8]
  |  Branch (1684:77): [True: 0, False: 0]
  ------------------
 1685|     20|      result.append(scw);
 1686|     20|      result.resize(n - 1);
 1687|     20|      if (n == wl)
  ------------------
  |  Branch (1687:11): [True: 20, False: 0]
  ------------------
 1688|     20|        cat_result(result, pSMgr->suggest_morph(scw.substr(n - 1)));
 1689|      0|      else {
 1690|      0|        std::string chunk = scw.substr(n - 1, 1);
 1691|      0|        cat_result(result, pSMgr->suggest_morph(chunk));
 1692|      0|        result.push_back('+');  // XXX SPEC. MORPHCODE
 1693|      0|        cat_result(result, pSMgr->suggest_morph(scw.substr(n)));
 1694|      0|      }
 1695|     20|      return line_tok(result, MSEP_REC);
  ------------------
  |  |  122|     20|#define MSEP_REC '\n'
  ------------------
 1696|     20|    }
 1697|    324|  }
 1698|       |  // END OF LANG_hu section
 1699|       |
 1700|  5.96k|  switch (captype) {
  ------------------
  |  Branch (1700:11): [True: 5.96k, False: 0]
  ------------------
 1701|    289|    case HUHCAP:
  ------------------
  |  |   95|    289|#define HUHCAP 3
  ------------------
  |  Branch (1701:5): [True: 289, False: 5.67k]
  ------------------
 1702|    627|    case HUHINITCAP:
  ------------------
  |  |   96|    627|#define HUHINITCAP 4
  ------------------
  |  Branch (1702:5): [True: 338, False: 5.62k]
  ------------------
 1703|  3.18k|    case NOCAP: {
  ------------------
  |  |   92|  3.18k|#define NOCAP 0
  ------------------
  |  Branch (1703:5): [True: 2.55k, False: 3.40k]
  ------------------
 1704|  3.18k|      cat_result(result, pSMgr->suggest_morph(scw));
 1705|  3.18k|      if (abbv) {
  ------------------
  |  Branch (1705:11): [True: 289, False: 2.89k]
  ------------------
 1706|    289|        std::string u8buffer(scw);
 1707|    289|        u8buffer.push_back('.');
 1708|    289|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1709|    289|      }
 1710|  3.18k|      break;
 1711|    627|    }
 1712|  1.72k|    case INITCAP: {
  ------------------
  |  |   93|  1.72k|#define INITCAP 1
  ------------------
  |  Branch (1712:5): [True: 1.72k, False: 4.23k]
  ------------------
 1713|  1.72k|      mkallsmall2(scw, sunicw);
 1714|  1.72k|      std::string u8buffer(scw);
 1715|  1.72k|      mkinitcap2(scw, sunicw);
 1716|  1.72k|      cat_result(result, pSMgr->suggest_morph(u8buffer));
 1717|  1.72k|      cat_result(result, pSMgr->suggest_morph(scw));
 1718|  1.72k|      if (abbv) {
  ------------------
  |  Branch (1718:11): [True: 183, False: 1.54k]
  ------------------
 1719|    183|        u8buffer.push_back('.');
 1720|    183|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1721|       |
 1722|    183|        u8buffer = scw;
 1723|    183|        u8buffer.push_back('.');
 1724|       |
 1725|    183|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1726|    183|      }
 1727|  1.72k|      break;
 1728|    627|    }
 1729|  1.04k|    case ALLCAP: {
  ------------------
  |  |   94|  1.04k|#define ALLCAP 2
  ------------------
  |  Branch (1729:5): [True: 1.04k, False: 4.91k]
  ------------------
 1730|  1.04k|      cat_result(result, pSMgr->suggest_morph(scw));
 1731|  1.04k|      if (abbv) {
  ------------------
  |  Branch (1731:11): [True: 110, False: 938]
  ------------------
 1732|    110|        std::string u8buffer(scw);
 1733|    110|        u8buffer.push_back('.');
 1734|    110|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1735|    110|      }
 1736|  1.04k|      mkallsmall2(scw, sunicw);
 1737|  1.04k|      std::string u8buffer(scw);
 1738|  1.04k|      mkinitcap2(scw, sunicw);
 1739|       |
 1740|  1.04k|      cat_result(result, pSMgr->suggest_morph(u8buffer));
 1741|  1.04k|      cat_result(result, pSMgr->suggest_morph(scw));
 1742|  1.04k|      if (abbv) {
  ------------------
  |  Branch (1742:11): [True: 110, False: 938]
  ------------------
 1743|    110|        u8buffer.push_back('.');
 1744|    110|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1745|       |
 1746|    110|        u8buffer = scw;
 1747|    110|        u8buffer.push_back('.');
 1748|       |
 1749|    110|        cat_result(result, pSMgr->suggest_morph(u8buffer));
 1750|    110|      }
 1751|  1.04k|      break;
 1752|    627|    }
 1753|  5.96k|  }
 1754|       |
 1755|  5.96k|  if (!result.empty()) {
  ------------------
  |  Branch (1755:7): [True: 2.09k, False: 3.86k]
  ------------------
 1756|       |    // word reversing wrapper for complex prefixes
 1757|  2.09k|    if (complexprefixes) {
  ------------------
  |  Branch (1757:9): [True: 137, False: 1.95k]
  ------------------
 1758|    137|      if (utf8)
  ------------------
  |  Branch (1758:11): [True: 0, False: 137]
  ------------------
 1759|      0|        reverseword_utf(result);
 1760|    137|      else
 1761|    137|        reverseword(result);
 1762|    137|    }
 1763|  2.09k|    return line_tok(result, MSEP_REC);
  ------------------
  |  |  122|  2.09k|#define MSEP_REC '\n'
  ------------------
 1764|  2.09k|  }
 1765|       |
 1766|       |  // compound word with dash (HU) I18n
 1767|       |  // LANG_hu section: set dash information for suggestions
 1768|       |
 1769|  3.86k|  size_t dash_pos = langnum == LANG_hu ? scw.find('-') : std::string::npos;
  ------------------
  |  Branch (1769:21): [True: 240, False: 3.62k]
  ------------------
 1770|  3.86k|  if (dash_pos != std::string::npos) {
  ------------------
  |  Branch (1770:7): [True: 20, False: 3.84k]
  ------------------
 1771|     20|    int nresult = 0;
 1772|       |
 1773|     20|    std::string part1 = scw.substr(0, dash_pos), part2 = scw.substr(dash_pos + 1);
 1774|       |
 1775|       |    // examine 2 sides of the dash
 1776|     20|    if (part2.empty()) {  // base word ending with dash
  ------------------
  |  Branch (1776:9): [True: 6, False: 14]
  ------------------
 1777|      6|      if (spell(part1, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1777:11): [True: 1, False: 5]
  ------------------
 1778|      1|        std::string p = pSMgr->suggest_morph(part1);
 1779|      1|        if (!p.empty()) {
  ------------------
  |  Branch (1779:13): [True: 0, False: 1]
  ------------------
 1780|      0|          slst = line_tok(p, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1781|      0|          return slst;
 1782|      0|        }
 1783|      1|      }
 1784|     14|    } else if (part2.size() == 1 && part2[0] == 'e') {  // XXX (HU) -e hat.
  ------------------
  |  Branch (1784:16): [True: 1, False: 13]
  |  Branch (1784:37): [True: 0, False: 1]
  ------------------
 1785|      0|      if (spell(part1, candidate_stack, nullptr, nullptr, suggest_start) &&
  ------------------
  |  Branch (1785:11): [True: 0, False: 0]
  |  Branch (1785:11): [True: 0, False: 0]
  ------------------
 1786|      0|          (spell("-e", candidate_stack, nullptr, nullptr, suggest_start))) {
  ------------------
  |  Branch (1786:11): [True: 0, False: 0]
  ------------------
 1787|      0|        std::string st = pSMgr->suggest_morph(part1);
 1788|      0|        if (!st.empty()) {
  ------------------
  |  Branch (1788:13): [True: 0, False: 0]
  ------------------
 1789|      0|          result.append(st);
 1790|      0|        }
 1791|      0|        result.push_back('+');  // XXX spec. separator in MORPHCODE
 1792|      0|        st = pSMgr->suggest_morph("-e");
 1793|      0|        if (!st.empty()) {
  ------------------
  |  Branch (1793:13): [True: 0, False: 0]
  ------------------
 1794|      0|          result.append(st);
 1795|      0|        }
 1796|      0|        return line_tok(result, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1797|      0|      }
 1798|     14|    } else {
 1799|       |      // first word ending with dash: word- XXX ???
 1800|     14|      part1.push_back(' ');
 1801|     14|      nresult = spell(part1, candidate_stack, nullptr, nullptr, suggest_start);
 1802|     14|      part1.erase(part1.size() - 1);
 1803|     14|      if (nresult && spell(part2, candidate_stack, nullptr, nullptr, suggest_start) &&
  ------------------
  |  Branch (1803:11): [True: 0, False: 14]
  |  Branch (1803:22): [True: 0, False: 0]
  ------------------
 1804|      0|          ((part2.size() > 1) || ((part2[0] > '0') && (part2[0] < '9')))) {
  ------------------
  |  Branch (1804:12): [True: 0, False: 0]
  |  Branch (1804:35): [True: 0, False: 0]
  |  Branch (1804:55): [True: 0, False: 0]
  ------------------
 1805|      0|        std::string st = pSMgr->suggest_morph(part1);
 1806|      0|        if (!st.empty()) {
  ------------------
  |  Branch (1806:13): [True: 0, False: 0]
  ------------------
 1807|      0|          result.append(st);
 1808|      0|          result.push_back('+');  // XXX spec. separator in MORPHCODE
 1809|      0|        }
 1810|      0|        st = pSMgr->suggest_morph(part2);
 1811|      0|        if (!st.empty()) {
  ------------------
  |  Branch (1811:13): [True: 0, False: 0]
  ------------------
 1812|      0|          result.append(st);
 1813|      0|        }
 1814|      0|        return line_tok(result, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1815|      0|      }
 1816|     14|    }
 1817|       |    // affixed number in correct word
 1818|     20|    if (nresult && (dash_pos > 0) &&
  ------------------
  |  Branch (1818:9): [True: 0, False: 20]
  |  Branch (1818:20): [True: 0, False: 0]
  ------------------
 1819|      0|        (((scw[dash_pos - 1] <= '9') && (scw[dash_pos - 1] >= '0')) ||
  ------------------
  |  Branch (1819:11): [True: 0, False: 0]
  |  Branch (1819:41): [True: 0, False: 0]
  ------------------
 1820|      0|         (scw[dash_pos - 1] == '.'))) {
  ------------------
  |  Branch (1820:10): [True: 0, False: 0]
  ------------------
 1821|      0|      n = 1;
 1822|      0|      if (scw[dash_pos - n] == '.')
  ------------------
  |  Branch (1822:11): [True: 0, False: 0]
  ------------------
 1823|      0|        n++;
 1824|       |      // search first not a number character to left from dash
 1825|      0|      while ((dash_pos >= n) && ((scw[dash_pos - n] == '0') || (n < 3)) &&
  ------------------
  |  Branch (1825:14): [True: 0, False: 0]
  |  Branch (1825:34): [True: 0, False: 0]
  |  Branch (1825:64): [True: 0, False: 0]
  ------------------
 1826|      0|             (n < 6)) {
  ------------------
  |  Branch (1826:14): [True: 0, False: 0]
  ------------------
 1827|      0|        n++;
 1828|      0|      }
 1829|      0|      if (dash_pos < n)
  ------------------
  |  Branch (1829:11): [True: 0, False: 0]
  ------------------
 1830|      0|        n--;
 1831|       |      // numbers: valami1000000-hoz
 1832|       |      // examine 100000-hoz, 10000-hoz 1000-hoz, 10-hoz,
 1833|       |      // 56-hoz, 6-hoz
 1834|      0|      for (; n >= 1; n--) {
  ------------------
  |  Branch (1834:14): [True: 0, False: 0]
  ------------------
 1835|      0|        if (scw[dash_pos - n] < '0' || scw[dash_pos - n] > '9') {
  ------------------
  |  Branch (1835:13): [True: 0, False: 0]
  |  Branch (1835:40): [True: 0, False: 0]
  ------------------
 1836|      0|            continue;
 1837|      0|        }
 1838|      0|        std::string chunk = scw.substr(dash_pos - n);
 1839|      0|        if (checkword(chunk, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1839:13): [True: 0, False: 0]
  ------------------
 1840|      0|          result.append(chunk);
 1841|      0|          std::string st = pSMgr->suggest_morph(chunk);
 1842|      0|          if (!st.empty()) {
  ------------------
  |  Branch (1842:15): [True: 0, False: 0]
  ------------------
 1843|      0|            result.append(st);
 1844|      0|          }
 1845|      0|          return line_tok(result, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1846|      0|        }
 1847|      0|      }
 1848|      0|    }
 1849|     20|  }
 1850|  3.86k|  return slst;
 1851|  3.86k|}
_ZN12HunspellImpl8generateERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS0_6vectorIS6_NS4_IS6_EEEE:
 1853|  5.77k|std::vector<std::string> HunspellImpl::generate(const std::string& word, const std::vector<std::string>& pl) {
 1854|  5.77k|  std::vector<std::string> slst;
 1855|  5.77k|  if (!pSMgr || pl.empty())
  ------------------
  |  Branch (1855:7): [True: 0, False: 5.77k]
  |  Branch (1855:17): [True: 420, False: 5.35k]
  ------------------
 1856|    420|    return slst;
 1857|  5.35k|  std::vector<std::string> pl2 = analyze(word);
 1858|  5.35k|  int captype = NOCAP, abbv = 0;
  ------------------
  |  |   92|  5.35k|#define NOCAP 0
  ------------------
 1859|  5.35k|  std::string cw;
 1860|  5.35k|  cleanword(cw, word, &captype, &abbv);
 1861|  5.35k|  std::string result;
 1862|       |
 1863|  5.35k|  auto suggest_start = std::chrono::steady_clock::now();
 1864|   351k|  for (const auto& i : pl) {
  ------------------
  |  Branch (1864:22): [True: 351k, False: 5.35k]
  ------------------
 1865|   351k|    cat_result(result, pSMgr->suggest_gen(pl2, i, suggest_start));
 1866|   351k|  }
 1867|       |
 1868|  5.35k|  if (!result.empty()) {
  ------------------
  |  Branch (1868:7): [True: 0, False: 5.35k]
  ------------------
 1869|       |    // allcap
 1870|      0|    if (captype == ALLCAP)
  ------------------
  |  |   94|      0|#define ALLCAP 2
  ------------------
  |  Branch (1870:9): [True: 0, False: 0]
  ------------------
 1871|      0|      mkallcap(result);
 1872|       |
 1873|       |    // line split
 1874|      0|    slst = line_tok(result, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1875|       |
 1876|       |    // capitalize
 1877|      0|    if (captype == INITCAP || captype == HUHINITCAP) {
  ------------------
  |  |   93|      0|#define INITCAP 1
  ------------------
                  if (captype == INITCAP || captype == HUHINITCAP) {
  ------------------
  |  |   96|      0|#define HUHINITCAP 4
  ------------------
  |  Branch (1877:9): [True: 0, False: 0]
  |  Branch (1877:31): [True: 0, False: 0]
  ------------------
 1878|      0|      for (auto& str : slst) {
  ------------------
  |  Branch (1878:22): [True: 0, False: 0]
  ------------------
 1879|      0|        mkinitcap(str);
 1880|      0|      }
 1881|      0|    }
 1882|       |
 1883|       |    // temporary filtering of prefix related errors (eg.
 1884|       |    // generate("undrinkable", "eats") --> "undrinkables" and "*undrinks")
 1885|      0|    auto it = slst.begin();
 1886|      0|    while (it != slst.end()) {
  ------------------
  |  Branch (1886:12): [True: 0, False: 0]
  ------------------
 1887|      0|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|      0|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1887:11): [True: 0, False: 0]
  ------------------
 1888|      0|        break;
 1889|      0|      std::vector<std::string> candidate_stack;
 1890|      0|      if (!spell(*it, candidate_stack, nullptr, nullptr, suggest_start)) {
  ------------------
  |  Branch (1890:11): [True: 0, False: 0]
  ------------------
 1891|      0|        it = slst.erase(it);
 1892|      0|      } else  {
 1893|      0|        ++it;
 1894|      0|      }
 1895|      0|    }
 1896|      0|  }
 1897|  5.35k|  return slst;
 1898|  5.77k|}
_ZN12HunspellImpl8generateERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
 1900|    551|std::vector<std::string> HunspellImpl::generate(const std::string& word, const std::string& pattern) {
 1901|    551|  std::vector<std::string> pl = analyze(pattern);
 1902|    551|  std::vector<std::string> slst = generate(word, pl);
 1903|    551|  uniqlist(slst);
 1904|    551|  return slst;
 1905|    551|}
_ZN12HunspellImpl11get_xml_parERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEm:
 1908|   438k|std::string HunspellImpl::get_xml_par(const std::string& in_par, std::string::size_type pos) {
 1909|   438k|  std::string dest;
 1910|   438k|  if (pos == std::string::npos)
  ------------------
  |  Branch (1910:7): [True: 6.40k, False: 432k]
  ------------------
 1911|  6.40k|    return dest;
 1912|   432k|  const char* par = in_par.c_str() + pos;
 1913|   432k|  char end = *par;
 1914|   432k|  if (end == '>')
  ------------------
  |  Branch (1914:7): [True: 429k, False: 3.17k]
  ------------------
 1915|   429k|    end = '<';
 1916|  3.17k|  else if (end != '\'' && end != '"')
  ------------------
  |  Branch (1916:12): [True: 2.64k, False: 532]
  |  Branch (1916:27): [True: 1.21k, False: 1.42k]
  ------------------
 1917|  1.21k|    return dest;  // bad XML
 1918|  11.8M|  for (par++; *par != '\0' && *par != end; ++par) {
  ------------------
  |  Branch (1918:15): [True: 11.8M, False: 33.7k]
  |  Branch (1918:31): [True: 11.4M, False: 397k]
  ------------------
 1919|  11.4M|    dest.push_back(*par);
 1920|  11.4M|  }
 1921|   431k|  mystrrep(dest, "&lt;", "<");
 1922|   431k|  mystrrep(dest, "&amp;", "&");
 1923|   431k|  return dest;
 1924|   432k|}
_ZN12HunspellImpl11get_xml_posERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmPKc:
 1940|  66.9k|std::string::size_type HunspellImpl::get_xml_pos(const std::string& s, std::string::size_type pos, const char* attr) {
 1941|  66.9k|  if (pos == std::string::npos)
  ------------------
  |  Branch (1941:7): [True: 0, False: 66.9k]
  ------------------
 1942|      0|    return std::string::npos;
 1943|       |
 1944|  66.9k|  std::string::size_type endpos = s.find('>', pos);
 1945|  66.9k|  if (attr == nullptr)
  ------------------
  |  Branch (1945:7): [True: 0, False: 66.9k]
  ------------------
 1946|      0|    return endpos;
 1947|   212k|  while (true) {
  ------------------
  |  Branch (1947:10): [True: 212k, Folded]
  ------------------
 1948|   212k|    pos = s.find(attr, pos);
 1949|   212k|    if (pos == std::string::npos || pos >= endpos)
  ------------------
  |  Branch (1949:9): [True: 3.72k, False: 208k]
  |  Branch (1949:37): [True: 1.52k, False: 207k]
  ------------------
 1950|  5.24k|      return std::string::npos;
 1951|   207k|    if (pos == 0 || s[pos - 1] == ' ' || s[pos - 1] == '\n')
  ------------------
  |  Branch (1951:9): [True: 0, False: 207k]
  |  Branch (1951:21): [True: 1.74k, False: 205k]
  |  Branch (1951:42): [True: 59.9k, False: 145k]
  ------------------
 1952|  61.7k|      break;
 1953|   145k|    pos += strlen(attr);
 1954|   145k|  }
 1955|  61.7k|  return pos + strlen(attr);
 1956|  66.9k|}
_ZN12HunspellImpl13check_xml_parERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmPKcSA_:
 1960|  66.9k|                                const char* value) {
 1961|  66.9k|  const std::string cw = get_xml_par(q, get_xml_pos(q, pos, attr));
 1962|  66.9k|  return cw == value ? 1 : 0;
  ------------------
  |  Branch (1962:10): [True: 16.4k, False: 50.5k]
  ------------------
 1963|  66.9k|}
_ZN12HunspellImpl12get_xml_listERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEmPKc:
 1965|  6.09k|std::vector<std::string> HunspellImpl::get_xml_list(const std::string& list, std::string::size_type pos, const char* tag) {
 1966|  6.09k|  std::vector<std::string> slst;
 1967|  6.09k|  if (pos == std::string::npos)
  ------------------
  |  Branch (1967:7): [True: 57, False: 6.04k]
  ------------------
 1968|     57|    return slst;
 1969|   357k|  while (true) {
  ------------------
  |  Branch (1969:10): [True: 357k, Folded]
  ------------------
 1970|   357k|    pos = list.find(tag, pos);
 1971|   357k|    if (pos == std::string::npos)
  ------------------
  |  Branch (1971:9): [True: 5.03k, False: 352k]
  ------------------
 1972|  5.03k|        break;
 1973|   352k|    std::string cw = get_xml_par(list, pos + strlen(tag) - 1);
 1974|   352k|    if (cw.empty()) {
  ------------------
  |  Branch (1974:9): [True: 1.00k, False: 351k]
  ------------------
 1975|  1.00k|      break;
 1976|  1.00k|    }
 1977|   351k|    slst.push_back(std::move(cw));
 1978|   351k|    ++pos;
 1979|   351k|  }
 1980|  6.04k|  return slst;
 1981|  6.09k|}
_ZN12HunspellImpl7spellmlERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1983|  20.6k|std::vector<std::string> HunspellImpl::spellml(const std::string& in_word) {
 1984|  20.6k|  std::vector<std::string> slst;
 1985|       |
 1986|  20.6k|  std::string::size_type qpos = in_word.find("<query");
 1987|  20.6k|  if (qpos == std::string::npos)
  ------------------
  |  Branch (1987:7): [True: 500, False: 20.1k]
  ------------------
 1988|    500|    return slst;  // bad XML input
 1989|       |
 1990|  20.1k|  std::string::size_type q2pos = in_word.find('>', qpos);
 1991|  20.1k|  if (q2pos == std::string::npos)
  ------------------
  |  Branch (1991:7): [True: 209, False: 19.9k]
  ------------------
 1992|    209|    return slst;  // bad XML input
 1993|       |
 1994|  19.9k|  q2pos = in_word.find("<word", q2pos);
 1995|  19.9k|  if (q2pos == std::string::npos)
  ------------------
  |  Branch (1995:7): [True: 304, False: 19.6k]
  ------------------
 1996|    304|    return slst;  // bad XML input
 1997|       |
 1998|  19.6k|  if (check_xml_par(in_word, qpos, "type=", "analyze")) {
  ------------------
  |  Branch (1998:7): [True: 551, False: 19.1k]
  ------------------
 1999|    551|    std::string cw = get_xml_par(in_word, in_word.find('>', q2pos));
 2000|    551|    if (!cw.empty())
  ------------------
  |  Branch (2000:9): [True: 152, False: 399]
  ------------------
 2001|    152|      slst = analyze(cw);
 2002|    551|    if (slst.empty())
  ------------------
  |  Branch (2002:9): [True: 530, False: 21]
  ------------------
 2003|    530|      return slst;
 2004|       |    // convert the result to <code><a>ana1</a><a>ana2</a></code> format
 2005|     21|    std::string r;
 2006|     21|    r.append("<code>");
 2007|     21|    for (auto entry : slst) {
  ------------------
  |  Branch (2007:21): [True: 21, False: 21]
  ------------------
 2008|     21|      r.append("<a>");
 2009|       |
 2010|     21|      mystrrep(entry, "\t", " ");
 2011|     21|      mystrrep(entry, "&", "&amp;");
 2012|     21|      mystrrep(entry, "<", "&lt;");
 2013|     21|      r.append(entry);
 2014|       |
 2015|     21|      r.append("</a>");
 2016|     21|    }
 2017|     21|    r.append("</code>");
 2018|     21|    slst.clear();
 2019|     21|    slst.push_back(std::move(r));
 2020|     21|    return slst;
 2021|  19.1k|  } else if (check_xml_par(in_word, qpos, "type=", "stem")) {
  ------------------
  |  Branch (2021:14): [True: 1.53k, False: 17.5k]
  ------------------
 2022|  1.53k|    std::string cw = get_xml_par(in_word, in_word.find('>', q2pos));
 2023|  1.53k|    if (!cw.empty())
  ------------------
  |  Branch (2023:9): [True: 1.04k, False: 494]
  ------------------
 2024|  1.04k|      return stem(cw);
 2025|  17.5k|  } else if (check_xml_par(in_word, qpos, "type=", "generate")) {
  ------------------
  |  Branch (2025:14): [True: 7.01k, False: 10.5k]
  ------------------
 2026|  7.01k|    std::string cw = get_xml_par(in_word, in_word.find('>', q2pos));
 2027|  7.01k|    if (cw.empty())
  ------------------
  |  Branch (2027:9): [True: 171, False: 6.84k]
  ------------------
 2028|    171|      return slst;
 2029|  6.84k|    std::string::size_type q3pos = in_word.find("<word", q2pos + 1);
 2030|  6.84k|    if (q3pos != std::string::npos) {
  ------------------
  |  Branch (2030:9): [True: 627, False: 6.21k]
  ------------------
 2031|    627|      std::string cw2 = get_xml_par(in_word, in_word.find('>', q3pos));
 2032|    627|      if (!cw2.empty()) {
  ------------------
  |  Branch (2032:11): [True: 551, False: 76]
  ------------------
 2033|    551|        return generate(cw, cw2);
 2034|    551|      }
 2035|  6.21k|    } else {
 2036|  6.21k|      q2pos = in_word.find("<code", q2pos + 1);
 2037|  6.21k|      if (q2pos != std::string::npos) {
  ------------------
  |  Branch (2037:11): [True: 6.09k, False: 114]
  ------------------
 2038|  6.09k|        std::vector<std::string> slst2 = get_xml_list(in_word, in_word.find('>', q2pos), "<a>");
 2039|  6.09k|        if (!slst2.empty()) {
  ------------------
  |  Branch (2039:13): [True: 5.22k, False: 874]
  ------------------
 2040|  5.22k|          slst = generate(cw, slst2);
 2041|  5.22k|          uniqlist(slst);
 2042|  5.22k|          return slst;
 2043|  5.22k|        }
 2044|  6.09k|      }
 2045|  6.21k|    }
 2046|  10.5k|  } else if (check_xml_par(in_word, qpos, "type=", "add")) {
  ------------------
  |  Branch (2046:14): [True: 7.32k, False: 3.24k]
  ------------------
 2047|  7.32k|    std::string cw = get_xml_par(in_word, in_word.find('>', q2pos));
 2048|  7.32k|    if (cw.empty())
  ------------------
  |  Branch (2048:9): [True: 114, False: 7.21k]
  ------------------
 2049|    114|      return slst;
 2050|  7.21k|    std::string::size_type q3pos = in_word.find("<word", q2pos + 1);
 2051|  7.21k|    if (q3pos != std::string::npos) {
  ------------------
  |  Branch (2051:9): [True: 2.22k, False: 4.99k]
  ------------------
 2052|  2.22k|      std::string cw2 = get_xml_par(in_word, in_word.find('>', q3pos));
 2053|  2.22k|      if (!cw2.empty()) {
  ------------------
  |  Branch (2053:11): [True: 2.03k, False: 190]
  ------------------
 2054|  2.03k|        add_with_affix(cw, cw2);
 2055|  2.03k|      } else {
 2056|    190|        add(cw);
 2057|    190|      }
 2058|  4.99k|    } else {
 2059|  4.99k|        add(cw);
 2060|  4.99k|    }
 2061|  7.21k|  }
 2062|  12.0k|  return slst;
 2063|  19.6k|}
_ZN8HunspellC2EPKcS1_S1_:
 2213|     38|  : m_Impl(new HunspellImpl(affpath, dpath, key)) {
 2214|     38|}
_ZN8Hunspell5spellERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEPiPS6_:
 2225|  60.9k|bool Hunspell::spell(const std::string& word, int* info, std::string* root) {
 2226|  60.9k|  std::vector<std::string> candidate_stack;
 2227|  60.9k|  return m_Impl->spell(word, candidate_stack, info, root,
 2228|  60.9k|                       std::chrono::steady_clock::now());
 2229|  60.9k|}
_ZN8Hunspell7suggestERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 2231|  60.4k|std::vector<std::string> Hunspell::suggest(const std::string& word) {
 2232|  60.4k|  return m_Impl->suggest(word);
 2233|  60.4k|}

_Z16init_phonet_hashR10phonetable:
   38|      2|void init_phonet_hash(phonetable& parms) {
   39|      2|  memset(parms.hash, 0xff, HASHSIZE * sizeof(int));
  ------------------
  |  |   33|      2|#define HASHSIZE 256
  ------------------
   40|       |
   41|    212|  for (int i = 0; parms.rules[i][0] != '\0'; i += 2) {
  ------------------
  |  Branch (41:19): [True: 210, False: 2]
  ------------------
   42|       |    /**  set hash value  **/
   43|    210|    int k = (unsigned char)parms.rules[i][0];
   44|       |
   45|    210|    if (parms.hash[k] < 0) {
  ------------------
  |  Branch (45:9): [True: 54, False: 156]
  ------------------
   46|     54|      parms.hash[k] = i;
   47|     54|    }
   48|    210|  }
   49|      2|}
_Z6phonetRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEER10phonetable:
   69|  9.27k|std::string phonet(const std::string& inword, phonetable& parms) {
   70|       |
   71|  9.27k|  int i, k = 0, p, z, k0, n0, p0 = -333;
   72|  9.27k|  char c;
   73|  9.27k|  using uchar = unsigned char;
   74|       |
   75|  9.27k|  size_t len = inword.size();
   76|  9.27k|  if (len > MAXPHONETUTF8LEN)
  ------------------
  |  |   35|  9.27k|#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4)
  |  |  ------------------
  |  |  |  |   34|  9.27k|#define MAXPHONETLEN 256
  |  |  ------------------
  ------------------
  |  Branch (76:7): [True: 0, False: 9.27k]
  ------------------
   77|      0|    return {};
   78|  9.27k|  char word[MAXPHONETUTF8LEN + 1];
   79|  9.27k|  strncpy(word, inword.c_str(), MAXPHONETUTF8LEN);
  ------------------
  |  |   35|  9.27k|#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4)
  |  |  ------------------
  |  |  |  |   34|  9.27k|#define MAXPHONETLEN 256
  |  |  ------------------
  ------------------
   80|  9.27k|  word[MAXPHONETUTF8LEN] = '\0';
  ------------------
  |  |   35|  9.27k|#define MAXPHONETUTF8LEN (MAXPHONETLEN * 4)
  |  |  ------------------
  |  |  |  |   34|  9.27k|#define MAXPHONETLEN 256
  |  |  ------------------
  ------------------
   81|       |
   82|  9.27k|  std::string target;
   83|       |  /**  check word  **/
   84|  9.27k|  i = z = 0;
   85|  84.3k|  while ((c = word[i]) != '\0') {
  ------------------
  |  Branch (85:10): [True: 75.0k, False: 9.27k]
  ------------------
   86|  75.0k|    int n = parms.hash[(uchar)c];
   87|  75.0k|    int z0 = 0;
   88|       |
   89|  75.0k|    if (n >= 0 && !parms.rules[n].empty()) {
  ------------------
  |  Branch (89:9): [True: 23.0k, False: 52.0k]
  |  Branch (89:19): [True: 23.0k, False: 0]
  ------------------
   90|       |      /**  check all rules for the same letter  **/
   91|  62.6k|      while (parms.rules[n][0] == c) {
  ------------------
  |  Branch (91:14): [True: 60.3k, False: 2.27k]
  ------------------
   92|       |        /**  check whole string  **/
   93|  60.3k|        k = 1; /** number of found letters  **/
   94|  60.3k|        p = 5; /** default priority  **/
   95|  60.3k|        const char*s = parms.rules[n].c_str();
   96|  60.3k|        s++; /**  important for (see below)  "*(s-1)"  **/
   97|       |
   98|  62.1k|        while (*s != '\0' && word[i + k] == *s && !isdigit((unsigned char)*s) && strchr("(-<^$", *s) == nullptr) {
  ------------------
  |  Branch (98:16): [True: 43.2k, False: 18.9k]
  |  Branch (98:30): [True: 1.87k, False: 41.3k]
  |  Branch (98:51): [True: 1.87k, False: 0]
  |  Branch (98:82): [True: 1.83k, False: 40]
  ------------------
   99|  1.83k|          k++;
  100|  1.83k|          s++;
  101|  1.83k|        }
  102|  60.3k|        if (*s == '(') {
  ------------------
  |  Branch (102:13): [True: 4.59k, False: 55.7k]
  ------------------
  103|       |          /**  check letters in "(..)"  **/
  104|  4.59k|          if (myisalpha(word[i + k])  // ...could be implied?
  ------------------
  |  Branch (104:15): [True: 3.10k, False: 1.48k]
  ------------------
  105|  3.10k|              && strchr(s + 1, word[i + k]) != nullptr) {
  ------------------
  |  Branch (105:18): [True: 251, False: 2.85k]
  ------------------
  106|    251|            k++;
  107|  1.33k|            while (*s && *s != ')')
  ------------------
  |  Branch (107:20): [True: 1.33k, False: 0]
  |  Branch (107:26): [True: 1.08k, False: 251]
  ------------------
  108|  1.08k|              s++;
  109|    251|            if (*s == ')')
  ------------------
  |  Branch (109:17): [True: 251, False: 0]
  ------------------
  110|    251|              s++;
  111|    251|          }
  112|  4.59k|        }
  113|  60.3k|        p0 = (int)*s;
  114|  60.3k|        k0 = k;
  115|  61.5k|        while (*s == '-' && k > 1) {
  ------------------
  |  Branch (115:16): [True: 1.16k, False: 60.3k]
  |  Branch (115:29): [True: 1.16k, False: 0]
  ------------------
  116|  1.16k|          k--;
  117|  1.16k|          s++;
  118|  1.16k|        }
  119|  60.3k|        if (*s == '<')
  ------------------
  |  Branch (119:13): [True: 174, False: 60.1k]
  ------------------
  120|    174|          s++;
  121|  60.3k|        if (isdigit((unsigned char)*s)) {
  ------------------
  |  Branch (121:13): [True: 2, False: 60.3k]
  ------------------
  122|       |          /**  determine priority  **/
  123|      2|          p = *s - '0';
  124|      2|          s++;
  125|      2|        }
  126|  60.3k|        if (*s == '^' && *(s + 1) == '^')
  ------------------
  |  Branch (126:13): [True: 3.14k, False: 57.2k]
  |  Branch (126:26): [True: 0, False: 3.14k]
  ------------------
  127|      0|          s++;
  128|       |
  129|  60.3k|        if (*s == '\0' || (*s == '^' && (i == 0 || !myisalpha(word[i - 1])) &&
  ------------------
  |  Branch (129:13): [True: 20.2k, False: 40.0k]
  |  Branch (129:28): [True: 3.14k, False: 36.9k]
  |  Branch (129:42): [True: 122, False: 3.02k]
  |  Branch (129:52): [True: 764, False: 2.26k]
  ------------------
  130|    886|                           (*(s + 1) != '$' || (!myisalpha(word[i + k0])))) ||
  ------------------
  |  Branch (130:29): [True: 886, False: 0]
  |  Branch (130:48): [True: 0, False: 0]
  ------------------
  131|  39.1k|            (*s == '$' && i > 0 && myisalpha(word[i - 1]) &&
  ------------------
  |  Branch (131:14): [True: 0, False: 39.1k]
  |  Branch (131:27): [True: 0, False: 0]
  |  Branch (131:36): [True: 0, False: 0]
  ------------------
  132|  21.1k|             (!myisalpha(word[i + k0])))) {
  ------------------
  |  Branch (132:14): [True: 0, False: 0]
  ------------------
  133|       |          /**  search for followup rules, if:     **/
  134|       |          /**  parms.followup and k > 1  and  NO '-' in searchstring **/
  135|  21.1k|          char c0 = word[i + k - 1];
  136|  21.1k|          n0 = parms.hash[(uchar)c0];
  137|       |
  138|       |          //            if (parms.followup  &&  k > 1  &&  n0 >= 0
  139|  21.1k|          if (k > 1 && n0 >= 0 && p0 != (int)'-' && word[i + k] != '\0' && !parms.rules[n0].empty()) {
  ------------------
  |  Branch (139:15): [True: 648, False: 20.5k]
  |  Branch (139:24): [True: 648, False: 0]
  |  Branch (139:35): [True: 622, False: 26]
  |  Branch (139:53): [True: 553, False: 69]
  |  Branch (139:76): [True: 553, False: 0]
  ------------------
  140|       |            /**  test follow-up rule for "word[i+k]"  **/
  141|  1.42k|            while (parms.rules[n0][0] == c0) {
  ------------------
  |  Branch (141:20): [True: 1.28k, False: 145]
  ------------------
  142|       |              /**  check whole string  **/
  143|  1.28k|              k0 = k;
  144|  1.28k|              p0 = 5;
  145|  1.28k|              s = parms.rules[n0].c_str();
  146|  1.28k|              s++;
  147|  1.69k|              while (*s != '\0' && word[i + k0] == *s && !isdigit((unsigned char)*s) && strchr("(-<^$", *s) == nullptr) {
  ------------------
  |  Branch (147:22): [True: 1.14k, False: 545]
  |  Branch (147:36): [True: 412, False: 735]
  |  Branch (147:58): [True: 412, False: 0]
  |  Branch (147:89): [True: 408, False: 4]
  ------------------
  148|    408|                k0++;
  149|    408|                s++;
  150|    408|              }
  151|  1.28k|              if (*s == '(') {
  ------------------
  |  Branch (151:19): [True: 12, False: 1.27k]
  ------------------
  152|       |                /**  check letters  **/
  153|     12|                if (myisalpha(word[i + k0]) && strchr(s + 1, word[i + k0]) != nullptr) {
  ------------------
  |  Branch (153:21): [True: 8, False: 4]
  |  Branch (153:48): [True: 0, False: 8]
  ------------------
  154|      0|                  k0++;
  155|      0|                  while (*s != ')' && *s != '\0')
  ------------------
  |  Branch (155:26): [True: 0, False: 0]
  |  Branch (155:39): [True: 0, False: 0]
  ------------------
  156|      0|                    s++;
  157|      0|                  if (*s == ')')
  ------------------
  |  Branch (157:23): [True: 0, False: 0]
  ------------------
  158|      0|                    s++;
  159|      0|                }
  160|     12|              }
  161|  1.28k|              while (*s == '-') {
  ------------------
  |  Branch (161:22): [True: 0, False: 1.28k]
  ------------------
  162|       |                /**  "k0" gets NOT reduced   **/
  163|       |                /**  because "if (k0 == k)"  **/
  164|      0|                s++;
  165|      0|              }
  166|  1.28k|              if (*s == '<')
  ------------------
  |  Branch (166:19): [True: 8, False: 1.27k]
  ------------------
  167|      8|                s++;
  168|  1.28k|              if (isdigit((unsigned char)*s)) {
  ------------------
  |  Branch (168:19): [True: 0, False: 1.28k]
  ------------------
  169|      0|                p0 = *s - '0';
  170|      0|                s++;
  171|      0|              }
  172|       |
  173|  1.28k|              if (*s == '\0'
  ------------------
  |  Branch (173:19): [True: 553, False: 731]
  ------------------
  174|       |                  /**  *s == '^' cuts  **/
  175|    731|                  || (*s == '$' && !myisalpha(word[i + k0]))) {
  ------------------
  |  Branch (175:23): [True: 0, False: 731]
  |  Branch (175:36): [True: 0, False: 0]
  ------------------
  176|    553|                if (k0 == k) {
  ------------------
  |  Branch (176:21): [True: 145, False: 408]
  ------------------
  177|       |                  /**  this is just a piece of the string  **/
  178|    145|                  n0 += 2;
  179|    145|                  continue;
  180|    145|                }
  181|       |
  182|    408|                if (p0 < p) {
  ------------------
  |  Branch (182:21): [True: 0, False: 408]
  ------------------
  183|       |                  /**  priority too low  **/
  184|      0|                  n0 += 2;
  185|      0|                  continue;
  186|      0|                }
  187|       |                /**  rule fits; stop search  **/
  188|    408|                break;
  189|    408|              }
  190|    731|              n0 += 2;
  191|    731|            } /**  End of "while (parms.rules[n0][0] == c0)"  **/
  192|       |
  193|    553|            if (p0 >= p && parms.rules[n0][0] == c0) {
  ------------------
  |  Branch (193:17): [True: 552, False: 1]
  |  Branch (193:28): [True: 408, False: 144]
  ------------------
  194|    408|              n += 2;
  195|    408|              continue;
  196|    408|            }
  197|    553|          } /** end of follow-up stuff **/
  198|       |
  199|       |          /**  replace string  **/
  200|  20.7k|          s = parms.rules[n + 1].c_str();
  201|  20.7k|          p0 = (!parms.rules[n].empty() && strchr(parms.rules[n].c_str() + 1, '<') != nullptr) ? 1 : 0;
  ------------------
  |  Branch (201:17): [True: 20.7k, False: 0]
  |  Branch (201:44): [True: 166, False: 20.6k]
  ------------------
  202|  20.7k|          if (p0 == 1 && z == 0) {
  ------------------
  |  Branch (202:15): [True: 166, False: 20.6k]
  |  Branch (202:26): [True: 166, False: 0]
  ------------------
  203|       |            /**  rule with '<' is used  **/
  204|    166|            if (!target.empty() && *s != '\0' &&
  ------------------
  |  Branch (204:17): [True: 137, False: 29]
  |  Branch (204:36): [True: 137, False: 0]
  ------------------
  205|    137|                (target[target.size()-1] == c || target[target.size()-1] == *s)) {
  ------------------
  |  Branch (205:18): [True: 0, False: 137]
  |  Branch (205:50): [True: 0, False: 137]
  ------------------
  206|      0|              target.erase(target.size() - 1);
  207|      0|            }
  208|    166|            z0 = 1;
  209|    166|            z = 1;
  210|    166|            k0 = 0;
  211|    332|            while (*s != '\0' && word[i + k0] != '\0') {
  ------------------
  |  Branch (211:20): [True: 166, False: 166]
  |  Branch (211:34): [True: 166, False: 0]
  ------------------
  212|    166|              word[i + k0] = *s;
  213|    166|              k0++;
  214|    166|              s++;
  215|    166|            }
  216|    166|            if (k > k0)
  ------------------
  |  Branch (216:17): [True: 4, False: 162]
  ------------------
  217|      4|              strmove(&word[0] + i + k0, &word[0] + i + k);
  218|       |
  219|       |            /**  new "actual letter"  **/
  220|    166|            c = word[i];
  221|  20.6k|          } else { /** no '<' rule used **/
  222|  20.6k|            i += k - 1;
  223|  20.6k|            z = 0;
  224|  20.9k|            while (*s != '\0' && *(s + 1) != '\0' && target.size() < len) {
  ------------------
  |  Branch (224:20): [True: 19.8k, False: 1.09k]
  |  Branch (224:34): [True: 458, False: 19.4k]
  |  Branch (224:54): [True: 378, False: 80]
  ------------------
  225|    378|              if (target.empty() || target[target.size()-1] != *s) {
  ------------------
  |  Branch (225:19): [True: 10, False: 368]
  |  Branch (225:37): [True: 170, False: 198]
  ------------------
  226|    180|                target.push_back(*s);
  227|    180|              }
  228|    378|              s++;
  229|    378|            }
  230|       |            /**  new "actual letter"  **/
  231|  20.6k|            c = *s;
  232|  20.6k|            if (!parms.rules[n].empty() && strstr(parms.rules[n].c_str() + 1, "^^") != nullptr) {
  ------------------
  |  Branch (232:17): [True: 20.6k, False: 0]
  |  Branch (232:44): [True: 0, False: 20.6k]
  ------------------
  233|      0|              if (c != '\0') {
  ------------------
  |  Branch (233:19): [True: 0, False: 0]
  ------------------
  234|      0|                target.push_back(c);
  235|      0|              }
  236|      0|              strmove(&word[0], &word[0] + i + 1);
  237|      0|              i = 0;
  238|      0|              z0 = 1;
  239|      0|            }
  240|  20.6k|          }
  241|  20.7k|          break;
  242|  21.1k|        } /** end of follow-up stuff **/
  243|  39.1k|        n += 2;
  244|  39.1k|      } /**  end of while (parms.rules[n][0] == c)  **/
  245|  23.0k|    }   /**  end of if (n >= 0)  **/
  246|  75.0k|    if (z0 == 0) {
  ------------------
  |  Branch (246:9): [True: 74.9k, False: 166]
  ------------------
  247|  74.9k|      if (k && !p0 && target.size() < len && c != '\0') {
  ------------------
  |  Branch (247:11): [True: 22.8k, False: 52.0k]
  |  Branch (247:16): [True: 20.6k, False: 2.27k]
  |  Branch (247:23): [True: 20.5k, False: 100]
  |  Branch (247:46): [True: 19.4k, False: 1.09k]
  ------------------
  248|       |        /**  condense only double letters  **/
  249|  19.4k|        target.push_back(c);
  250|       |        /// printf("\n setting \n");
  251|  19.4k|      }
  252|       |
  253|  74.9k|      i++;
  254|  74.9k|      z = 0;
  255|  74.9k|      k = 0;
  256|  74.9k|    }
  257|  75.0k|  } /**  end of   while ((c = word[i]) != '\0')  **/
  258|       |
  259|  9.27k|  return target;
  260|  9.27k|} /**  end of function "phonet"  **/
phonet.cxx:_ZL9myisalphac:
   59|  7.62k|static int myisalpha(char ch) {
   60|  7.62k|  if ((unsigned char)ch < 128)
  ------------------
  |  Branch (60:7): [True: 7.12k, False: 505]
  ------------------
   61|  7.12k|    return isalpha(ch);
   62|    505|  return 1;
   63|  7.62k|}
phonet.cxx:_ZL7strmovePcS_:
   53|      4|static inline void strmove(char* dest, char* src) {
   54|     98|  while (*src)
  ------------------
  |  Branch (54:10): [True: 94, False: 4]
  ------------------
   55|     94|    *dest++ = *src++;
   56|      4|  *dest = '\0';
   57|      4|}

_ZN7RepListC2Ei:
   79|      4|RepList::RepList(int n) {
   80|      4|  dat.reserve(std::min(n, 16384));
   81|      4|  can_use_trie = true;
   82|      4|}
_ZN7RepList4findEPKcm:
   90|     22|int RepList::find(const char* word, size_t max_len) {
   91|     22|  int p1 = 0;
   92|     22|  int p2 = dat.size() - 1;
   93|     22|  int ret = -1;
   94|     58|  while (p1 <= p2) {
  ------------------
  |  Branch (94:10): [True: 36, False: 22]
  ------------------
   95|     36|    int m = ((unsigned)p1 + (unsigned)p2) >> 1;
   96|     36|    const std::string& pattern = dat[m]->pattern;
   97|       |    // compare only as far as max_len, so a caller can restrict the search to
   98|       |    // patterns no longer than a given length
   99|     36|    size_t cmplen = pattern.size() < max_len ? pattern.size() : max_len;
  ------------------
  |  Branch (99:21): [True: 6, False: 30]
  ------------------
  100|     36|    int c = strncmp(word, pattern.c_str(), cmplen);
  101|     36|    if (c < 0)
  ------------------
  |  Branch (101:9): [True: 12, False: 24]
  ------------------
  102|     12|      p2 = m - 1;
  103|     24|    else if (c > 0)
  ------------------
  |  Branch (103:14): [True: 24, False: 0]
  ------------------
  104|     24|      p1 = m + 1;
  105|      0|    else if (pattern.size() <= max_len) {  // a prefix within the limit
  ------------------
  |  Branch (105:14): [True: 0, False: 0]
  ------------------
  106|      0|      ret = m;                             // scan right for a longer match
  107|      0|      p1 = m + 1;
  108|      0|    } else {
  109|       |      // pattern shares the capped prefix but is too long; any shorter
  110|       |      // candidate sorts earlier
  111|      0|      p2 = m - 1;
  112|      0|    }
  113|     36|  }
  114|     22|  return ret;
  115|     22|}
_ZN7RepList3addERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
  126|     22|int RepList::add(const std::string& in_pat1, const std::string& pat2) {
  127|     22|  if (in_pat1.empty() || pat2.empty()) {
  ------------------
  |  Branch (127:7): [True: 0, False: 22]
  |  Branch (127:26): [True: 0, False: 22]
  ------------------
  128|      0|    return 1;
  129|      0|  }
  130|       |
  131|       |  // analyse word context
  132|     22|  int type = 0;
  133|     22|  std::string pat1(in_pat1);
  134|     22|  if (pat1[0] == '_') {
  ------------------
  |  Branch (134:7): [True: 0, False: 22]
  ------------------
  135|      0|    pat1.erase(0, 1);
  136|      0|    type = 1;
  137|      0|  }
  138|     22|  if (!pat1.empty() && pat1[pat1.size() - 1] == '_') {
  ------------------
  |  Branch (138:7): [True: 22, False: 0]
  |  Branch (138:24): [True: 0, False: 22]
  ------------------
  139|      0|    type = type + 2;
  140|      0|    pat1.erase(pat1.size() - 1);
  141|      0|  }
  142|     22|  mystrrep(pat1, "_", " ");
  143|       |
  144|       |  // The trie does unanchored whole-string replacement only. Anchored entries
  145|       |  // (a leading or trailing _) depend on the match position within the word,
  146|       |  // which the trie does not model, so fall back to the linear scan once one is
  147|       |  // seen. Feed the trie the same _-to-space normalised strings the linear path
  148|       |  // stores, otherwise the two paths would disagree on output.
  149|     22|  if (type == 0 && can_use_trie) {
  ------------------
  |  Branch (149:7): [True: 22, False: 0]
  |  Branch (149:20): [True: 22, False: 0]
  ------------------
  150|     22|    std::string out(pat2);
  151|     22|    mystrrep(out, "_", " ");
  152|     22|    trie.add(pat1, out);
  153|     22|  } else {
  154|      0|    can_use_trie = false;
  155|      0|  }
  156|       |
  157|       |  // find existing entry
  158|     22|  int m = find(pat1.c_str(), pat1.size());
  159|     22|  if (m >= 0 && dat[m]->pattern == pat1) {
  ------------------
  |  Branch (159:7): [True: 0, False: 22]
  |  Branch (159:17): [True: 0, False: 0]
  ------------------
  160|       |    // since already used
  161|      0|    dat[m]->outstrings[type] = pat2;
  162|      0|    mystrrep(dat[m]->outstrings[type], "_", " ");
  163|      0|    return 0;
  164|      0|  }
  165|       |
  166|       |  // make a new entry if none exists
  167|     22|  replentry* r = new replentry;
  168|     22|  r->pattern = std::move(pat1);
  169|     22|  r->outstrings[type] = pat2;
  170|     22|  mystrrep(r->outstrings[type], "_", " ");
  171|     22|  dat.push_back(r);
  172|       |  // sort to the right place in the list
  173|     22|  size_t i;
  174|     36|  for (i = dat.size() - 1; i > 0; --i) {
  ------------------
  |  Branch (174:28): [True: 30, False: 6]
  ------------------
  175|     30|    if (strcmp(r->pattern.c_str(), dat[i - 1]->pattern.c_str()) < 0) {
  ------------------
  |  Branch (175:9): [True: 14, False: 16]
  ------------------
  176|     14|      dat[i] = dat[i - 1];
  177|     14|    } else
  178|     16|      break;
  179|     30|  }
  180|     22|  dat[i] = r;
  181|     22|  return 0;
  182|     22|}
_ZN7RepList4convERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERS6_:
  184|   419k|bool RepList::conv(const std::string& in_word, std::string& dest) {
  185|       |  // get_status guards against a trie that overflowed its index type while
  186|       |  // building, in which case the linear scan below is the correct fallback.
  187|   419k|  if (can_use_trie && trie.get_status())
  ------------------
  |  Branch (187:7): [True: 419k, False: 0]
  |  Branch (187:23): [True: 419k, False: 0]
  ------------------
  188|   419k|    return trie.transcode(in_word, dest) != TranscodeResult::None;
  189|       |
  190|      0|  dest.clear();
  191|       |
  192|      0|  const size_t wordlen = in_word.size();
  193|      0|  const char* word = in_word.c_str();
  194|       |
  195|      0|  bool change = false;
  196|      0|  for (size_t i = 0; i < wordlen; ++i) {
  ------------------
  |  Branch (196:22): [True: 0, False: 0]
  ------------------
  197|      0|    int n = -1;
  198|      0|    std::string l;
  199|       |
  200|       |    // Find the longest matching pattern whose replacement actually applies.
  201|       |    // The longest match may be rejected, for example an end-anchored key that
  202|       |    // is not at the end of the word, in which case retry with strictly shorter
  203|       |    // patterns so a shorter match can still apply.
  204|      0|    for (size_t max_len = wordlen - i; max_len > 0;) {
  ------------------
  |  Branch (204:40): [True: 0, False: 0]
  ------------------
  205|      0|      int m = find(word + i, max_len);
  206|      0|      if (m < 0)
  ------------------
  |  Branch (206:11): [True: 0, False: 0]
  ------------------
  207|      0|        break;
  208|      0|      l = replace(wordlen - i, m, i == 0);
  209|      0|      if (!l.empty()) {
  ------------------
  |  Branch (209:11): [True: 0, False: 0]
  ------------------
  210|      0|        n = m;
  211|      0|        break;
  212|      0|      }
  213|      0|      size_t plen = dat[m]->pattern.size();
  214|      0|      if (plen == 0)
  ------------------
  |  Branch (214:11): [True: 0, False: 0]
  ------------------
  215|      0|        break;
  216|      0|      max_len = plen - 1;
  217|      0|    }
  218|       |
  219|      0|    if (n < 0) {
  ------------------
  |  Branch (219:9): [True: 0, False: 0]
  ------------------
  220|      0|      dest.push_back(word[i]);
  221|      0|      continue;
  222|      0|    }
  223|       |
  224|      0|    dest.append(l);
  225|      0|    if (!dat[n]->pattern.empty()) {
  ------------------
  |  Branch (225:9): [True: 0, False: 0]
  ------------------
  226|      0|      i += dat[n]->pattern.size() - 1;
  227|      0|    }
  228|      0|    change = true;
  229|      0|  }
  230|       |
  231|      0|  return change;
  232|   419k|}
_ZNK7RepList24check_against_breaktableERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEE:
  234|      2|bool RepList::check_against_breaktable(const std::vector<std::string>& breaktable) const {
  235|      8|  for (const auto i : dat) {
  ------------------
  |  Branch (235:21): [True: 8, False: 2]
  ------------------
  236|     32|    for (auto& outstring : i->outstrings) {
  ------------------
  |  Branch (236:26): [True: 32, False: 8]
  ------------------
  237|     96|      for (const auto& str : breaktable) {
  ------------------
  |  Branch (237:28): [True: 96, False: 32]
  ------------------
  238|     96|        if (outstring.find(str) != std::string::npos) {
  ------------------
  |  Branch (238:13): [True: 0, False: 96]
  ------------------
  239|      0|          return false;
  240|      0|        }
  241|     96|      }
  242|     32|    }
  243|      8|  }
  244|       |
  245|      2|  return true;
  246|      2|}

_ZN4TrieItLb1EEC2Ev:
  161|      4|    Trie() : status_ok(true) {
  162|       |        // Initialize the root node (Index 0)
  163|      4|        nodes.emplace_back();
  164|      4|        sub_info_arena.push_back(0xFFFFFFFF);
  165|      4|    }
_ZN4TrieItLb1EE3addERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_:
  167|     22|    void add(const std::string& key, const std::string& value) {
  168|     22|        if (!status_ok) return;
  ------------------
  |  Branch (168:13): [True: 0, False: 22]
  ------------------
  169|       |
  170|       |        // Size rules diagnostics for our 32-bit (24/8) packing format
  171|     22|        if (value.size() > 255) { status_ok = false; return; }
  ------------------
  |  Branch (171:13): [True: 0, False: 22]
  ------------------
  172|     22|        size_t offset = char_arena.size();
  173|     22|        if (offset > 0xFFFFFF) { status_ok = false; return; }
  ------------------
  |  Branch (173:13): [True: 0, False: 22]
  ------------------
  174|       |
  175|       |        // Append to the flat char arena
  176|     22|        char_arena.insert(char_arena.end(), value.begin(), value.end());
  177|     22|        uint32_t sub_val = (static_cast<uint32_t>(offset) << 8) | static_cast<uint8_t>(value.size());
  178|       |
  179|     22|        size_t curr_idx = 0;
  180|       |        
  181|       |        // Traverse the key, adding nodes as necessary
  182|     56|        for (size_t i = 0; i < key.size(); ++i) {
  ------------------
  |  Branch (182:28): [True: 34, False: 22]
  ------------------
  183|     34|            uint8_t byte = static_cast<uint8_t>(key[i]);
  184|       |            
  185|     34|            if (UseNibbles) {
  ------------------
  |  Branch (185:17): [True: 34, Folded]
  ------------------
  186|       |                // Loop unrolling: Process the High Nibble, then the Low Nibble
  187|     34|                curr_idx = advance_or_create(curr_idx, (byte >> 4) & 0x0F);
  188|     34|                if (!status_ok) return;
  ------------------
  |  Branch (188:21): [True: 0, False: 34]
  ------------------
  189|     34|                curr_idx = advance_or_create(curr_idx, byte & 0x0F);
  190|     34|                if (!status_ok) return;
  ------------------
  |  Branch (190:21): [True: 0, False: 34]
  ------------------
  191|     34|            } else {
  192|       |                // Process as a single 8-bit lookup
  193|      0|                curr_idx = advance_or_create(curr_idx, byte);
  194|      0|                if (!status_ok) return;
  ------------------
  |  Branch (194:21): [True: 0, False: 0]
  ------------------
  195|      0|            }
  196|     34|        }
  197|       |        // Mark the leaf node with the packed substitution metadata
  198|     22|        sub_info_arena[curr_idx] = sub_val;
  199|     22|    }
_ZN4TrieItLb1EE17advance_or_createEmh:
  138|     68|    size_t advance_or_create(size_t curr_idx, uint8_t symbol) {
  139|     68|        IndexType rel_idx = nodes[curr_idx].children[symbol];
  140|     68|        if (rel_idx == 0) {
  ------------------
  |  Branch (140:13): [True: 38, False: 30]
  ------------------
  141|     38|            size_t new_idx = nodes.size();
  142|     38|            size_t diff = new_idx - curr_idx;
  143|       |            
  144|       |            // Diagnostics: Halt execution if the trie outgrows the integer type
  145|     38|            if (diff > std::numeric_limits<IndexType>::max()) {
  ------------------
  |  Branch (145:17): [True: 0, False: 38]
  ------------------
  146|      0|                status_ok = false;
  147|      0|                return 0;
  148|      0|            }
  149|       |            
  150|     38|            nodes[curr_idx].children[symbol] = static_cast<IndexType>(diff);
  151|       |            
  152|       |            // emplace_back constructs the object directly in the vector's memory
  153|     38|            nodes.emplace_back(); 
  154|     38|            sub_info_arena.push_back(0xFFFFFFFF); // 0xFFFFFFFF = No substitution mapped here
  155|     38|            return new_idx;
  156|     38|        }
  157|     30|        return curr_idx + rel_idx;
  158|     68|    }
_ZNK4TrieItLb1EE10get_statusEv:
  275|   419k|    bool get_status() const { return status_ok; }
_ZNK4TrieItLb1EE9transcodeERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERS7_:
  205|   419k|    TranscodeResult transcode(const std::string& src, std::string& dst) const {
  206|       |        // Halt and return None if the trie is in an invalid memory state
  207|   419k|        if (!status_ok || src.empty()) return TranscodeResult::None;
  ------------------
  |  Branch (207:13): [True: 0, False: 419k]
  |  Branch (207:27): [True: 1.85k, False: 417k]
  ------------------
  208|       |        
  209|   417k|        dst.clear();
  210|   417k|        dst.reserve(src.size()); 
  211|       |        
  212|       |        // State trackers for the 3-way outcome
  213|   417k|        bool any_substituted = false;
  214|   417k|        bool any_copied = false;
  215|       |        
  216|   417k|        size_t i = 0;
  217|       |        
  218|  4.54M|        while (i < src.size()) {
  ------------------
  |  Branch (218:16): [True: 4.13M, False: 417k]
  ------------------
  219|  4.13M|            size_t curr_idx = 0;
  220|  4.13M|            size_t match_len = 0;
  221|  4.13M|            uint32_t best_sub = 0xFFFFFFFF;
  222|       |
  223|  4.13M|            size_t j = i;
  224|       |            
  225|       |            // Greedily traverse the trie to find the longest matching sequence
  226|  4.13M|            while (j < src.size()) {
  ------------------
  |  Branch (226:20): [True: 4.13M, False: 152]
  ------------------
  227|  4.13M|                uint8_t byte = static_cast<uint8_t>(src[j]);
  228|       |                
  229|  4.13M|                if (UseNibbles) {
  ------------------
  |  Branch (229:21): [True: 4.13M, Folded]
  ------------------
  230|  4.13M|                    IndexType r1 = nodes[curr_idx].children[(byte >> 4) & 0x0F];
  231|  4.13M|                    if (r1 == 0) break;
  ------------------
  |  Branch (231:25): [True: 4.09M, False: 38.3k]
  ------------------
  232|  38.3k|                    curr_idx += r1;
  233|       |
  234|  38.3k|                    IndexType r2 = nodes[curr_idx].children[byte & 0x0F];
  235|  38.3k|                    if (r2 == 0) break;
  ------------------
  |  Branch (235:25): [True: 37.4k, False: 818]
  ------------------
  236|    818|                    curr_idx += r2;
  237|    818|                } else {
  238|      0|                    IndexType r = nodes[curr_idx].children[byte];
  239|      0|                    if (r == 0) break;
  ------------------
  |  Branch (239:25): [True: 0, False: 0]
  ------------------
  240|      0|                    curr_idx += r;
  241|      0|                }
  242|       |                
  243|    818|                ++j;
  244|       |                
  245|       |                // Track the deepest valid match found during traversal
  246|    818|                if (sub_info_arena[curr_idx] != 0xFFFFFFFF) {
  ------------------
  |  Branch (246:21): [True: 338, False: 480]
  ------------------
  247|    338|                    best_sub = sub_info_arena[curr_idx];
  248|    338|                    match_len = j - i;
  249|    338|                }
  250|    818|            }
  251|       |
  252|  4.13M|            if (best_sub != 0xFFFFFFFF) {
  ------------------
  |  Branch (252:17): [True: 338, False: 4.13M]
  ------------------
  253|       |                // Decode the 24-bit offset and 8-bit size, append directly from arena
  254|    338|                dst.append(&char_arena[best_sub >> 8], best_sub & 0xFF);
  255|    338|                i += match_len;
  256|    338|                any_substituted = true; // State update: Substitution occurred
  257|  4.13M|            } else {
  258|       |                // Fallback: copy unmapped character directly to output
  259|  4.13M|                dst.push_back(src[i]);
  260|  4.13M|                ++i;
  261|  4.13M|                any_copied = true; // State update: Verbatim copy occurred
  262|  4.13M|            }
  263|  4.13M|        }
  264|       |        
  265|       |        // ALGORITHM: Outcome Evaluation
  266|   417k|        if (any_substituted && any_copied) {
  ------------------
  |  Branch (266:13): [True: 213, False: 417k]
  |  Branch (266:32): [True: 207, False: 6]
  ------------------
  267|    207|            return TranscodeResult::Partial;
  268|   417k|        } else if (any_substituted) {
  ------------------
  |  Branch (268:20): [True: 6, False: 417k]
  ------------------
  269|      6|            return TranscodeResult::All;
  270|      6|        }
  271|       |        
  272|   417k|        return TranscodeResult::None;
  273|   417k|    }

_ZN10SuggestMgrC2ERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEjP8AffixMgr:
   87|     38|SuggestMgr::SuggestMgr(const std::string& tryme, unsigned int maxn, AffixMgr* aptr) {
   88|       |  // register affix manager and check in string of chars to
   89|       |  // try when building candidate suggestions
   90|     38|  pAMgr = aptr;
   91|       |
   92|     38|  csconv = nullptr;
   93|       |
   94|     38|  ckeyl = 0;
   95|       |
   96|     38|  ctryl = 0;
   97|       |
   98|     38|  utf8 = 0;
   99|     38|  langnum = 0;
  100|     38|  complexprefixes = 0;
  101|       |
  102|     38|  maxSug = maxn;
  103|     38|  nosplitsugs = 0;
  104|     38|  maxngramsugs = MAXNGRAMSUGS;
  ------------------
  |  |   77|     38|#define MAXNGRAMSUGS 4
  ------------------
  105|     38|  maxcpdsugs = MAXCOMPOUNDSUGS;
  ------------------
  |  |   79|     38|#define MAXCOMPOUNDSUGS 3
  ------------------
  106|       |
  107|     38|  if (pAMgr) {
  ------------------
  |  Branch (107:7): [True: 38, False: 0]
  ------------------
  108|     38|    langnum = pAMgr->get_langnum();
  109|     38|    ckey = pAMgr->get_key_string();
  110|     38|    nosplitsugs = pAMgr->get_nosplitsugs();
  111|     38|    if (pAMgr->get_maxngramsugs() >= 0)
  ------------------
  |  Branch (111:9): [True: 4, False: 34]
  ------------------
  112|      4|      maxngramsugs = pAMgr->get_maxngramsugs();
  113|     38|    utf8 = pAMgr->get_utf8();
  114|     38|    if (pAMgr->get_maxcpdsugs() >= 0)
  ------------------
  |  Branch (114:9): [True: 0, False: 38]
  ------------------
  115|      0|      maxcpdsugs = pAMgr->get_maxcpdsugs();
  116|     38|    if (!utf8) {
  ------------------
  |  Branch (116:9): [True: 20, False: 18]
  ------------------
  117|     20|      csconv = get_current_cs(pAMgr->get_encoding());
  118|     20|    }
  119|     38|    complexprefixes = pAMgr->get_complexprefixes();
  120|     38|  }
  121|       |
  122|     38|  if (!ckey.empty()) {
  ------------------
  |  Branch (122:7): [True: 38, False: 0]
  ------------------
  123|     38|    if (utf8) {
  ------------------
  |  Branch (123:9): [True: 18, False: 20]
  ------------------
  124|     18|      int len = u8_u16(ckey_utf, ckey);
  125|     18|      if (len != -1) {
  ------------------
  |  Branch (125:11): [True: 18, False: 0]
  ------------------
  126|     18|        ckeyl = len;
  127|     18|      }
  128|     20|    } else {
  129|     20|      ckeyl = ckey.size();
  130|     20|    }
  131|     38|  }
  132|       |
  133|     38|  ctry = tryme;
  134|     38|  if (!ctry.empty()) {
  ------------------
  |  Branch (134:7): [True: 2, False: 36]
  ------------------
  135|      2|    if (utf8) {
  ------------------
  |  Branch (135:9): [True: 2, False: 0]
  ------------------
  136|      2|      int len = u8_u16(ctry_utf, ctry);
  137|      2|      if (len != -1) {
  ------------------
  |  Branch (137:11): [True: 2, False: 0]
  ------------------
  138|      2|        ctryl = len;
  139|      2|      }
  140|      2|    } else {
  141|      0|      ctryl = ctry.size();
  142|      0|    }
  143|      2|  }
  144|       |
  145|       |  // language with possible dash usage
  146|       |  // (latin letters or dash in TRY characters)
  147|     38|  lang_with_dash_usage = ctry.find('-') != std::string::npos ||
  ------------------
  |  Branch (147:26): [True: 0, False: 38]
  ------------------
  148|     38|                         ctry.find('a') != std::string::npos;
  ------------------
  |  Branch (148:26): [True: 0, False: 38]
  ------------------
  149|     38|}
_ZN10SuggestMgr7testsugERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iPiPNS0_6chrono10time_pointINSE_12steady_clockENSE_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEERi:
  166|  78.1M|                        int& info) {
  167|  78.1M|  if (wlst.size() == maxSug)
  ------------------
  |  Branch (167:7): [True: 0, False: 78.1M]
  ------------------
  168|      0|    return;
  169|       |
  170|  78.1M|  const int cwrd = std::find(wlst.begin(), wlst.end(), candidate) != wlst.end() ? 0 : 1;
  ------------------
  |  Branch (170:20): [True: 45.3k, False: 78.0M]
  ------------------
  171|       |
  172|  78.1M|  if (cwrd) {
  ------------------
  |  Branch (172:7): [True: 78.0M, False: 45.3k]
  ------------------
  173|  78.0M|    if (int result = checkword(candidate, cpdsuggest, timer, timelimit)) {
  ------------------
  |  Branch (173:13): [True: 2.23k, False: 78.0M]
  ------------------
  174|       |      // compound word in the dictionary
  175|  2.23k|      if (cpdsuggest == 0 && result >= 2)
  ------------------
  |  Branch (175:11): [True: 2.23k, False: 0]
  |  Branch (175:30): [True: 1, False: 2.22k]
  ------------------
  176|      1|          info |= SPELL_COMPOUND;
  ------------------
  |  |   78|      1|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  177|  2.23k|      wlst.push_back(candidate);
  178|  2.23k|    }
  179|  78.0M|  }
  180|  78.1M|}
_ZN10SuggestMgr7suggestERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_Pib:
  190|   142k|                        int* onlycompoundsug, bool test_simplesug) {
  191|   142k|  int nocompoundtwowords = 0; // no second or third loops, see below
  192|   142k|  std::vector<w_char> word_utf;
  193|   142k|  size_t nsugorig = slst.size(), oldSug = 0;
  194|   142k|  std::string w2;
  195|   142k|  bool good_suggestion = false;
  196|       |
  197|       |  // word reversing wrapper for complex prefixes
  198|   142k|  if (complexprefixes) {
  ------------------
  |  Branch (198:7): [True: 8.27k, False: 134k]
  ------------------
  199|  8.27k|    w2.assign(w);
  200|  8.27k|    if (utf8)
  ------------------
  |  Branch (200:9): [True: 0, False: 8.27k]
  ------------------
  201|      0|      reverseword_utf(w2);
  202|  8.27k|    else
  203|  8.27k|      reverseword(w2);
  204|  8.27k|  }
  205|       |
  206|   142k|  const std::string& word = complexprefixes ? w2 : w;
  ------------------
  |  Branch (206:29): [True: 8.27k, False: 134k]
  ------------------
  207|       |
  208|   142k|  suggest_start = std::chrono::steady_clock::now();
  209|       |
  210|   142k|  if (utf8) {
  ------------------
  |  Branch (210:7): [True: 59.5k, False: 83.1k]
  ------------------
  211|  59.5k|    int wl = u8_u16(word_utf, word);
  212|  59.5k|    if (wl == -1) {
  ------------------
  |  Branch (212:9): [True: 9.85k, False: 49.6k]
  ------------------
  213|  9.85k|      return false;
  214|  9.85k|    }
  215|  59.5k|  }
  216|       |
  217|       |  // three loops:
  218|       |  // - the first without compounding,
  219|       |  // - the second one with 2-word compounding,
  220|       |  // - the third one with 3-or-more-word compounding
  221|       |  // Run second and third loops only if:
  222|       |  // - no ~good suggestion in the first loop
  223|       |  // - not for testing compound words with 3 or more words (test_simplesug == false)
  224|   132k|  int info = 0;
  225|   530k|  for (int cpdsuggest = 0; cpdsuggest < 3 && nocompoundtwowords == 0; cpdsuggest++) {
  ------------------
  |  Branch (225:28): [True: 398k, False: 132k]
  |  Branch (225:46): [True: 397k, False: 181]
  ------------------
  226|       |
  227|       |    // limit compound suggestion
  228|   397k|    if (cpdsuggest > 0)
  ------------------
  |  Branch (228:9): [True: 265k, False: 132k]
  ------------------
  229|   265k|      oldSug = slst.size();
  230|       |
  231|       |    // suggestions for an uppercase word (html -> HTML)
  232|   397k|    if (slst.size() < maxSug) {
  ------------------
  |  Branch (232:9): [True: 397k, False: 15]
  ------------------
  233|   397k|      size_t i = slst.size();
  234|   397k|      if (utf8)
  ------------------
  |  Branch (234:11): [True: 148k, False: 248k]
  ------------------
  235|   148k|        capchars_utf(slst, word_utf, cpdsuggest, info);
  236|   248k|      else
  237|   248k|        capchars(slst, word, cpdsuggest, info);
  238|   397k|      if (slst.size() > i)
  ------------------
  |  Branch (238:11): [True: 180, False: 397k]
  ------------------
  239|    180|        good_suggestion = true;
  240|   397k|    }
  241|       |
  242|       |    // perhaps we made a typical fault of spelling
  243|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (243:9): [True: 397k, False: 15]
  |  Branch (243:36): [True: 132k, False: 265k]
  |  Branch (243:51): [True: 265k, False: 0]
  ------------------
  244|   397k|      size_t i = slst.size();
  245|   397k|      replchars(slst, word, cpdsuggest, info);
  246|   397k|      if (slst.size() > i) {
  ------------------
  |  Branch (246:11): [True: 0, False: 397k]
  ------------------
  247|      0|        good_suggestion = true;
  248|      0|        if (info & SPELL_BEST_SUG)
  ------------------
  |  |   86|      0|#define SPELL_BEST_SUG (1 << 8)    // limit suggestions for the best ones, i.e. ph:
  ------------------
  |  Branch (248:13): [True: 0, False: 0]
  ------------------
  249|      0|          return true;
  250|      0|      }
  251|   397k|    }
  252|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (252:9): [True: 0, False: 397k]
  ------------------
  253|      0|      return good_suggestion;
  254|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (254:9): [True: 0, False: 397k]
  |  Branch (254:27): [True: 0, False: 0]
  ------------------
  255|      0|      return true;
  256|       |
  257|       |    // perhaps we made chose the wrong char from a related set
  258|   397k|    if ((slst.size() < maxSug) &&
  ------------------
  |  Branch (258:9): [True: 397k, False: 15]
  ------------------
  259|   397k|        (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (259:10): [True: 132k, False: 265k]
  |  Branch (259:25): [True: 265k, False: 0]
  ------------------
  260|   397k|      mapchars(slst, word, cpdsuggest, info);
  261|   397k|    }
  262|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (262:9): [True: 4, False: 397k]
  ------------------
  263|      4|      return good_suggestion;
  264|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (264:9): [True: 0, False: 397k]
  |  Branch (264:27): [True: 0, False: 0]
  ------------------
  265|      0|      return true;
  266|       |
  267|       |    // only suggest compound words when no other ~good suggestion
  268|   397k|    if ((cpdsuggest == 0) && (slst.size() > nsugorig))
  ------------------
  |  Branch (268:9): [True: 132k, False: 265k]
  |  Branch (268:30): [True: 180, False: 132k]
  ------------------
  269|    180|      nocompoundtwowords = 1;
  270|       |
  271|       |    // did we swap the order of chars by mistake
  272|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (272:9): [True: 397k, False: 15]
  |  Branch (272:36): [True: 132k, False: 265k]
  |  Branch (272:51): [True: 265k, False: 0]
  ------------------
  273|   397k|      if (utf8)
  ------------------
  |  Branch (273:11): [True: 148k, False: 248k]
  ------------------
  274|   148k|        swapchar_utf(slst, word_utf, cpdsuggest, info);
  275|   248k|      else
  276|   248k|        swapchar(slst, word, cpdsuggest, info);
  277|   397k|    }
  278|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (278:9): [True: 0, False: 397k]
  ------------------
  279|      0|      return good_suggestion;
  280|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (280:9): [True: 0, False: 397k]
  |  Branch (280:27): [True: 0, False: 0]
  ------------------
  281|      0|      return true;
  282|       |
  283|       |    // did we swap the order of non adjacent chars by mistake
  284|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (284:9): [True: 397k, False: 15]
  |  Branch (284:36): [True: 132k, False: 265k]
  |  Branch (284:51): [True: 265k, False: 0]
  ------------------
  285|   397k|      if (utf8)
  ------------------
  |  Branch (285:11): [True: 148k, False: 248k]
  ------------------
  286|   148k|        longswapchar_utf(slst, word_utf, cpdsuggest, info);
  287|   248k|      else
  288|   248k|        longswapchar(slst, word, cpdsuggest, info);
  289|   397k|    }
  290|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (290:9): [True: 0, False: 397k]
  ------------------
  291|      0|      return good_suggestion;
  292|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (292:9): [True: 0, False: 397k]
  |  Branch (292:27): [True: 0, False: 0]
  ------------------
  293|      0|      return true;
  294|       |
  295|       |    // did we just hit the wrong key in place of a good char (case and keyboard)
  296|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (296:9): [True: 397k, False: 15]
  |  Branch (296:36): [True: 132k, False: 265k]
  |  Branch (296:51): [True: 265k, False: 0]
  ------------------
  297|   397k|      if (utf8)
  ------------------
  |  Branch (297:11): [True: 148k, False: 248k]
  ------------------
  298|   148k|        badcharkey_utf(slst, word_utf, cpdsuggest, info);
  299|   248k|      else
  300|   248k|        badcharkey(slst, word, cpdsuggest, info);
  301|   397k|    }
  302|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (302:9): [True: 0, False: 397k]
  ------------------
  303|      0|      return good_suggestion;
  304|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (304:9): [True: 0, False: 397k]
  |  Branch (304:27): [True: 0, False: 0]
  ------------------
  305|      0|      return true;
  306|       |
  307|       |    // did we add a char that should not be there
  308|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (308:9): [True: 397k, False: 15]
  |  Branch (308:36): [True: 132k, False: 265k]
  |  Branch (308:51): [True: 265k, False: 0]
  ------------------
  309|   397k|      if (utf8)
  ------------------
  |  Branch (309:11): [True: 148k, False: 248k]
  ------------------
  310|   148k|        extrachar_utf(slst, word_utf, cpdsuggest, info);
  311|   248k|      else
  312|   248k|        extrachar(slst, word, cpdsuggest, info);
  313|   397k|    }
  314|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (314:9): [True: 0, False: 397k]
  ------------------
  315|      0|      return good_suggestion;
  316|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (316:9): [True: 0, False: 397k]
  |  Branch (316:27): [True: 0, False: 0]
  ------------------
  317|      0|      return true;
  318|       |
  319|       |    // did we forgot a char
  320|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (320:9): [True: 397k, False: 15]
  |  Branch (320:36): [True: 132k, False: 265k]
  |  Branch (320:51): [True: 265k, False: 0]
  ------------------
  321|   397k|      if (utf8)
  ------------------
  |  Branch (321:11): [True: 148k, False: 248k]
  ------------------
  322|   148k|        forgotchar_utf(slst, word_utf, cpdsuggest, info);
  323|   248k|      else
  324|   248k|        forgotchar(slst, word, cpdsuggest, info);
  325|   397k|    }
  326|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (326:9): [True: 0, False: 397k]
  ------------------
  327|      0|      return good_suggestion;
  328|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (328:9): [True: 0, False: 397k]
  |  Branch (328:27): [True: 0, False: 0]
  ------------------
  329|      0|      return true;
  330|       |
  331|       |    // did we move a char
  332|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (332:9): [True: 397k, False: 15]
  |  Branch (332:36): [True: 132k, False: 265k]
  |  Branch (332:51): [True: 265k, False: 0]
  ------------------
  333|   397k|      if (utf8)
  ------------------
  |  Branch (333:11): [True: 148k, False: 248k]
  ------------------
  334|   148k|        movechar_utf(slst, word_utf, cpdsuggest, info);
  335|   248k|      else
  336|   248k|        movechar(slst, word, cpdsuggest, info);
  337|   397k|    }
  338|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (338:9): [True: 0, False: 397k]
  ------------------
  339|      0|      return good_suggestion;
  340|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (340:9): [True: 0, False: 397k]
  |  Branch (340:27): [True: 0, False: 0]
  ------------------
  341|      0|      return true;
  342|       |
  343|       |    // did we just hit the wrong key in place of a good char
  344|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (344:9): [True: 397k, False: 15]
  |  Branch (344:36): [True: 132k, False: 265k]
  |  Branch (344:51): [True: 265k, False: 0]
  ------------------
  345|   397k|      if (utf8)
  ------------------
  |  Branch (345:11): [True: 148k, False: 248k]
  ------------------
  346|   148k|        badchar_utf(slst, word_utf, cpdsuggest, info);
  347|   248k|      else
  348|   248k|        badchar(slst, word, cpdsuggest, info);
  349|   397k|    }
  350|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (350:9): [True: 0, False: 397k]
  ------------------
  351|      0|      return good_suggestion;
  352|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (352:9): [True: 0, False: 397k]
  |  Branch (352:27): [True: 0, False: 0]
  ------------------
  353|      0|      return true;
  354|       |
  355|       |    // did we double two characters
  356|   397k|    if ((slst.size() < maxSug) && (!cpdsuggest || (slst.size() < oldSug + maxcpdsugs))) {
  ------------------
  |  Branch (356:9): [True: 397k, False: 15]
  |  Branch (356:36): [True: 132k, False: 265k]
  |  Branch (356:51): [True: 265k, False: 0]
  ------------------
  357|   397k|      if (utf8)
  ------------------
  |  Branch (357:11): [True: 148k, False: 248k]
  ------------------
  358|   148k|        doubletwochars_utf(slst, word_utf, cpdsuggest, info);
  359|   248k|      else
  360|   248k|        doubletwochars(slst, word, cpdsuggest, info);
  361|   397k|    }
  362|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (362:9): [True: 0, False: 397k]
  ------------------
  363|      0|      return good_suggestion;
  364|   397k|    if (test_simplesug && slst.size())
  ------------------
  |  Branch (364:9): [True: 0, False: 397k]
  |  Branch (364:27): [True: 0, False: 0]
  ------------------
  365|      0|      return true;
  366|       |
  367|       |    // perhaps we forgot to hit space and two words ran together
  368|       |    // (dictionary word pairs have top priority here, so
  369|       |    // we always suggest them, in despite of nosplitsugs, and
  370|       |    // drop compound word and other suggestions)
  371|   397k|    if (!cpdsuggest || (!nosplitsugs && slst.size() < oldSug + maxcpdsugs)) {
  ------------------
  |  Branch (371:9): [True: 132k, False: 265k]
  |  Branch (371:25): [True: 265k, False: 0]
  |  Branch (371:41): [True: 265k, False: 0]
  ------------------
  372|   397k|      good_suggestion = twowords(slst, word, cpdsuggest, good_suggestion, info);
  373|       |
  374|   397k|      if (info & SPELL_BEST_SUG)
  ------------------
  |  |   86|   397k|#define SPELL_BEST_SUG (1 << 8)    // limit suggestions for the best ones, i.e. ph:
  ------------------
  |  Branch (374:11): [True: 131, False: 397k]
  ------------------
  375|    131|        return true;
  376|   397k|    }
  377|   397k|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   397k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (377:9): [True: 0, False: 397k]
  ------------------
  378|      0|      return good_suggestion;
  379|       |
  380|       |    // testing returns after the first loop
  381|   397k|    if (test_simplesug)
  ------------------
  |  Branch (381:9): [True: 0, False: 397k]
  ------------------
  382|      0|      return slst.size() > 0;
  383|       |
  384|       |    // don't need third loop, if the second loop was successful or
  385|       |    // the first loop found a dictionary-based compound word
  386|       |    // (we don't need more, likely worse and false 3-or-more-word compound words)
  387|   397k|    if (cpdsuggest == 1 && (slst.size() > oldSug || (info & SPELL_COMPOUND)))
  ------------------
  |  |   78|   132k|#define SPELL_COMPOUND (1 << 0)    // the result is a compound word
  ------------------
  |  Branch (387:9): [True: 132k, False: 265k]
  |  Branch (387:29): [True: 0, False: 132k]
  |  Branch (387:53): [True: 1, False: 132k]
  ------------------
  388|      1|       nocompoundtwowords = 1;
  389|       |
  390|   397k|  }  // repeating ``for'' statement compounding support
  391|       |
  392|   132k|  if (!nocompoundtwowords && (!slst.empty()) && onlycompoundsug)
  ------------------
  |  Branch (392:7): [True: 132k, False: 181]
  |  Branch (392:30): [True: 15.1k, False: 117k]
  |  Branch (392:49): [True: 15.1k, False: 0]
  ------------------
  393|  15.1k|    *onlycompoundsug = 1;
  394|       |
  395|   132k|  return good_suggestion;
  396|   132k|}
_ZN10SuggestMgr12capchars_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  401|   148k|                              int cpdsuggest, int& info) {
  402|   148k|  std::vector<w_char> candidate_utf(word);
  403|   148k|  mkallcap_utf(candidate_utf, langnum);
  404|   148k|  std::string candidate;
  405|   148k|  u16_u8(candidate, candidate_utf);
  406|   148k|  testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  407|   148k|}
_ZN10SuggestMgr8capcharsERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  412|   248k|                          int cpdsuggest, int& info) {
  413|   248k|  std::string candidate(word);
  414|   248k|  mkallcap(candidate, csconv);
  415|   248k|  testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  416|   248k|}
_ZN10SuggestMgr8mapcharsERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  421|   397k|                         int cpdsuggest, int& info) {
  422|   397k|  std::string candidate;
  423|   397k|  std::chrono::steady_clock::time_point timelimit;
  424|   397k|  int timer;
  425|       |
  426|   397k|  if (word.size() < 2 || !pAMgr)
  ------------------
  |  Branch (426:7): [True: 35.6k, False: 362k]
  |  Branch (426:26): [True: 0, False: 362k]
  ------------------
  427|  35.6k|    return wlst.size();
  428|       |
  429|   362k|  const std::vector<mapentry>& maptable = pAMgr->get_maptable();
  430|   362k|  if (maptable.empty())
  ------------------
  |  Branch (430:7): [True: 347k, False: 14.5k]
  ------------------
  431|   347k|    return wlst.size();
  432|       |
  433|  14.5k|  timelimit = std::chrono::steady_clock::now();
  434|  14.5k|  timer = MINTIMER;
  ------------------
  |  |  107|  14.5k|#define MINTIMER 100
  ------------------
  435|  14.5k|  return map_related(word, candidate, 0, wlst, cpdsuggest,
  436|  14.5k|                     maptable, &timer, &timelimit, 0, info);
  437|   362k|}
_ZN10SuggestMgr11map_relatedERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERS6_mRNS0_6vectorIS6_NS4_IS6_EEEEiRKNSA_ISC_NS4_ISC_EEEEPiPNS0_6chrono10time_pointINSJ_12steady_clockENSJ_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEEiRi:
  447|  3.62M|                            int depth, int& info) {
  448|  3.62M|  if (word.size() == wn) {
  ------------------
  |  Branch (448:7): [True: 1.76M, False: 1.86M]
  ------------------
  449|  1.76M|    if (candidate == word)
  ------------------
  |  Branch (449:9): [True: 14.5k, False: 1.74M]
  ------------------
  450|  14.5k|      return wlst.size();
  451|  1.74M|    const int cwrd = std::find(wlst.begin(), wlst.end(), candidate) != wlst.end() ? 0 : 1;
  ------------------
  |  Branch (451:22): [True: 0, False: 1.74M]
  ------------------
  452|  1.74M|    if ((cwrd) && checkword(candidate, cpdsuggest, timer, timelimit)) {
  ------------------
  |  Branch (452:9): [True: 1.74M, False: 0]
  |  Branch (452:19): [True: 0, False: 1.74M]
  ------------------
  453|      0|      if (wlst.size() < maxSug) {
  ------------------
  |  Branch (453:11): [True: 0, False: 0]
  ------------------
  454|      0|        wlst.push_back(candidate);
  455|      0|      }
  456|      0|    }
  457|  1.74M|    return wlst.size();
  458|  1.76M|  }
  459|       |
  460|  1.86M|  if (depth > 0x3F00) {
  ------------------
  |  Branch (460:7): [True: 0, False: 1.86M]
  ------------------
  461|      0|    *timer = 0;
  462|      0|    return wlst.size();
  463|      0|  }
  464|       |
  465|  1.86M|  int in_map = 0;
  466|  7.44M|  for (size_t j = 0; j < maptable.size(); ++j) {
  ------------------
  |  Branch (466:22): [True: 5.58M, False: 1.86M]
  ------------------
  467|  20.4M|    for (size_t k = 0; k < maptable[j].size(); ++k) {
  ------------------
  |  Branch (467:24): [True: 14.8M, False: 5.58M]
  ------------------
  468|  14.8M|      size_t len = maptable[j][k].size();
  469|  14.8M|      if (len && word.compare(wn, len, maptable[j][k]) == 0) {
  ------------------
  |  Branch (469:11): [True: 14.8M, False: 0]
  |  Branch (469:18): [True: 875k, False: 14.0M]
  ------------------
  470|   875k|        in_map = 1;
  471|   875k|        size_t cn = candidate.size();
  472|  3.49M|        for (size_t l = 0; l < maptable[j].size(); ++l) {
  ------------------
  |  Branch (472:28): [True: 2.62M, False: 874k]
  ------------------
  473|  2.62M|          candidate.resize(cn);
  474|  2.62M|          candidate.append(maptable[j][l]);
  475|  2.62M|          map_related(word, candidate, wn + len, wlst,
  476|  2.62M|                           cpdsuggest, maptable, timer, timelimit, depth + 1, info);
  477|  2.62M|          if (!(*timer))
  ------------------
  |  Branch (477:15): [True: 484, False: 2.62M]
  ------------------
  478|    484|            return wlst.size();
  479|  2.62M|          if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS) {
  ------------------
  |  |  105|  2.62M|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (479:15): [True: 4, False: 2.62M]
  ------------------
  480|      4|            *timer = 0;
  481|      4|            return wlst.size();
  482|      4|          }
  483|  2.62M|        }
  484|   875k|      }
  485|  14.8M|    }
  486|  5.58M|  }
  487|  1.86M|  if (!in_map) {
  ------------------
  |  Branch (487:7): [True: 987k, False: 874k]
  ------------------
  488|   987k|    candidate.push_back(word[wn]);
  489|   987k|    map_related(word, candidate, wn + 1, wlst, cpdsuggest,
  490|   987k|                maptable, timer, timelimit, depth + 1, info);
  491|   987k|  }
  492|  1.86M|  return wlst.size();
  493|  1.86M|}
_ZN10SuggestMgr9replcharsERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  499|   397k|                          int cpdsuggest, int& info) {
  500|   397k|  std::string candidate;
  501|   397k|  int wl = word.size();
  502|   397k|  if (wl < 2 || !pAMgr)
  ------------------
  |  Branch (502:7): [True: 35.6k, False: 362k]
  |  Branch (502:17): [True: 0, False: 362k]
  ------------------
  503|  35.6k|    return wlst.size();
  504|   362k|  const std::vector<replentry>& reptable = pAMgr->get_reptable();
  505|   362k|  auto replchars_start = std::chrono::steady_clock::now();
  506|   362k|  for (const auto& entry : reptable) {
  ------------------
  |  Branch (506:26): [True: 74.9k, False: 362k]
  ------------------
  507|  74.9k|    size_t r = 0;
  508|       |    // search every occurence of the pattern in the word
  509|  74.9k|    while ((r = word.find(entry.pattern, r)) != std::string::npos) {
  ------------------
  |  Branch (509:12): [True: 12, False: 74.9k]
  ------------------
  510|     12|      if (std::chrono::steady_clock::now() - replchars_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|     12|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (510:11): [True: 0, False: 12]
  ------------------
  511|      0|        return wlst.size();
  512|     12|      int type = (r == 0) ? 1 : 0;
  ------------------
  |  Branch (512:18): [True: 0, False: 12]
  ------------------
  513|     12|      if (r + entry.pattern.size() == word.size())
  ------------------
  |  Branch (513:11): [True: 0, False: 12]
  ------------------
  514|      0|        type += 2;
  515|     12|      while (type && entry.outstrings[type].empty())
  ------------------
  |  Branch (515:14): [True: 0, False: 12]
  |  Branch (515:22): [True: 0, False: 0]
  ------------------
  516|      0|        type = (type == 2 && r != 0) ? 0 : type - 1;
  ------------------
  |  Branch (516:17): [True: 0, False: 0]
  |  Branch (516:30): [True: 0, False: 0]
  ------------------
  517|     12|      const std::string&out = entry.outstrings[type];
  518|     12|      if (out.empty()) {
  ------------------
  |  Branch (518:11): [True: 0, False: 12]
  ------------------
  519|      0|        ++r;
  520|      0|        continue;
  521|      0|      }
  522|     12|      candidate.assign(word, 0, r);
  523|     12|      candidate.append(entry.outstrings[type]);
  524|     12|      candidate.append(word, r + entry.pattern.size(), std::string::npos);
  525|     12|      size_t sp = candidate.find(' ');
  526|     12|      size_t oldns = wlst.size();
  527|     12|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  528|     12|      if (oldns < wlst.size()) {
  ------------------
  |  Branch (528:11): [True: 0, False: 12]
  ------------------
  529|       |        // REP suggestions are the best, don't search other type of suggestions
  530|      0|        info |= SPELL_BEST_SUG;
  ------------------
  |  |   86|      0|#define SPELL_BEST_SUG (1 << 8)    // limit suggestions for the best ones, i.e. ph:
  ------------------
  531|      0|      }
  532|       |
  533|       |      // check REP suggestions with space
  534|     12|      if (sp != std::string::npos) {
  ------------------
  |  Branch (534:11): [True: 0, False: 12]
  ------------------
  535|      0|        size_t prev = 0;
  536|      0|        while (sp != std::string::npos) {
  ------------------
  |  Branch (536:16): [True: 0, False: 0]
  ------------------
  537|      0|          std::string prev_chunk = candidate.substr(prev, sp - prev);
  538|      0|          if (checkword(prev_chunk, 0, nullptr, nullptr)) {
  ------------------
  |  Branch (538:15): [True: 0, False: 0]
  ------------------
  539|      0|            oldns = wlst.size();
  540|      0|            std::string post_chunk = candidate.substr(sp + 1);
  541|      0|            testsug(wlst, post_chunk, cpdsuggest, nullptr, nullptr, info);
  542|      0|            if (oldns < wlst.size()) {
  ------------------
  |  Branch (542:17): [True: 0, False: 0]
  ------------------
  543|      0|              wlst[wlst.size() - 1] = candidate;
  544|      0|            }
  545|      0|          }
  546|      0|          prev = sp + 1;
  547|      0|          sp = candidate.find(' ', prev);
  548|      0|        }
  549|      0|      }
  550|     12|      r++;  // search for the next letter
  551|     12|    }
  552|  74.9k|  }
  553|   362k|  return wlst.size();
  554|   362k|}
_ZN10SuggestMgr14doubletwocharsERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  563|   248k|                               int cpdsuggest, int& info) {
  564|   248k|  size_t wl = word.size();
  565|   248k|  if (wl < 5 || !pAMgr)
  ------------------
  |  Branch (565:7): [True: 55.4k, False: 193k]
  |  Branch (565:17): [True: 0, False: 193k]
  ------------------
  566|  55.4k|    return wlst.size();
  567|       |
  568|   193k|  int state = 0;
  569|  4.72M|  for (size_t i = 2; i < wl; ++i) {
  ------------------
  |  Branch (569:22): [True: 4.52M, False: 193k]
  ------------------
  570|  4.52M|    if (word[i] == word[i - 2]) {
  ------------------
  |  Branch (570:9): [True: 1.21M, False: 3.31M]
  ------------------
  571|  1.21M|      state++;
  572|  1.21M|      if (state == 3 || (state == 2 && i >= 4)) {
  ------------------
  |  Branch (572:11): [True: 6.82k, False: 1.20M]
  |  Branch (572:26): [True: 448k, False: 759k]
  |  Branch (572:40): [True: 439k, False: 9.50k]
  ------------------
  573|   446k|        auto word_iter = word.begin();
  574|   446k|        std::string candidate(word_iter, word_iter + i - 1);
  575|   446k|        candidate.insert(candidate.end(), word_iter + i + 1, word.end());
  576|   446k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  577|   446k|        state = 0;
  578|   446k|      }
  579|  3.31M|    } else {
  580|  3.31M|      state = 0;
  581|  3.31M|    }
  582|  4.52M|  }
  583|   193k|  return wlst.size();
  584|   248k|}
_ZN10SuggestMgr18doubletwochars_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  593|   148k|                                   int cpdsuggest, int& info) {
  594|   148k|  size_t wl = word.size();
  595|   148k|  int state = 0;
  596|   148k|  if (wl < 5 || !pAMgr)
  ------------------
  |  Branch (596:7): [True: 54.2k, False: 94.6k]
  |  Branch (596:17): [True: 0, False: 94.6k]
  ------------------
  597|  54.2k|    return wlst.size();
  598|  1.54M|  for (size_t i = 2; i < wl; ++i) {
  ------------------
  |  Branch (598:22): [True: 1.45M, False: 94.6k]
  ------------------
  599|  1.45M|    if (word[i] == word[i - 2]) {
  ------------------
  |  Branch (599:9): [True: 462k, False: 990k]
  ------------------
  600|   462k|      state++;
  601|   462k|      if (state == 3 || (state == 2 && i >= 4)) {
  ------------------
  |  Branch (601:11): [True: 3.84k, False: 458k]
  |  Branch (601:26): [True: 167k, False: 291k]
  |  Branch (601:40): [True: 161k, False: 5.73k]
  ------------------
  602|   165k|        auto word_iter = word.begin();
  603|   165k|        std::vector<w_char> candidate_utf(word_iter, word_iter + i - 1);
  604|   165k|        candidate_utf.insert(candidate_utf.end(), word_iter + i + 1, word.end());
  605|   165k|        std::string candidate;
  606|   165k|        u16_u8(candidate, candidate_utf);
  607|   165k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  608|   165k|        state = 0;
  609|   165k|      }
  610|   990k|    } else {
  611|   990k|      state = 0;
  612|   990k|    }
  613|  1.45M|  }
  614|  94.6k|  return wlst.size();
  615|   148k|}
_ZN10SuggestMgr10badcharkeyERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  621|   248k|                           int cpdsuggest, int& info) {
  622|   248k|  std::string candidate(word);
  623|       |
  624|       |  // swap out each char one by one and try uppercase and neighbor
  625|       |  // keyboard chars in its place to see if that makes a good word
  626|  5.29M|  for (size_t i = 0, wl = candidate.size(); i < wl; ++i) {
  ------------------
  |  Branch (626:45): [True: 5.04M, False: 248k]
  ------------------
  627|  5.04M|    char tmpc = candidate[i];
  628|       |    // check with uppercase letters
  629|  5.04M|    candidate[i] = csconv[((unsigned char)tmpc)].cupper;
  630|  5.04M|    if (tmpc != candidate[i]) {
  ------------------
  |  Branch (630:9): [True: 1.23M, False: 3.80M]
  ------------------
  631|  1.23M|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  632|  1.23M|      candidate[i] = tmpc;
  633|  1.23M|    }
  634|       |    // check neighbor characters in keyboard string
  635|  5.04M|    if (ckey.empty())
  ------------------
  |  Branch (635:9): [True: 0, False: 5.04M]
  ------------------
  636|      0|      continue;
  637|  5.04M|    size_t loc = 0;
  638|   132M|    while ((loc < ckeyl) && ckey[loc] != tmpc)
  ------------------
  |  Branch (638:12): [True: 127M, False: 4.17M]
  |  Branch (638:29): [True: 127M, False: 864k]
  ------------------
  639|   127M|      ++loc;
  640|  5.93M|    while (loc < ckeyl) {
  ------------------
  |  Branch (640:12): [True: 896k, False: 5.04M]
  ------------------
  641|       |      // a long keyboard string can hold many neighbours for this
  642|       |      // character, so give up once the overall time budget is spent
  643|   896k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   896k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (643:11): [True: 0, False: 896k]
  ------------------
  644|      0|        return wlst.size();
  645|   896k|      if ((loc > 0) && ckey[loc - 1] != '|') {
  ------------------
  |  Branch (645:11): [True: 748k, False: 147k]
  |  Branch (645:24): [True: 719k, False: 29.0k]
  ------------------
  646|   719k|        candidate[i] = ckey[loc - 1];
  647|   719k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  648|   719k|      }
  649|   896k|      if (((loc + 1) < ckeyl) && (ckey[loc + 1] != '|')) {
  ------------------
  |  Branch (649:11): [True: 803k, False: 92.2k]
  |  Branch (649:34): [True: 739k, False: 64.2k]
  ------------------
  650|   739k|        candidate[i] = ckey[loc + 1];
  651|   739k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  652|   739k|      }
  653|  14.0M|      do {
  654|  14.0M|        loc++;
  655|  14.0M|      } while ((loc < ckeyl) && ckey[loc] != tmpc);
  ------------------
  |  Branch (655:16): [True: 13.2M, False: 864k]
  |  Branch (655:33): [True: 13.1M, False: 31.1k]
  ------------------
  656|   896k|    }
  657|  5.04M|    candidate[i] = tmpc;
  658|  5.04M|  }
  659|   248k|  return wlst.size();
  660|   248k|}
_ZN10SuggestMgr14badcharkey_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  666|   148k|                               int cpdsuggest, int& info) {
  667|   148k|  std::string candidate;
  668|   148k|  std::vector<w_char> candidate_utf(word);
  669|       |  // swap out each char one by one and try all the tryme
  670|       |  // chars in its place to see if that makes a good word
  671|  1.92M|  for (size_t i = 0, wl = word.size(); i < wl; ++i) {
  ------------------
  |  Branch (671:40): [True: 1.77M, False: 148k]
  ------------------
  672|  1.77M|    w_char tmpc = candidate_utf[i];
  673|       |    // check with uppercase letters
  674|  1.77M|    candidate_utf[i] = upper_utf(candidate_utf[i], 1);
  675|  1.77M|    if (tmpc != candidate_utf[i]) {
  ------------------
  |  Branch (675:9): [True: 408k, False: 1.36M]
  ------------------
  676|   408k|      u16_u8(candidate, candidate_utf);
  677|   408k|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  678|   408k|      candidate_utf[i] = tmpc;
  679|   408k|    }
  680|       |    // check neighbor characters in keyboard string
  681|  1.77M|    if (ckey_utf.empty())
  ------------------
  |  Branch (681:9): [True: 0, False: 1.77M]
  ------------------
  682|      0|      continue;
  683|  1.77M|    size_t loc = 0;
  684|  44.5M|    while ((loc < ckeyl) && ckey_utf[loc] != tmpc)
  ------------------
  |  Branch (684:12): [True: 43.2M, False: 1.35M]
  |  Branch (684:29): [True: 42.7M, False: 420k]
  ------------------
  685|  42.7M|      ++loc;
  686|  2.21M|    while (loc < ckeyl) {
  ------------------
  |  Branch (686:12): [True: 433k, False: 1.77M]
  ------------------
  687|       |      // a long keyboard string can hold many neighbours for this
  688|       |      // character, so give up once the overall time budget is spent
  689|   433k|      if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|   433k|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (689:11): [True: 0, False: 433k]
  ------------------
  690|      0|        return wlst.size();
  691|   433k|      if ((loc > 0) && ckey_utf[loc - 1] != W_VLINE) {
  ------------------
  |  Branch (691:11): [True: 342k, False: 91.0k]
  |  Branch (691:24): [True: 342k, False: 0]
  ------------------
  692|   342k|        candidate_utf[i] = ckey_utf[loc - 1];
  693|   342k|        u16_u8(candidate, candidate_utf);
  694|   342k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  695|   342k|      }
  696|   433k|      if (((loc + 1) < ckeyl) && (ckey_utf[loc + 1] != W_VLINE)) {
  ------------------
  |  Branch (696:11): [True: 393k, False: 40.4k]
  |  Branch (696:34): [True: 393k, False: 0]
  ------------------
  697|   393k|        candidate_utf[i] = ckey_utf[loc + 1];
  698|   393k|        u16_u8(candidate, candidate_utf);
  699|   393k|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  700|   393k|      }
  701|  6.95M|      do {
  702|  6.95M|        loc++;
  703|  6.95M|      } while ((loc < ckeyl) && ckey_utf[loc] != tmpc);
  ------------------
  |  Branch (703:16): [True: 6.53M, False: 420k]
  |  Branch (703:33): [True: 6.52M, False: 13.7k]
  ------------------
  704|   433k|    }
  705|  1.77M|    candidate_utf[i] = tmpc;
  706|  1.77M|  }
  707|   148k|  return wlst.size();
  708|   148k|}
_ZN10SuggestMgr7badcharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  713|   248k|                               int cpdsuggest, int& info) {
  714|   248k|  std::string candidate(word);
  715|   248k|  std::chrono::steady_clock::time_point timelimit = std::chrono::steady_clock::now();
  716|   248k|  int timer = MINTIMER;
  ------------------
  |  |  107|   248k|#define MINTIMER 100
  ------------------
  717|       |  // swap out each char one by one and try all the tryme
  718|       |  // chars in its place to see if that makes a good word
  719|   248k|  for (size_t j = 0; j < ctryl; ++j) {
  ------------------
  |  Branch (719:22): [True: 0, False: 248k]
  ------------------
  720|      0|    for (auto aI = candidate.rbegin(), aEnd = candidate.rend(); aI != aEnd; ++aI) {
  ------------------
  |  Branch (720:65): [True: 0, False: 0]
  ------------------
  721|      0|      char tmpc = *aI;
  722|      0|      if (ctry[j] == tmpc)
  ------------------
  |  Branch (722:11): [True: 0, False: 0]
  ------------------
  723|      0|        continue;
  724|      0|      *aI = ctry[j];
  725|      0|      testsug(wlst, candidate, cpdsuggest, &timer, &timelimit, info);
  726|      0|      if (!timer)
  ------------------
  |  Branch (726:11): [True: 0, False: 0]
  ------------------
  727|      0|        return wlst.size();
  728|      0|      *aI = tmpc;
  729|      0|    }
  730|      0|  }
  731|   248k|  return wlst.size();
  732|   248k|}
_ZN10SuggestMgr11badchar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  737|   148k|                            int cpdsuggest, int& info) {
  738|   148k|  std::vector<w_char> candidate_utf(word);
  739|   148k|  std::string candidate;
  740|   148k|  std::chrono::steady_clock::time_point timelimit = std::chrono::steady_clock::now();
  741|   148k|  int timer = MINTIMER;
  ------------------
  |  |  107|   148k|#define MINTIMER 100
  ------------------
  742|       |  // swap out each char one by one and try all the tryme
  743|       |  // chars in its place to see if that makes a good word
  744|   166k|  for (size_t j = 0; j < ctryl; ++j) {
  ------------------
  |  Branch (744:22): [True: 17.5k, False: 148k]
  ------------------
  745|   227k|    for (auto aI = candidate_utf.rbegin(), aEnd = candidate_utf.rend(); aI != aEnd; ++aI) {
  ------------------
  |  Branch (745:73): [True: 210k, False: 17.5k]
  ------------------
  746|   210k|      w_char tmpc = *aI;
  747|   210k|      if (tmpc == ctry_utf[j])
  ------------------
  |  Branch (747:11): [True: 0, False: 210k]
  ------------------
  748|      0|        continue;
  749|   210k|      *aI = ctry_utf[j];
  750|   210k|      u16_u8(candidate, candidate_utf);
  751|   210k|      testsug(wlst, candidate, cpdsuggest, &timer, &timelimit, info);
  752|   210k|      if (!timer)
  ------------------
  |  Branch (752:11): [True: 0, False: 210k]
  ------------------
  753|      0|        return wlst.size();
  754|   210k|      *aI = tmpc;
  755|   210k|    }
  756|  17.5k|  }
  757|   148k|  return wlst.size();
  758|   148k|}
_ZN10SuggestMgr13extrachar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  763|   148k|                              int cpdsuggest, int& info) {
  764|   148k|  std::vector<w_char> candidate_utf(word);
  765|   148k|  if (candidate_utf.size() < 2)
  ------------------
  |  Branch (765:7): [True: 16.3k, False: 132k]
  ------------------
  766|  16.3k|    return wlst.size();
  767|       |  // try omitting one char of word at a time
  768|  1.89M|  for (size_t i = 0; i < candidate_utf.size(); ++i) {
  ------------------
  |  Branch (768:22): [True: 1.76M, False: 132k]
  ------------------
  769|  1.76M|    size_t index = candidate_utf.size() - 1 - i;
  770|  1.76M|    w_char tmpc = candidate_utf[index];
  771|  1.76M|    candidate_utf.erase(candidate_utf.begin() + index);
  772|  1.76M|    std::string candidate;
  773|  1.76M|    u16_u8(candidate, candidate_utf);
  774|  1.76M|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  775|  1.76M|    candidate_utf.insert(candidate_utf.begin() + index, tmpc);
  776|  1.76M|  }
  777|   132k|  return wlst.size();
  778|   148k|}
_ZN10SuggestMgr9extracharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  783|   248k|                          int cpdsuggest, int& info) {
  784|   248k|  std::string candidate(word);
  785|   248k|  if (candidate.size() < 2)
  ------------------
  |  Branch (785:7): [True: 19.9k, False: 229k]
  ------------------
  786|  19.9k|    return wlst.size();
  787|       |  // try omitting one char of word at a time
  788|  5.25M|  for (size_t i = 0; i < candidate.size(); ++i) {
  ------------------
  |  Branch (788:22): [True: 5.02M, False: 229k]
  ------------------
  789|  5.02M|    size_t index = candidate.size() - 1 - i;
  790|  5.02M|    char tmpc = candidate[index];
  791|  5.02M|    candidate.erase(candidate.begin() + index);
  792|  5.02M|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  793|  5.02M|    candidate.insert(candidate.begin() + index, tmpc);
  794|  5.02M|  }
  795|   229k|  return wlst.size();
  796|   248k|}
_ZN10SuggestMgr10forgotcharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  801|   248k|                           int cpdsuggest, int& info) {
  802|   248k|  std::string candidate(word);
  803|   248k|  std::chrono::steady_clock::time_point timelimit = std::chrono::steady_clock::now();
  804|   248k|  int timer = MINTIMER;
  ------------------
  |  |  107|   248k|#define MINTIMER 100
  ------------------
  805|       |
  806|       |  // try inserting a tryme character before every letter (and the null
  807|       |  // terminator)
  808|   248k|  for (size_t k = 0; k < ctryl; ++k) {
  ------------------
  |  Branch (808:22): [True: 0, False: 248k]
  ------------------
  809|      0|    for (size_t i = 0; i <= candidate.size(); ++i) {
  ------------------
  |  Branch (809:24): [True: 0, False: 0]
  ------------------
  810|      0|      size_t index = candidate.size() - i;
  811|      0|      candidate.insert(candidate.begin() + index, ctry[k]);
  812|      0|      testsug(wlst, candidate, cpdsuggest, &timer, &timelimit, info);
  813|      0|      if (!timer)
  ------------------
  |  Branch (813:11): [True: 0, False: 0]
  ------------------
  814|      0|        return wlst.size();
  815|      0|      candidate.erase(candidate.begin() + index);
  816|      0|    }
  817|      0|  }
  818|   248k|  return wlst.size();
  819|   248k|}
_ZN10SuggestMgr14forgotchar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
  824|   148k|                               int cpdsuggest, int& info) {
  825|   148k|  std::vector<w_char> candidate_utf(word);
  826|   148k|  std::chrono::steady_clock::time_point timelimit = std::chrono::steady_clock::now();
  827|   148k|  int timer = MINTIMER;
  ------------------
  |  |  107|   148k|#define MINTIMER 100
  ------------------
  828|       |
  829|       |  // try inserting a tryme character at the end of the word and before every
  830|       |  // letter
  831|   166k|  for (size_t k = 0; k < ctryl; ++k) {
  ------------------
  |  Branch (831:22): [True: 17.5k, False: 148k]
  ------------------
  832|   245k|    for (size_t i = 0; i <= candidate_utf.size(); ++i) {
  ------------------
  |  Branch (832:24): [True: 227k, False: 17.5k]
  ------------------
  833|   227k|      size_t index = candidate_utf.size() - i;
  834|   227k|      candidate_utf.insert(candidate_utf.begin() + index, ctry_utf[k]);
  835|   227k|      std::string candidate;
  836|   227k|      u16_u8(candidate, candidate_utf);
  837|   227k|      testsug(wlst, candidate, cpdsuggest, &timer, &timelimit, info);
  838|   227k|      if (!timer)
  ------------------
  |  Branch (838:11): [True: 0, False: 227k]
  ------------------
  839|      0|        return wlst.size();
  840|   227k|      candidate_utf.erase(candidate_utf.begin() + index);
  841|   227k|    }
  842|  17.5k|  }
  843|   148k|  return wlst.size();
  844|   148k|}
_ZN10SuggestMgr8twowordsERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_ibRi:
  854|   397k|                         bool good, int& info) {
  855|   397k|  int c2, forbidden = 0, cwrd, wl = word.size();
  856|   397k|  if (wl < 3)
  ------------------
  |  Branch (856:7): [True: 57.4k, False: 340k]
  ------------------
  857|  57.4k|    return false;
  858|       |
  859|   340k|  if (langnum == LANG_hu)
  ------------------
  |  Branch (859:7): [True: 13.8k, False: 326k]
  ------------------
  860|  13.8k|    forbidden = check_forbidden(word);
  861|       |
  862|   340k|  char* candidate = new char[wl + 2];
  863|   340k|  memcpy(candidate + 1, word.data(), wl);
  864|   340k|  candidate[wl + 1] = 0;
  865|       |
  866|       |  // split the string into two pieces after every char
  867|       |  // if both pieces are good words make them a suggestion
  868|  4.44M|  for (char* p = candidate + 1; p[1] != '\0'; p++) {
  ------------------
  |  Branch (868:33): [True: 4.13M, False: 306k]
  ------------------
  869|  4.13M|    p[-1] = *p;
  870|       |    // go to end of the UTF-8 character
  871|  4.35M|    while (utf8 && is_utf8_cont(p[1])) {
  ------------------
  |  Branch (871:12): [True: 1.39M, False: 2.96M]
  |  Branch (871:20): [True: 219k, False: 1.17M]
  ------------------
  872|   219k|      *p = p[1];
  873|   219k|      p++;
  874|   219k|    }
  875|  4.13M|    if (utf8 && p[1] == '\0')
  ------------------
  |  Branch (875:9): [True: 1.17M, False: 2.96M]
  |  Branch (875:17): [True: 34.4k, False: 1.13M]
  ------------------
  876|  34.4k|      break;  // last UTF-8 character
  877|       |
  878|       |    // Suggest only word pairs, if they are listed in the dictionary.
  879|       |    // For example, adding "a lot" to the English dic file will
  880|       |    // result only "alot" -> "a lot" suggestion instead of
  881|       |    // "alto, slot, alt, lot, allot, aloft, aloe, clot, plot, blot, a lot".
  882|       |    // Note: using "ph:alot" keeps the other suggestions:
  883|       |    // a lot ph:alot
  884|       |    // alot -> a lot, alto, slot...
  885|  4.10M|    *p = ' ';
  886|  4.10M|    if (!cpdsuggest && checkword(candidate, cpdsuggest, nullptr, nullptr)) {
  ------------------
  |  Branch (886:9): [True: 1.36M, False: 2.73M]
  |  Branch (886:9): [True: 1.29k, False: 4.10M]
  |  Branch (886:24): [True: 1.29k, False: 1.36M]
  ------------------
  887|       |      // best solution
  888|  1.29k|      info |= SPELL_BEST_SUG;
  ------------------
  |  |   86|  1.29k|#define SPELL_BEST_SUG (1 << 8)    // limit suggestions for the best ones, i.e. ph:
  ------------------
  889|       |
  890|       |      // remove not word pair suggestions
  891|  1.29k|      if (!good) {
  ------------------
  |  Branch (891:11): [True: 131, False: 1.16k]
  ------------------
  892|    131|        good = true;
  893|    131|        wlst.clear();
  894|    131|      }
  895|       |
  896|  1.29k|      wlst.insert(wlst.begin(), candidate);
  897|  1.29k|    }
  898|       |
  899|       |    // word pairs with dash?
  900|  4.10M|    if (lang_with_dash_usage) {
  ------------------
  |  Branch (900:9): [True: 0, False: 4.10M]
  ------------------
  901|      0|      *p = '-';
  902|       |
  903|      0|      if (!cpdsuggest && checkword(candidate, cpdsuggest, nullptr, nullptr)) {
  ------------------
  |  Branch (903:11): [True: 0, False: 0]
  |  Branch (903:11): [True: 0, False: 0]
  |  Branch (903:26): [True: 0, False: 0]
  ------------------
  904|       |        // best solution
  905|      0|        info |= SPELL_BEST_SUG;
  ------------------
  |  |   86|      0|#define SPELL_BEST_SUG (1 << 8)    // limit suggestions for the best ones, i.e. ph:
  ------------------
  906|       |
  907|       |        // remove not word pair suggestions
  908|      0|        if (!good) {
  ------------------
  |  Branch (908:13): [True: 0, False: 0]
  ------------------
  909|      0|          good = true;
  910|      0|          wlst.clear();
  911|      0|        }
  912|      0|        wlst.insert(wlst.begin(), candidate);
  913|      0|      }
  914|      0|    }
  915|       |
  916|  4.10M|    if (wlst.size() < maxSug && !nosplitsugs && !good) {
  ------------------
  |  Branch (916:9): [True: 4.10M, False: 473]
  |  Branch (916:33): [True: 4.10M, False: 0]
  |  Branch (916:49): [True: 4.10M, False: 821]
  ------------------
  917|  4.10M|      *p = '\0';
  918|  4.10M|      int c1 = checkword(candidate, cpdsuggest, nullptr, nullptr);
  919|  4.10M|      if (c1) {
  ------------------
  |  Branch (919:11): [True: 33.8k, False: 4.06M]
  ------------------
  920|  33.8k|        c2 = checkword((p + 1), cpdsuggest, nullptr, nullptr);
  921|  33.8k|        if (c2) {
  ------------------
  |  Branch (921:13): [True: 1.07k, False: 32.8k]
  ------------------
  922|       |          // spec. Hungarian code (TODO need a better compound word support)
  923|  1.07k|          if ((langnum == LANG_hu) && !forbidden &&
  ------------------
  |  Branch (923:15): [True: 27, False: 1.04k]
  |  Branch (923:39): [True: 27, False: 0]
  ------------------
  924|       |              // if 3 repeating letter, use - instead of space
  925|     27|              (((p[-1] == p[1]) &&
  ------------------
  |  Branch (925:17): [True: 14, False: 13]
  ------------------
  926|     14|              (((p > candidate + 1) && (p[-1] == p[-2])) || (p[-1] == p[2]))) ||
  ------------------
  |  Branch (926:17): [True: 0, False: 14]
  |  Branch (926:40): [True: 0, False: 0]
  |  Branch (926:61): [True: 0, False: 14]
  ------------------
  927|       |              // or multiple compounding, with more, than 6 syllables
  928|     27|              ((c1 == 3) && (c2 >= 2))))
  ------------------
  |  Branch (928:16): [True: 0, False: 27]
  |  Branch (928:29): [True: 0, False: 0]
  ------------------
  929|      0|            *p = '-';
  930|  1.07k|          else
  931|  1.07k|            *p = ' ';
  932|       |
  933|  1.07k|          cwrd = std::find(wlst.begin(), wlst.end(), candidate) != wlst.end() ? 0 : 1;
  ------------------
  |  Branch (933:18): [True: 35, False: 1.04k]
  ------------------
  934|       |
  935|  1.07k|          if (cwrd && (wlst.size() < maxSug))
  ------------------
  |  Branch (935:15): [True: 1.04k, False: 35]
  |  Branch (935:23): [True: 1.04k, False: 0]
  ------------------
  936|  1.04k|              wlst.emplace_back(candidate);
  937|       |
  938|       |          // add two word suggestion with dash, depending on the language
  939|       |          // Note that cwrd doesn't modified for REP twoword sugg.
  940|  1.07k|          if ( !nosplitsugs && lang_with_dash_usage &&
  ------------------
  |  Branch (940:16): [True: 1.07k, False: 0]
  |  Branch (940:32): [True: 0, False: 1.07k]
  ------------------
  941|      0|              mystrlen(p + 1) > 1 && mystrlen(candidate) - mystrlen(p) > 1) {
  ------------------
  |  Branch (941:15): [True: 0, False: 0]
  |  Branch (941:38): [True: 0, False: 0]
  ------------------
  942|      0|            *p = '-';
  943|      0|            for (auto& k : wlst) {
  ------------------
  |  Branch (943:26): [True: 0, False: 0]
  ------------------
  944|      0|              if (k == candidate) {
  ------------------
  |  Branch (944:19): [True: 0, False: 0]
  ------------------
  945|      0|                cwrd = 0;
  946|      0|                break;
  947|      0|              }
  948|      0|            }
  949|       |
  950|      0|            if ((wlst.size() < maxSug) && cwrd)
  ------------------
  |  Branch (950:17): [True: 0, False: 0]
  |  Branch (950:43): [True: 0, False: 0]
  ------------------
  951|      0|              wlst.emplace_back(candidate);
  952|      0|          }
  953|  1.07k|        }
  954|  33.8k|      }
  955|  4.10M|    }
  956|  4.10M|  }
  957|   340k|  delete[] candidate;
  958|   340k|  return good;
  959|   397k|}
_ZN10SuggestMgr8swapcharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
  964|   248k|                         int cpdsuggest, int& info) {
  965|   248k|  if (word.size() < 2)
  ------------------
  |  Branch (965:7): [True: 19.9k, False: 229k]
  ------------------
  966|  19.9k|    return wlst.size();
  967|       |
  968|   229k|  std::string candidate(word);
  969|       |
  970|       |  // try swapping adjacent chars one by one
  971|  5.02M|  for (size_t i = 0; i < candidate.size() - 1; ++i) {
  ------------------
  |  Branch (971:22): [True: 4.79M, False: 229k]
  ------------------
  972|  4.79M|    std::swap(candidate[i], candidate[i+1]);
  973|  4.79M|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  974|  4.79M|    std::swap(candidate[i], candidate[i+1]);
  975|  4.79M|  }
  976|       |
  977|       |  // try double swaps for short words
  978|       |  // ahev -> have, owudl -> would
  979|   229k|  if (candidate.size() == 4 || candidate.size() == 5) {
  ------------------
  |  Branch (979:7): [True: 12.9k, False: 216k]
  |  Branch (979:32): [True: 8.96k, False: 207k]
  ------------------
  980|  21.9k|    candidate[0] = word[1];
  981|  21.9k|    candidate[1] = word[0];
  982|  21.9k|    candidate[2] = word[2];
  983|  21.9k|    candidate[candidate.size() - 2] = word[candidate.size() - 1];
  984|  21.9k|    candidate[candidate.size() - 1] = word[candidate.size() - 2];
  985|  21.9k|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  986|  21.9k|    if (candidate.size() == 5) {
  ------------------
  |  Branch (986:9): [True: 8.96k, False: 12.9k]
  ------------------
  987|  8.96k|      candidate[0] = word[0];
  988|  8.96k|      candidate[1] = word[2];
  989|  8.96k|      candidate[2] = word[1];
  990|  8.96k|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
  991|  8.96k|    }
  992|  21.9k|  }
  993|       |
  994|   229k|  return wlst.size();
  995|   248k|}
_ZN10SuggestMgr12swapchar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
 1000|   148k|                             int cpdsuggest, int& info) {
 1001|   148k|  if (word.size() < 2)
  ------------------
  |  Branch (1001:7): [True: 16.3k, False: 132k]
  ------------------
 1002|  16.3k|    return wlst.size();
 1003|       |
 1004|   132k|  std::vector<w_char> candidate_utf(word);
 1005|       |
 1006|   132k|  std::string candidate;
 1007|       |  // try swapping adjacent chars one by one
 1008|  1.76M|  for (size_t i = 0; i < candidate_utf.size() - 1; ++i) {
  ------------------
  |  Branch (1008:22): [True: 1.62M, False: 132k]
  ------------------
 1009|  1.62M|    if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|  1.62M|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (1009:9): [True: 0, False: 1.62M]
  ------------------
 1010|      0|      return wlst.size();
 1011|  1.62M|    std::swap(candidate_utf[i], candidate_utf[i+1]);
 1012|  1.62M|    u16_u8(candidate, candidate_utf);
 1013|  1.62M|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1014|  1.62M|    std::swap(candidate_utf[i], candidate_utf[i+1]);
 1015|  1.62M|  }
 1016|       |
 1017|       |  // try double swaps for short words
 1018|       |  // ahev -> have, owudl -> would, suodn -> sound
 1019|   132k|  if (candidate_utf.size() == 4 || candidate_utf.size() == 5) {
  ------------------
  |  Branch (1019:7): [True: 16.9k, False: 115k]
  |  Branch (1019:36): [True: 10.1k, False: 105k]
  ------------------
 1020|  27.0k|    candidate_utf[0] = word[1];
 1021|  27.0k|    candidate_utf[1] = word[0];
 1022|  27.0k|    candidate_utf[2] = word[2];
 1023|  27.0k|    candidate_utf[candidate_utf.size() - 2] = word[candidate_utf.size() - 1];
 1024|  27.0k|    candidate_utf[candidate_utf.size() - 1] = word[candidate_utf.size() - 2];
 1025|  27.0k|    u16_u8(candidate, candidate_utf);
 1026|  27.0k|    testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1027|  27.0k|    if (candidate_utf.size() == 5) {
  ------------------
  |  Branch (1027:9): [True: 10.1k, False: 16.9k]
  ------------------
 1028|  10.1k|      candidate_utf[0] = word[0];
 1029|  10.1k|      candidate_utf[1] = word[2];
 1030|  10.1k|      candidate_utf[2] = word[1];
 1031|  10.1k|      u16_u8(candidate, candidate_utf);
 1032|  10.1k|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1033|  10.1k|    }
 1034|  27.0k|  }
 1035|   132k|  return wlst.size();
 1036|   132k|}
_ZN10SuggestMgr12longswapcharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
 1041|   248k|                             int cpdsuggest, int& info) {
 1042|   248k|  std::string candidate(word);
 1043|       |  // try swapping not adjacent chars one by one
 1044|  5.29M|  for (auto p = candidate.begin(); p < candidate.end(); ++p) {
  ------------------
  |  Branch (1044:36): [True: 5.04M, False: 248k]
  ------------------
 1045|   181M|    for (auto q = candidate.begin(); q < candidate.end(); ++q) {
  ------------------
  |  Branch (1045:38): [True: 176M, False: 5.04M]
  ------------------
 1046|   176M|      const auto distance = std::abs(std::distance(q, p));
 1047|   176M|      if (distance > 1 && distance <= MAX_CHAR_DISTANCE && *p != *q) {
  ------------------
  |  |   84|   338M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1047:11): [True: 161M, False: 14.6M]
  |  Branch (1047:27): [True: 26.1M, False: 135M]
  |  Branch (1047:60): [True: 19.4M, False: 6.64M]
  ------------------
 1048|  19.4M|        std::swap(*p, *q);
 1049|  19.4M|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1050|  19.4M|        std::swap(*p, *q);
 1051|  19.4M|      }
 1052|   176M|    }
 1053|  5.04M|  }
 1054|   248k|  return wlst.size();
 1055|   248k|}
_ZN10SuggestMgr16longswapchar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
 1060|   148k|                                 int cpdsuggest, int& info) {
 1061|   148k|  std::vector<w_char> candidate_utf(word);
 1062|       |  // try swapping not adjacent chars
 1063|  1.92M|  for (auto p = candidate_utf.begin(); p < candidate_utf.end(); ++p) {
  ------------------
  |  Branch (1063:40): [True: 1.77M, False: 148k]
  ------------------
 1064|  47.8M|    for (auto q = candidate_utf.begin(); q < candidate_utf.end(); ++q) {
  ------------------
  |  Branch (1064:42): [True: 46.1M, False: 1.77M]
  ------------------
 1065|  46.1M|      const auto distance = std::abs(std::distance(q, p));
 1066|  46.1M|      if (distance > 1 && distance <= MAX_CHAR_DISTANCE && *p != *q) {
  ------------------
  |  |   84|  87.1M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1066:11): [True: 41.0M, False: 5.03M]
  |  Branch (1066:27): [True: 8.26M, False: 32.8M]
  |  Branch (1066:60): [True: 5.70M, False: 2.56M]
  ------------------
 1067|  5.70M|        std::swap(*p, *q);
 1068|  5.70M|        std::string candidate;
 1069|  5.70M|        u16_u8(candidate, candidate_utf);
 1070|  5.70M|        testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1071|  5.70M|        std::swap(*p, *q);
 1072|  5.70M|      }
 1073|  46.1M|    }
 1074|  1.77M|  }
 1075|   148k|  return wlst.size();
 1076|   148k|}
_ZN10SuggestMgr8movecharERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_iRi:
 1081|   248k|                         int cpdsuggest, int& info) {
 1082|   248k|  if (word.size() < 2)
  ------------------
  |  Branch (1082:7): [True: 19.9k, False: 229k]
  ------------------
 1083|  19.9k|    return wlst.size();
 1084|       |
 1085|   229k|  std::string candidate(word);
 1086|       |
 1087|       |  // try moving a char
 1088|  5.25M|  for (auto p = candidate.begin(); p < candidate.end(); ++p) {
  ------------------
  |  Branch (1088:36): [True: 5.02M, False: 229k]
  ------------------
 1089|  22.8M|    for (auto q = p + 1; q < candidate.end() && std::distance(p, q) <= MAX_CHAR_DISTANCE; ++q) {
  ------------------
  |  |   84|  21.7M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1089:26): [True: 21.7M, False: 1.07M]
  |  Branch (1089:26): [True: 17.8M, False: 5.02M]
  |  Branch (1089:49): [True: 17.8M, False: 3.94M]
  ------------------
 1090|  17.8M|      std::swap(*q, *(q - 1));
 1091|  17.8M|      if (std::distance(p, q) < 2)
  ------------------
  |  Branch (1091:11): [True: 4.79M, False: 13.0M]
  ------------------
 1092|  4.79M|        continue;  // omit swap char
 1093|  13.0M|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1094|  13.0M|    }
 1095|  5.02M|    const auto word_iter = word.begin();
 1096|  5.02M|    std::copy_n(word_iter, candidate.size(), candidate.begin());
 1097|  5.02M|  }
 1098|       |
 1099|  5.02M|  for (auto p = candidate.rbegin(), pEnd = candidate.rend() - 1; p != pEnd; ++p) {
  ------------------
  |  Branch (1099:66): [True: 4.79M, False: 229k]
  ------------------
 1100|  22.6M|    for (auto q = p + 1, qEnd = candidate.rend(); q != qEnd && std::distance(p, q) <= MAX_CHAR_DISTANCE; ++q) {
  ------------------
  |  |   84|  21.7M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1100:51): [True: 21.7M, False: 845k]
  |  Branch (1100:64): [True: 17.8M, False: 3.94M]
  ------------------
 1101|  17.8M|      std::swap(*q, *(q - 1));
 1102|  17.8M|      if (std::distance(p, q) < 2)
  ------------------
  |  Branch (1102:11): [True: 4.79M, False: 13.0M]
  ------------------
 1103|  4.79M|        continue;  // omit swap char
 1104|  13.0M|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1105|  13.0M|    }
 1106|  4.79M|    const auto word_iter = word.begin();
 1107|  4.79M|    std::copy_n(word_iter, candidate.size(), candidate.begin());
 1108|  4.79M|  }
 1109|       |
 1110|   229k|  return wlst.size();
 1111|   248k|}
_ZN10SuggestMgr12movechar_utfERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKNS1_I6w_charNS5_ISB_EEEEiRi:
 1116|   148k|                             int cpdsuggest, int& info) {
 1117|   148k|  if (word.size() < 2)
  ------------------
  |  Branch (1117:7): [True: 16.3k, False: 132k]
  ------------------
 1118|  16.3k|    return wlst.size();
 1119|       |
 1120|   132k|  std::vector<w_char> candidate_utf(word);
 1121|       |
 1122|       |  // try moving a char
 1123|  1.89M|  for (auto p = candidate_utf.begin(); p < candidate_utf.end(); ++p) {
  ------------------
  |  Branch (1123:40): [True: 1.76M, False: 132k]
  ------------------
 1124|  7.52M|    for (auto q = p + 1; q < candidate_utf.end() && std::distance(p, q) <= MAX_CHAR_DISTANCE; ++q) {
  ------------------
  |  |   84|  6.92M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1124:26): [True: 6.92M, False: 592k]
  |  Branch (1124:26): [True: 5.76M, False: 1.76M]
  |  Branch (1124:53): [True: 5.76M, False: 1.16M]
  ------------------
 1125|  5.76M|      std::swap(*q, *(q - 1));
 1126|  5.76M|      if (std::distance(p, q) < 2)
  ------------------
  |  Branch (1126:11): [True: 1.62M, False: 4.13M]
  ------------------
 1127|  1.62M|        continue;  // omit swap char
 1128|  4.13M|      std::string candidate;
 1129|  4.13M|      u16_u8(candidate, candidate_utf);
 1130|  4.13M|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1131|  4.13M|    }
 1132|  1.76M|    const auto word_iter = word.begin();
 1133|  1.76M|    std::copy_n(word_iter, candidate_utf.size(), candidate_utf.begin());
 1134|  1.76M|  }
 1135|       |
 1136|  1.89M|  for (auto p = candidate_utf.rbegin(); p < candidate_utf.rend(); ++p) {
  ------------------
  |  Branch (1136:41): [True: 1.76M, False: 132k]
  ------------------
 1137|  7.52M|    for (auto q = p + 1; q < candidate_utf.rend() && std::distance(p, q) <= MAX_CHAR_DISTANCE; ++q) {
  ------------------
  |  |   84|  6.92M|#define MAX_CHAR_DISTANCE 4
  ------------------
  |  Branch (1137:26): [True: 6.92M, False: 592k]
  |  Branch (1137:26): [True: 5.76M, False: 1.76M]
  |  Branch (1137:54): [True: 5.76M, False: 1.16M]
  ------------------
 1138|  5.76M|      std::swap(*q, *(q - 1));
 1139|  5.76M|      if (std::distance(p, q) < 2)
  ------------------
  |  Branch (1139:11): [True: 1.62M, False: 4.13M]
  ------------------
 1140|  1.62M|        continue;  // omit swap char
 1141|  4.13M|      std::string candidate;
 1142|  4.13M|      u16_u8(candidate, candidate_utf);
 1143|  4.13M|      testsug(wlst, candidate, cpdsuggest, nullptr, nullptr, info);
 1144|  4.13M|    }
 1145|  1.76M|    const auto word_iter = word.begin();
 1146|  1.76M|    std::copy_n(word_iter, candidate_utf.size(), candidate_utf.begin());
 1147|  1.76M|  }
 1148|       |
 1149|   132k|  return wlst.size();
 1150|   148k|}
_ZN10SuggestMgr9ngsuggestERNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEEPKcRKNS1_INS0_10unique_ptrI7HashMgrNS0_14default_deleteISE_EEEENS5_ISH_EEEEi:
 1185|  59.9k|                          int captype) {
 1186|  59.9k|  int lval, sc, lp, lpphon, nonbmp = 0;
 1187|       |
 1188|       |  // exhaustively search through all root words
 1189|       |  // keeping track of the MAX_ROOTS most similar root words
 1190|  59.9k|  struct hentry* roots[MAX_ROOTS];
 1191|  59.9k|  char* rootsphon[MAX_ROOTS];
 1192|  59.9k|  int scores[MAX_ROOTS];
 1193|  59.9k|  int scoresphon[MAX_ROOTS];
 1194|  6.05M|  for (int i = 0; i < MAX_ROOTS; i++) {
  ------------------
  |  |   74|  6.05M|#define MAX_ROOTS 100
  ------------------
  |  Branch (1194:19): [True: 5.99M, False: 59.9k]
  ------------------
 1195|  5.99M|    roots[i] = nullptr;
 1196|  5.99M|    scores[i] = -100 * i;
 1197|  5.99M|    rootsphon[i] = nullptr;
 1198|  5.99M|    scoresphon[i] = -100 * i;
 1199|  5.99M|  }
 1200|  59.9k|  bool has_roots = false;
 1201|  59.9k|  bool has_rootsphon = false;
 1202|  59.9k|  lp = MAX_ROOTS - 1;
  ------------------
  |  |   74|  59.9k|#define MAX_ROOTS 100
  ------------------
 1203|  59.9k|  lpphon = MAX_ROOTS - 1;
  ------------------
  |  |   74|  59.9k|#define MAX_ROOTS 100
  ------------------
 1204|  59.9k|  int low = NGRAM_LOWERING;
  ------------------
  |  |   83|  59.9k|#define NGRAM_LOWERING (1 << 2)
  ------------------
 1205|       |
 1206|  59.9k|  std::string w2;
 1207|  59.9k|  const char* word = w;
 1208|       |
 1209|  59.9k|  int nc;
 1210|       |  // word reversing wrapper for complex prefixes
 1211|  59.9k|  if (complexprefixes) {
  ------------------
  |  Branch (1211:7): [True: 3.40k, False: 56.5k]
  ------------------
 1212|  3.40k|    w2.assign(w);
 1213|  3.40k|    if (utf8)
  ------------------
  |  Branch (1213:9): [True: 0, False: 3.40k]
  ------------------
 1214|      0|      reverseword_utf(w2);
 1215|  3.40k|    else
 1216|  3.40k|      reverseword(w2);
 1217|  3.40k|    word = w2.c_str();
 1218|  3.40k|    nc = (int)w2.size();
 1219|  56.5k|  } else {
 1220|  56.5k|    nc = (int)strlen(word);
 1221|  56.5k|  }
 1222|       |
 1223|  59.9k|  std::vector<w_char> u8;
 1224|  59.9k|  int n = (utf8) ? u8_u16(u8, word) : nc;
  ------------------
  |  Branch (1224:11): [True: 25.1k, False: 34.7k]
  ------------------
 1225|       |
 1226|       |  // set character based ngram suggestion for words with non-BMP Unicode
 1227|       |  // characters
 1228|  59.9k|  const struct cs_info* origconv = csconv;
 1229|  59.9k|  if (n == -1) {
  ------------------
  |  Branch (1229:7): [True: 2.13k, False: 57.7k]
  ------------------
 1230|  2.13k|    utf8 = 0;  // XXX not state-free
 1231|  2.13k|    if (!csconv)
  ------------------
  |  Branch (1231:9): [True: 2.13k, False: 0]
  ------------------
 1232|  2.13k|      csconv = get_current_cs("iso88591"); // XXX not state-free
 1233|  2.13k|    n = nc;
 1234|  2.13k|    nonbmp = 1;
 1235|  2.13k|    low = 0;
 1236|  2.13k|  }
 1237|  59.9k|  ngsuggest_guard restore_state(nonbmp, origconv, &utf8, &csconv);
 1238|  59.9k|  int max_word_len = (utf8) ? MAXWORDUTF8LEN : MAXWORDLEN;
  ------------------
  |  |   85|  23.0k|#define MAXWORDUTF8LEN (MAXWORDLEN * 3)
  |  |  ------------------
  |  |  |  |   90|  23.0k|#define MAXWORDLEN 100
  |  |  ------------------
  ------------------
                int max_word_len = (utf8) ? MAXWORDUTF8LEN : MAXWORDLEN;
  ------------------
  |  |   90|  36.8k|#define MAXWORDLEN 100
  ------------------
  |  Branch (1238:22): [True: 23.0k, False: 36.8k]
  ------------------
 1239|       |  // ofz#59067 a replist entry can generate a very long word, abandon
 1240|       |  // ngram if that odd-edge case arises
 1241|  59.9k|  if (n > max_word_len * 4)
  ------------------
  |  Branch (1241:7): [True: 0, False: 59.9k]
  ------------------
 1242|      0|      return;
 1243|       |
 1244|  59.9k|  struct hentry* hp = nullptr;
 1245|  59.9k|  int col = -1;
 1246|  59.9k|  phonetable* ph = (pAMgr) ? pAMgr->get_phonetable() : nullptr;
  ------------------
  |  Branch (1246:20): [True: 59.9k, False: 0]
  ------------------
 1247|  59.9k|  std::string target;
 1248|  59.9k|  std::string candidate;
 1249|  59.9k|  std::vector<w_char> w_candidate;
 1250|  59.9k|  if (ph) {
  ------------------
  |  Branch (1250:7): [True: 3.42k, False: 56.4k]
  ------------------
 1251|  3.42k|    if (utf8) {
  ------------------
  |  Branch (1251:9): [True: 0, False: 3.42k]
  ------------------
 1252|      0|      u8_u16(w_candidate, word);
 1253|      0|      mkallcap_utf(w_candidate, langnum);
 1254|      0|      u16_u8(candidate, w_candidate);
 1255|  3.42k|    } else {
 1256|  3.42k|      candidate.assign(word);
 1257|  3.42k|      if (!nonbmp)
  ------------------
  |  Branch (1257:11): [True: 3.42k, False: 0]
  ------------------
 1258|  3.42k|        mkallcap(candidate, csconv);
 1259|  3.42k|    }
 1260|  3.42k|    target = phonet(candidate, *ph);  // XXX phonet() is 8-bit (nc, not n)
 1261|  3.42k|  }
 1262|       |
 1263|  59.9k|  FLAG forbiddenword = pAMgr ? pAMgr->get_forbiddenword() : FLAG_NULL;
  ------------------
  |  |   95|  59.9k|#define FLAG unsigned short
  ------------------
                FLAG forbiddenword = pAMgr ? pAMgr->get_forbiddenword() : FLAG_NULL;
  ------------------
  |  |   96|  59.9k|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1263:24): [True: 59.9k, False: 0]
  ------------------
 1264|  59.9k|  FLAG nosuggest = pAMgr ? pAMgr->get_nosuggest() : FLAG_NULL;
  ------------------
  |  |   95|  59.9k|#define FLAG unsigned short
  ------------------
                FLAG nosuggest = pAMgr ? pAMgr->get_nosuggest() : FLAG_NULL;
  ------------------
  |  |   96|  59.9k|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1264:20): [True: 59.9k, False: 0]
  ------------------
 1265|  59.9k|  FLAG nongramsuggest = pAMgr ? pAMgr->get_nongramsuggest() : FLAG_NULL;
  ------------------
  |  |   95|  59.9k|#define FLAG unsigned short
  ------------------
                FLAG nongramsuggest = pAMgr ? pAMgr->get_nongramsuggest() : FLAG_NULL;
  ------------------
  |  |   96|  59.9k|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1265:25): [True: 59.9k, False: 0]
  ------------------
 1266|  59.9k|  FLAG onlyincompound = pAMgr ? pAMgr->get_onlyincompound() : FLAG_NULL;
  ------------------
  |  |   95|  59.9k|#define FLAG unsigned short
  ------------------
                FLAG onlyincompound = pAMgr ? pAMgr->get_onlyincompound() : FLAG_NULL;
  ------------------
  |  |   96|  59.9k|#define FLAG_NULL 0x00
  ------------------
  |  Branch (1266:25): [True: 59.9k, False: 0]
  ------------------
 1267|       |
 1268|  59.9k|  std::vector<w_char> w_word, w_target;
 1269|  59.9k|  if (utf8) {
  ------------------
  |  Branch (1269:7): [True: 23.0k, False: 36.8k]
  ------------------
 1270|  23.0k|    u8_u16(w_word, word);
 1271|  23.0k|    u8_u16(w_target, target);
 1272|  23.0k|  }
 1273|       |
 1274|  59.9k|  std::string f;
 1275|  59.9k|  std::vector<w_char> w_f;
 1276|       |
 1277|  59.9k|  for (const auto& i : rHMgr) {
  ------------------
  |  Branch (1277:22): [True: 59.9k, False: 59.9k]
  ------------------
 1278|  1.92M|    while (nullptr != (hp = i->walk_hashtable(col, hp))) {
  ------------------
  |  Branch (1278:12): [True: 1.86M, False: 59.9k]
  ------------------
 1279|       |      // skip exceptions
 1280|  1.86M|      if (
 1281|       |           // skip it, if the word length different by 5 or
 1282|       |           // more characters (to avoid strange suggestions)
 1283|       |           // (except Unicode characters over BMP)
 1284|  1.86M|           (((abs(n - hp->clen) > 4) && !nonbmp)) ||
  ------------------
  |  Branch (1284:12): [True: 1.33M, False: 529k]
  |  Branch (1284:14): [True: 1.24M, False: 625k]
  |  Branch (1284:41): [True: 1.18M, False: 61.6k]
  ------------------
 1285|       |           // don't suggest capitalized dictionary words for
 1286|       |           // lower case misspellings in ngram suggestions, except
 1287|       |           // - PHONE usage, or
 1288|       |           // - in the case of German, where not only proper
 1289|       |           //   nouns are capitalized, or
 1290|       |           // - the capitalized word has special pronunciation
 1291|   687k|           ((captype == NOCAP) && (hp->var & H_OPT_INITCAP) &&
  ------------------
  |  |   92|   687k|#define NOCAP 0
  ------------------
                         ((captype == NOCAP) && (hp->var & H_OPT_INITCAP) &&
  ------------------
  |  |   50|   184k|#define H_OPT_INITCAP (1 << 3)  // is dictionary word capitalized?
  ------------------
  |  Branch (1291:13): [True: 184k, False: 502k]
  |  Branch (1291:35): [True: 83.4k, False: 101k]
  ------------------
 1292|  83.4k|              !ph && (langnum != LANG_de) && !(hp->var & H_OPT_PHON)) ||
  ------------------
  |  |   49|  81.7k|#define H_OPT_PHON (1 << 2)     // is there ph: field in the morphological data?
  ------------------
  |  Branch (1292:15): [True: 81.7k, False: 1.68k]
  |  Branch (1292:22): [True: 81.7k, False: 0]
  |  Branch (1292:46): [True: 81.7k, False: 0]
  ------------------
 1293|       |           // or it has one of the following special flags
 1294|   605k|           ((hp->astr) && (pAMgr) &&
  ------------------
  |  Branch (1294:13): [True: 168k, False: 436k]
  |  Branch (1294:27): [True: 168k, False: 0]
  ------------------
 1295|   168k|             (TESTAFF(hp->astr, forbiddenword, hp->alen) ||
  ------------------
  |  |   99|   337k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 2.06k, False: 166k]
  |  |  ------------------
  ------------------
 1296|   166k|             TESTAFF(hp->astr, ONLYUPCASEFLAG, hp->alen) ||
  ------------------
  |  |   99|   335k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 73.4k, False: 93.2k]
  |  |  ------------------
  ------------------
 1297|  93.2k|             TESTAFF(hp->astr, nosuggest, hp->alen) ||
  ------------------
  |  |   99|   262k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 93.2k]
  |  |  ------------------
  ------------------
 1298|  93.2k|             TESTAFF(hp->astr, nongramsuggest, hp->alen) ||
  ------------------
  |  |   99|   262k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 93.2k]
  |  |  ------------------
  ------------------
 1299|  93.2k|             TESTAFF(hp->astr, onlyincompound, hp->alen)))
  ------------------
  |  |   99|  93.2k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 93.2k]
  |  |  ------------------
  ------------------
 1300|  1.86M|         )
 1301|  1.33M|        continue;
 1302|       |
 1303|   529k|      if (utf8) {
  ------------------
  |  Branch (1303:11): [True: 235k, False: 294k]
  ------------------
 1304|   235k|        u8_u16(w_f, HENTRY_WORD(hp));
  ------------------
  |  |   54|   235k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1305|       |
 1306|   235k|        int leftcommon = leftcommonsubstring(w_word, w_f);
 1307|   235k|        if (low) {
  ------------------
  |  Branch (1307:13): [True: 235k, False: 0]
  ------------------
 1308|       |          // lowering dictionary word
 1309|   235k|          mkallsmall_utf(w_f, langnum);
 1310|   235k|        }
 1311|   235k|        sc = ngram(3, w_word, w_f, NGRAM_LONGER_WORSE) + leftcommon;
  ------------------
  |  |   81|   235k|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1312|   294k|      } else {
 1313|   294k|        f.assign(HENTRY_WORD(hp));
  ------------------
  |  |   54|   294k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1314|       |
 1315|   294k|        int leftcommon = leftcommonsubstring(word, f.c_str());
 1316|   294k|        if (low) {
  ------------------
  |  Branch (1316:13): [True: 266k, False: 27.9k]
  ------------------
 1317|       |          // lowering dictionary word
 1318|   266k|          mkallsmall(f, csconv);
 1319|   266k|        }
 1320|   294k|        sc = ngram(3, word, f, NGRAM_LONGER_WORSE) + leftcommon;
  ------------------
  |  |   81|   294k|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1321|   294k|      }
 1322|       |
 1323|       |      // check special pronunciation
 1324|   529k|      f.clear();
 1325|   529k|      if ((hp->var & H_OPT_PHON) &&
  ------------------
  |  |   49|   529k|#define H_OPT_PHON (1 << 2)     // is there ph: field in the morphological data?
  ------------------
  |  Branch (1325:11): [True: 817, False: 529k]
  |  Branch (1325:11): [True: 817, False: 529k]
  ------------------
 1326|    817|          copy_field(f, HENTRY_DATA(hp), MORPH_PHON)) {
  ------------------
  |  |  114|    817|#define MORPH_PHON "ph:"
  ------------------
  |  Branch (1326:11): [True: 817, False: 0]
  ------------------
 1327|    817|        int sc2;
 1328|    817|        if (utf8) {
  ------------------
  |  Branch (1328:13): [True: 0, False: 817]
  ------------------
 1329|      0|          u8_u16(w_f, f);
 1330|       |
 1331|      0|          int leftcommon = leftcommonsubstring(w_word, w_f);
 1332|      0|          if (low) {
  ------------------
  |  Branch (1332:15): [True: 0, False: 0]
  ------------------
 1333|       |            // lowering dictionary word
 1334|      0|            mkallsmall_utf(w_f, langnum);
 1335|      0|          }
 1336|      0|          sc2 = ngram(3, w_word, w_f, NGRAM_LONGER_WORSE) + leftcommon;
  ------------------
  |  |   81|      0|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1337|    817|        } else {
 1338|    817|          int leftcommon = leftcommonsubstring(word, f.c_str());
 1339|    817|          if (low) {
  ------------------
  |  Branch (1339:15): [True: 817, False: 0]
  ------------------
 1340|       |            // lowering dictionary word
 1341|    817|            mkallsmall(f, csconv);
 1342|    817|          }
 1343|    817|          sc2 = ngram(3, word, f, NGRAM_LONGER_WORSE) + leftcommon;
  ------------------
  |  |   81|    817|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1344|    817|        }
 1345|    817|        if (sc2 > sc)
  ------------------
  |  Branch (1345:13): [True: 412, False: 405]
  ------------------
 1346|    412|          sc = sc2;
 1347|    817|      }
 1348|       |
 1349|   529k|      int scphon = -20000;
 1350|   529k|      if (ph && (sc > 2) && (abs(n - (int)hp->clen) <= 3)) {
  ------------------
  |  Branch (1350:11): [True: 31.7k, False: 498k]
  |  Branch (1350:17): [True: 6.98k, False: 24.7k]
  |  Branch (1350:29): [True: 5.84k, False: 1.14k]
  ------------------
 1351|  5.84k|        if (utf8) {
  ------------------
  |  Branch (1351:13): [True: 0, False: 5.84k]
  ------------------
 1352|      0|          u8_u16(w_candidate, HENTRY_WORD(hp));
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1353|      0|          mkallcap_utf(w_candidate, langnum);
 1354|      0|          u16_u8(candidate, w_candidate);
 1355|  5.84k|        } else {
 1356|  5.84k|          candidate = HENTRY_WORD(hp);
  ------------------
  |  |   54|  5.84k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1357|  5.84k|          mkallcap(candidate, csconv);
 1358|  5.84k|        }
 1359|  5.84k|        f = phonet(candidate, *ph);
 1360|  5.84k|        if (utf8) {
  ------------------
  |  Branch (1360:13): [True: 0, False: 5.84k]
  ------------------
 1361|      0|          u8_u16(w_f, f);
 1362|      0|          scphon = 2 * ngram(3, w_target, w_f,
 1363|      0|                             NGRAM_LONGER_WORSE);
  ------------------
  |  |   81|      0|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1364|  5.84k|        } else {
 1365|  5.84k|          scphon = 2 * ngram(3, target, f,
 1366|  5.84k|                             NGRAM_LONGER_WORSE);
  ------------------
  |  |   81|  5.84k|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
 1367|  5.84k|        }
 1368|  5.84k|      }
 1369|       |
 1370|   529k|      if (sc > scores[lp]) {
  ------------------
  |  Branch (1370:11): [True: 529k, False: 0]
  ------------------
 1371|   529k|        scores[lp] = sc;
 1372|   529k|        roots[lp] = hp;
 1373|   529k|        has_roots = true;
 1374|   529k|        lval = sc;
 1375|  53.5M|        for (int j = 0; j < MAX_ROOTS; j++)
  ------------------
  |  |   74|  53.5M|#define MAX_ROOTS 100
  ------------------
  |  Branch (1375:25): [True: 52.9M, False: 529k]
  ------------------
 1376|  52.9M|          if (scores[j] < lval) {
  ------------------
  |  Branch (1376:15): [True: 44.5M, False: 8.48M]
  ------------------
 1377|  44.5M|            lp = j;
 1378|  44.5M|            lval = scores[j];
 1379|  44.5M|          }
 1380|   529k|      }
 1381|       |
 1382|   529k|      if (scphon > scoresphon[lpphon]) {
  ------------------
  |  Branch (1382:11): [True: 5.84k, False: 524k]
  ------------------
 1383|  5.84k|        scoresphon[lpphon] = scphon;
 1384|  5.84k|        rootsphon[lpphon] = HENTRY_WORD(hp);
  ------------------
  |  |   54|  5.84k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1385|  5.84k|        has_rootsphon = true;
 1386|  5.84k|        lval = scphon;
 1387|   590k|        for (int j = 0; j < MAX_ROOTS; j++)
  ------------------
  |  |   74|   590k|#define MAX_ROOTS 100
  ------------------
  |  Branch (1387:25): [True: 584k, False: 5.84k]
  ------------------
 1388|   584k|          if (scoresphon[j] < lval) {
  ------------------
  |  Branch (1388:15): [True: 517k, False: 66.5k]
  ------------------
 1389|   517k|            lpphon = j;
 1390|   517k|            lval = scoresphon[j];
 1391|   517k|          }
 1392|  5.84k|      }
 1393|   529k|    }
 1394|  59.9k|  }
 1395|       |
 1396|  59.9k|  if (!has_roots && !has_rootsphon) {
  ------------------
  |  Branch (1396:7): [True: 13.9k, False: 45.9k]
  |  Branch (1396:21): [True: 13.9k, False: 0]
  ------------------
 1397|       |    // with no roots there will be no guesses and no point running
 1398|       |    // ngram
 1399|  13.9k|    return;
 1400|  13.9k|  }
 1401|       |
 1402|       |  // find minimum threshold for a passable suggestion
 1403|       |  // mangle original word three differnt ways
 1404|       |  // and score them to generate a minimum acceptable score
 1405|  45.9k|  std::vector<w_char> w_mw;
 1406|  45.9k|  int thresh = 0;
 1407|   183k|  for (int sp = 1; sp < 4; sp++) {
  ------------------
  |  Branch (1407:20): [True: 137k, False: 45.9k]
  ------------------
 1408|   137k|    if (utf8) {
  ------------------
  |  Branch (1408:9): [True: 55.9k, False: 82.0k]
  ------------------
 1409|  55.9k|      w_mw = w_word;
 1410|   103k|      for (int k = sp; k < n; k += 4) {
  ------------------
  |  Branch (1410:24): [True: 47.7k, False: 55.9k]
  ------------------
 1411|  47.7k|        w_mw[k].l = '*';
 1412|  47.7k|        w_mw[k].h = 0;
 1413|  47.7k|      }
 1414|       |
 1415|  55.9k|      if (low) {
  ------------------
  |  Branch (1415:11): [True: 55.9k, False: 0]
  ------------------
 1416|       |        // lowering dictionary word
 1417|  55.9k|        mkallsmall_utf(w_mw, langnum);
 1418|  55.9k|      }
 1419|       |
 1420|  55.9k|      thresh += ngram(n, w_word, w_mw, NGRAM_ANY_MISMATCH);
  ------------------
  |  |   82|  55.9k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1421|  82.0k|    } else {
 1422|  82.0k|      std::string mw = word;
 1423|   195k|      for (int k = sp; k < n; k += 4)
  ------------------
  |  Branch (1423:24): [True: 113k, False: 82.0k]
  ------------------
 1424|   113k|        mw[k] = '*';
 1425|       |
 1426|  82.0k|      if (low) {
  ------------------
  |  Branch (1426:11): [True: 75.6k, False: 6.39k]
  ------------------
 1427|       |        // lowering dictionary word
 1428|  75.6k|        mkallsmall(mw, csconv);
 1429|  75.6k|      }
 1430|       |
 1431|  82.0k|      thresh += ngram(n, word, mw, NGRAM_ANY_MISMATCH);
  ------------------
  |  |   82|  82.0k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1432|  82.0k|    }
 1433|   137k|  }
 1434|  45.9k|  thresh = thresh / 3;
 1435|  45.9k|  thresh--;
 1436|       |
 1437|       |  // now expand affixes on each of these root words and
 1438|       |  // and use length adjusted ngram scores to select
 1439|       |  // possible suggestions
 1440|  45.9k|  char* guess[MAX_GUESS];
 1441|  45.9k|  char* guessorig[MAX_GUESS];
 1442|  45.9k|  int gscore[MAX_GUESS];
 1443|  9.24M|  for (int i = 0; i < MAX_GUESS; i++) {
  ------------------
  |  |   76|  9.24M|#define MAX_GUESS 200
  ------------------
  |  Branch (1443:19): [True: 9.19M, False: 45.9k]
  ------------------
 1444|  9.19M|    guess[i] = nullptr;
 1445|  9.19M|    guessorig[i] = nullptr;
 1446|  9.19M|    gscore[i] = -100 * i;
 1447|  9.19M|  }
 1448|       |
 1449|  45.9k|  lp = MAX_GUESS - 1;
  ------------------
  |  |   76|  45.9k|#define MAX_GUESS 200
  ------------------
 1450|       |
 1451|  45.9k|  std::vector<guessword> glst(MAX_WORDS);
  ------------------
  |  |   75|  45.9k|#define MAX_WORDS 100
  ------------------
 1452|       |
 1453|  4.59M|  for (auto& root : roots) {
  ------------------
  |  Branch (1453:19): [True: 4.59M, False: 45.9k]
  ------------------
 1454|  4.59M|    if (root) {
  ------------------
  |  Branch (1454:9): [True: 529k, False: 4.06M]
  ------------------
 1455|   529k|      struct hentry* rp = root;
 1456|       |
 1457|   529k|      f.clear();
 1458|   529k|      const char* field = nullptr;
 1459|   529k|      if ((rp->var & H_OPT_PHON) && copy_field(f, HENTRY_DATA(rp), MORPH_PHON))
  ------------------
  |  |   49|   529k|#define H_OPT_PHON (1 << 2)     // is there ph: field in the morphological data?
  ------------------
                    if ((rp->var & H_OPT_PHON) && copy_field(f, HENTRY_DATA(rp), MORPH_PHON))
  ------------------
  |  |  114|    817|#define MORPH_PHON "ph:"
  ------------------
  |  Branch (1459:11): [True: 817, False: 529k]
  |  Branch (1459:11): [True: 817, False: 529k]
  |  Branch (1459:37): [True: 817, False: 0]
  ------------------
 1460|    817|          field = f.c_str();
 1461|   529k|      int nw = pAMgr->expand_rootword(
 1462|   529k|          glst.data(), MAX_WORDS, HENTRY_WORD(rp), rp->blen, rp->astr, rp->alen, word,
  ------------------
  |  |   75|   529k|#define MAX_WORDS 100
  ------------------
                        glst.data(), MAX_WORDS, HENTRY_WORD(rp), rp->blen, rp->astr, rp->alen, word,
  ------------------
  |  |   54|   529k|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1463|   529k|          nc, field);
 1464|       |
 1465|  1.05M|      for (int k = 0; k < nw; k++) {
  ------------------
  |  Branch (1465:23): [True: 528k, False: 529k]
  ------------------
 1466|   528k|        if (utf8) {
  ------------------
  |  Branch (1466:13): [True: 235k, False: 293k]
  ------------------
 1467|   235k|          u8_u16(w_f, glst[k].word);
 1468|       |
 1469|   235k|          int leftcommon = leftcommonsubstring(w_word, w_f);
 1470|   235k|          if (low) {
  ------------------
  |  Branch (1470:15): [True: 235k, False: 0]
  ------------------
 1471|       |            // lowering dictionary word
 1472|   235k|            mkallsmall_utf(w_f, langnum);
 1473|   235k|          }
 1474|       |
 1475|   235k|          sc = ngram(n, w_word, w_f, NGRAM_ANY_MISMATCH) + leftcommon;
  ------------------
  |  |   82|   235k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1476|   293k|        } else {
 1477|   293k|          f = glst[k].word;
 1478|       |
 1479|   293k|          int leftcommon = leftcommonsubstring(word, f.c_str());
 1480|   293k|          if (low) {
  ------------------
  |  Branch (1480:15): [True: 265k, False: 27.9k]
  ------------------
 1481|       |            // lowering dictionary word
 1482|   265k|            mkallsmall(f, csconv);
 1483|   265k|          }
 1484|       |
 1485|   293k|          sc = ngram(n, word, f, NGRAM_ANY_MISMATCH) + leftcommon;
  ------------------
  |  |   82|   293k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1486|   293k|        }
 1487|       |
 1488|   528k|        if (sc > thresh) {
  ------------------
  |  Branch (1488:13): [True: 88.1k, False: 440k]
  ------------------
 1489|  88.1k|          if (sc > gscore[lp]) {
  ------------------
  |  Branch (1489:15): [True: 88.1k, False: 0]
  ------------------
 1490|  88.1k|            if (guess[lp]) {
  ------------------
  |  Branch (1490:17): [True: 0, False: 88.1k]
  ------------------
 1491|      0|              delete[] guess[lp];
 1492|      0|              if (guessorig[lp]) {
  ------------------
  |  Branch (1492:19): [True: 0, False: 0]
  ------------------
 1493|      0|                delete[] guessorig[lp];
 1494|      0|                guessorig[lp] = nullptr;
 1495|      0|              }
 1496|      0|            }
 1497|  88.1k|            gscore[lp] = sc;
 1498|  88.1k|            guess[lp] = glst[k].word;
 1499|  88.1k|            guessorig[lp] = glst[k].orig;
 1500|  88.1k|            lval = sc;
 1501|  17.7M|            for (int j = 0; j < MAX_GUESS; j++)
  ------------------
  |  |   76|  17.7M|#define MAX_GUESS 200
  ------------------
  |  Branch (1501:29): [True: 17.6M, False: 88.1k]
  ------------------
 1502|  17.6M|              if (gscore[j] < lval) {
  ------------------
  |  Branch (1502:19): [True: 16.8M, False: 758k]
  ------------------
 1503|  16.8M|                lp = j;
 1504|  16.8M|                lval = gscore[j];
 1505|  16.8M|              }
 1506|  88.1k|          } else {
 1507|      0|            delete[] glst[k].word;
 1508|      0|            delete[] glst[k].orig;
 1509|      0|          }
 1510|   440k|        } else {
 1511|   440k|          delete[] glst[k].word;
 1512|   440k|          delete[] glst[k].orig;
 1513|   440k|        }
 1514|   528k|      }
 1515|   529k|    }
 1516|  4.59M|  }
 1517|  45.9k|  glst.clear();
 1518|       |
 1519|       |  // now we are done generating guesses
 1520|       |  // sort in order of decreasing score
 1521|       |
 1522|  45.9k|  bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS);
  ------------------
  |  |   76|  45.9k|#define MAX_GUESS 200
  ------------------
 1523|  45.9k|  if (ph)
  ------------------
  |  Branch (1523:7): [True: 2.73k, False: 43.2k]
  ------------------
 1524|  2.73k|    bubblesort(&rootsphon[0], nullptr, &scoresphon[0], MAX_ROOTS);
  ------------------
  |  |   74|  2.73k|#define MAX_ROOTS 100
  ------------------
 1525|       |
 1526|       |  // weight suggestions with a similarity index, based on
 1527|       |  // the longest common subsequent algorithm and resort
 1528|       |
 1529|  45.9k|  int is_swap = 0;
 1530|  45.9k|  int re = 0;
 1531|  45.9k|  double fact = 1.0;
 1532|  45.9k|  if (pAMgr) {
  ------------------
  |  Branch (1532:7): [True: 45.9k, False: 0]
  ------------------
 1533|  45.9k|    int maxd = pAMgr->get_maxdiff();
 1534|  45.9k|    if (maxd >= 0)
  ------------------
  |  Branch (1534:9): [True: 0, False: 45.9k]
  ------------------
 1535|      0|      fact = (10.0 - maxd) / 5.0;
 1536|  45.9k|  }
 1537|       |
 1538|  45.9k|  std::vector<w_char> w_gl;
 1539|  8.88M|  for (int i = 0; i < MAX_GUESS; i++) {
  ------------------
  |  |   76|  8.88M|#define MAX_GUESS 200
  ------------------
  |  Branch (1539:19): [True: 8.84M, False: 44.2k]
  ------------------
 1540|  8.84M|    if (guess[i]) {
  ------------------
  |  Branch (1540:9): [True: 69.2k, False: 8.77M]
  ------------------
 1541|       |      // lowering guess[i]
 1542|  69.2k|      std::string gl;
 1543|  69.2k|      int len;
 1544|  69.2k|      if (utf8) {
  ------------------
  |  Branch (1544:11): [True: 21.4k, False: 47.7k]
  ------------------
 1545|  21.4k|        len = u8_u16(w_gl, guess[i]);
 1546|  21.4k|        mkallsmall_utf(w_gl, langnum);
 1547|  21.4k|        u16_u8(gl, w_gl);
 1548|  47.7k|      } else {
 1549|  47.7k|        gl.assign(guess[i]);
 1550|  47.7k|        if (!nonbmp)
  ------------------
  |  Branch (1550:13): [True: 47.6k, False: 78]
  ------------------
 1551|  47.6k|          mkallsmall(gl, csconv);
 1552|  47.7k|        len = strlen(guess[i]);
 1553|  47.7k|      }
 1554|       |
 1555|  69.2k|      int _lcs = lcslen(word, gl.c_str());
 1556|       |
 1557|       |      // same characters with different casing
 1558|  69.2k|      if ((n == len) && (n == _lcs)) {
  ------------------
  |  Branch (1558:11): [True: 17.2k, False: 51.9k]
  |  Branch (1558:25): [True: 1.78k, False: 15.4k]
  ------------------
 1559|  1.78k|        gscore[i] += 2000;
 1560|  1.78k|        break;
 1561|  1.78k|      }
 1562|       |      // using 2-gram instead of 3, and other weightening
 1563|       |
 1564|  67.4k|      if (utf8) {
  ------------------
  |  Branch (1564:11): [True: 20.0k, False: 47.3k]
  ------------------
 1565|  20.0k|        u8_u16(w_gl, gl);
 1566|       |        //w_gl is lowercase already at this point
 1567|  20.0k|        re = ngram(2, w_word, w_gl, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|  20.0k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                      re = ngram(2, w_word, w_gl, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|  20.0k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1568|  20.0k|        if (low) {
  ------------------
  |  Branch (1568:13): [True: 20.0k, False: 0]
  ------------------
 1569|  20.0k|          w_f = w_word;
 1570|       |          // lowering dictionary word
 1571|  20.0k|          mkallsmall_utf(w_f, langnum);
 1572|  20.0k|          re += ngram(2, w_gl, w_f, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|  20.0k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                        re += ngram(2, w_gl, w_f, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|  20.0k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1573|  20.0k|        } else {
 1574|      0|          re += ngram(2, w_gl, w_word, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|      0|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                        re += ngram(2, w_gl, w_word, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|      0|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1575|      0|        }
 1576|  47.3k|      } else {
 1577|       |        //gl is lowercase already at this point
 1578|  47.3k|        re = ngram(2, word, gl, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|  47.3k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                      re = ngram(2, word, gl, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|  47.3k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1579|  47.3k|        if (low) {
  ------------------
  |  Branch (1579:13): [True: 47.2k, False: 78]
  ------------------
 1580|  47.2k|          f = word;
 1581|       |          // lowering dictionary word
 1582|  47.2k|          mkallsmall(f, csconv);
 1583|  47.2k|          re += ngram(2, gl, f, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|  47.2k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                        re += ngram(2, gl, f, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|  47.2k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1584|  47.2k|        } else {
 1585|     78|          re += ngram(2, gl, word, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   82|     78|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
                        re += ngram(2, gl, word, NGRAM_ANY_MISMATCH | NGRAM_WEIGHTED);
  ------------------
  |  |   84|     78|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
 1586|     78|        }
 1587|  47.3k|      }
 1588|       |
 1589|  67.4k|      int ngram_score, leftcommon_score;
 1590|  67.4k|      if (utf8) {
  ------------------
  |  Branch (1590:11): [True: 20.0k, False: 47.3k]
  ------------------
 1591|       |        //w_gl is lowercase already at this point
 1592|  20.0k|        ngram_score = ngram(4, w_word, w_gl, NGRAM_ANY_MISMATCH);
  ------------------
  |  |   82|  20.0k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1593|  20.0k|        leftcommon_score = leftcommonsubstring(w_word, w_gl);
 1594|  47.3k|      } else {
 1595|       |        //gl is lowercase already at this point
 1596|  47.3k|        ngram_score = ngram(4, word, gl, NGRAM_ANY_MISMATCH);
  ------------------
  |  |   82|  47.3k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
 1597|  47.3k|        leftcommon_score = leftcommonsubstring(word, gl.c_str());
 1598|  47.3k|      }
 1599|  67.4k|      gscore[i] =
 1600|       |          // length of longest common subsequent minus length difference
 1601|  67.4k|          2 * _lcs - abs((int)(n - len)) +
 1602|       |          // weight length of the left common substring
 1603|  67.4k|          leftcommon_score +
 1604|       |          // weight equal character positions
 1605|  67.4k|          (!nonbmp && commoncharacterpositions(word, gl.c_str(), &is_swap)
  ------------------
  |  Branch (1605:12): [True: 67.3k, False: 78]
  |  Branch (1605:23): [True: 55.9k, False: 11.3k]
  ------------------
 1606|  67.4k|               ? 1
 1607|  67.4k|               : 0) +
 1608|       |          // swap character (not neighboring)
 1609|  67.4k|          ((is_swap) ? 10 : 0) +
  ------------------
  |  Branch (1609:12): [True: 134, False: 67.3k]
  ------------------
 1610|       |          // ngram
 1611|  67.4k|          ngram_score +
 1612|       |          // weighted ngrams
 1613|  67.4k|          re +
 1614|       |          // different limit for dictionaries with PHONE rules
 1615|  67.4k|          (ph ? (re < len * fact ? -1000 : 0)
  ------------------
  |  Branch (1615:12): [True: 4.51k, False: 62.9k]
  |  Branch (1615:18): [True: 3.34k, False: 1.16k]
  ------------------
 1616|  67.4k|              : (re < (n + len) * fact ? -1000 : 0));
  ------------------
  |  Branch (1616:18): [True: 57.7k, False: 5.20k]
  ------------------
 1617|  67.4k|    }
 1618|  8.84M|  }
 1619|       |
 1620|  45.9k|  bubblesort(&guess[0], &guessorig[0], &gscore[0], MAX_GUESS);
  ------------------
  |  |   76|  45.9k|#define MAX_GUESS 200
  ------------------
 1621|       |
 1622|       |  // phonetic version
 1623|  45.9k|  if (ph)
  ------------------
  |  Branch (1623:7): [True: 2.73k, False: 43.2k]
  ------------------
 1624|   275k|    for (int i = 0; i < MAX_ROOTS; i++) {
  ------------------
  |  |   74|   275k|#define MAX_ROOTS 100
  ------------------
  |  Branch (1624:21): [True: 273k, False: 2.73k]
  ------------------
 1625|   273k|      if (rootsphon[i]) {
  ------------------
  |  Branch (1625:11): [True: 5.84k, False: 267k]
  ------------------
 1626|       |        // lowering rootphon[i]
 1627|  5.84k|        std::string gl;
 1628|  5.84k|        int len;
 1629|  5.84k|        if (utf8) {
  ------------------
  |  Branch (1629:13): [True: 0, False: 5.84k]
  ------------------
 1630|      0|          len = u8_u16(w_gl, rootsphon[i]);
 1631|      0|          mkallsmall_utf(w_gl, langnum);
 1632|      0|          u16_u8(gl, w_gl);
 1633|  5.84k|        } else {
 1634|  5.84k|          gl.assign(rootsphon[i]);
 1635|  5.84k|          if (!nonbmp)
  ------------------
  |  Branch (1635:15): [True: 5.84k, False: 0]
  ------------------
 1636|  5.84k|            mkallsmall(gl, csconv);
 1637|  5.84k|          len = strlen(rootsphon[i]);
 1638|  5.84k|        }
 1639|       |
 1640|       |        // weight length of the left common substring
 1641|  5.84k|        int leftcommon_score;
 1642|  5.84k|        if (utf8)
  ------------------
  |  Branch (1642:13): [True: 0, False: 5.84k]
  ------------------
 1643|      0|          leftcommon_score = leftcommonsubstring(w_word, w_gl);
 1644|  5.84k|        else
 1645|  5.84k|          leftcommon_score = leftcommonsubstring(word, gl.c_str());
 1646|       |        // heuristic weigthing of ngram scores
 1647|  5.84k|        scoresphon[i] += 2 * lcslen(word, gl) - abs((int)(n - len)) +
 1648|  5.84k|                         leftcommon_score;
 1649|  5.84k|      }
 1650|   273k|    }
 1651|       |
 1652|  45.9k|  if (ph)
  ------------------
  |  Branch (1652:7): [True: 2.73k, False: 43.2k]
  ------------------
 1653|  2.73k|    bubblesort(&rootsphon[0], nullptr, &scoresphon[0], MAX_ROOTS);
  ------------------
  |  |   74|  2.73k|#define MAX_ROOTS 100
  ------------------
 1654|       |
 1655|       |  // copy over
 1656|  45.9k|  size_t oldns = wlst.size();
 1657|       |
 1658|  45.9k|  int same = 0;
 1659|  9.24M|  for (int i = 0; i < MAX_GUESS; i++) {
  ------------------
  |  |   76|  9.24M|#define MAX_GUESS 200
  ------------------
  |  Branch (1659:19): [True: 9.19M, False: 45.9k]
  ------------------
 1660|  9.19M|    if (guess[i]) {
  ------------------
  |  Branch (1660:9): [True: 88.1k, False: 9.11M]
  ------------------
 1661|  88.1k|      if ((wlst.size() < oldns + maxngramsugs) && (wlst.size() < maxSug) &&
  ------------------
  |  Branch (1661:11): [True: 82.6k, False: 5.50k]
  |  Branch (1661:51): [True: 82.6k, False: 0]
  ------------------
 1662|  82.6k|          (!same || (gscore[i] > 1000))) {
  ------------------
  |  Branch (1662:12): [True: 14.8k, False: 67.8k]
  |  Branch (1662:21): [True: 0, False: 67.8k]
  ------------------
 1663|  14.8k|        int unique = 1;
 1664|       |        // leave only excellent suggestions, if exists
 1665|  14.8k|        if (gscore[i] > 1000)
  ------------------
  |  Branch (1665:13): [True: 1.78k, False: 13.0k]
  ------------------
 1666|  1.78k|          same = 1;
 1667|  13.0k|        else if (gscore[i] < -100) {
  ------------------
  |  Branch (1667:18): [True: 8.50k, False: 4.50k]
  ------------------
 1668|  8.50k|          same = 1;
 1669|       |          // keep the best ngram suggestions, unless in ONLYMAXDIFF mode
 1670|  8.50k|          if (wlst.size() > oldns || (pAMgr && pAMgr->get_onlymaxdiff())) {
  ------------------
  |  Branch (1670:15): [True: 828, False: 7.67k]
  |  Branch (1670:39): [True: 7.67k, False: 0]
  |  Branch (1670:48): [True: 0, False: 7.67k]
  ------------------
 1671|    828|            delete[] guess[i];
 1672|    828|            delete[] guessorig[i];
 1673|    828|            continue;
 1674|    828|          }
 1675|  8.50k|        }
 1676|  13.9k|        for (auto& j : wlst) {
  ------------------
  |  Branch (1676:22): [True: 8.97k, False: 12.1k]
  ------------------
 1677|       |          // don't suggest previous suggestions or a previous suggestion with
 1678|       |          // prefixes or affixes
 1679|  8.97k|          if ((!guessorig[i] && strstr(guess[i], j.c_str())) || (guessorig[i] && strstr(guessorig[i], j.c_str())) ||
  ------------------
  |  Branch (1679:15): [True: 1.86k, False: 7.10k]
  |  Branch (1679:16): [True: 8.97k, False: 0]
  |  Branch (1679:33): [True: 1.86k, False: 7.10k]
  |  Branch (1679:66): [True: 0, False: 7.10k]
  |  Branch (1679:82): [True: 0, False: 0]
  ------------------
 1680|       |              // check forbidden words
 1681|  7.10k|              !checkword(guess[i], 0, nullptr, nullptr)) {
  ------------------
  |  Branch (1681:15): [True: 0, False: 7.10k]
  ------------------
 1682|  1.86k|            unique = 0;
 1683|  1.86k|            break;
 1684|  1.86k|          }
 1685|  8.97k|        }
 1686|  13.9k|        if (unique) {
  ------------------
  |  Branch (1686:13): [True: 12.1k, False: 1.86k]
  ------------------
 1687|  12.1k|          if (guessorig[i]) {
  ------------------
  |  Branch (1687:15): [True: 0, False: 12.1k]
  ------------------
 1688|      0|            wlst.emplace_back(guessorig[i]);
 1689|  12.1k|          } else {
 1690|  12.1k|            wlst.emplace_back(guess[i]);
 1691|  12.1k|          }
 1692|  12.1k|        }
 1693|  13.9k|        delete[] guess[i];
 1694|  13.9k|        delete[] guessorig[i];
 1695|  73.3k|      } else {
 1696|  73.3k|        delete[] guess[i];
 1697|  73.3k|        delete[] guessorig[i];
 1698|  73.3k|      }
 1699|  88.1k|    }
 1700|  9.19M|  }
 1701|       |
 1702|  45.9k|  oldns = wlst.size();
 1703|  45.9k|  if (ph)
  ------------------
  |  Branch (1703:7): [True: 2.73k, False: 43.2k]
  ------------------
 1704|   273k|    for (auto& i : rootsphon) {
  ------------------
  |  Branch (1704:18): [True: 273k, False: 2.73k]
  ------------------
 1705|   273k|      if (i) {
  ------------------
  |  Branch (1705:11): [True: 5.84k, False: 267k]
  ------------------
 1706|  5.84k|        if ((wlst.size() < oldns + MAXPHONSUGS) && (wlst.size() < maxSug)) {
  ------------------
  |  |   78|  5.84k|#define MAXPHONSUGS 2
  ------------------
  |  Branch (1706:13): [True: 2.79k, False: 3.05k]
  |  Branch (1706:52): [True: 2.79k, False: 0]
  ------------------
 1707|  2.79k|          int unique = 1;
 1708|  5.16k|          for (auto& j : wlst) {
  ------------------
  |  Branch (1708:24): [True: 5.16k, False: 862]
  ------------------
 1709|       |            // don't suggest previous suggestions or a previous suggestion with
 1710|       |            // prefixes or affixes
 1711|  5.16k|            if (strstr(i, j.c_str()) ||
  ------------------
  |  Branch (1711:17): [True: 1.92k, False: 3.24k]
  |  Branch (1711:17): [True: 1.92k, False: 3.24k]
  ------------------
 1712|       |                // check forbidden words
 1713|  3.24k|                !checkword(i, 0, nullptr, nullptr)) {
  ------------------
  |  Branch (1713:17): [True: 0, False: 3.24k]
  ------------------
 1714|  1.92k|              unique = 0;
 1715|  1.92k|              break;
 1716|  1.92k|            }
 1717|  5.16k|          }
 1718|  2.79k|          if (unique) {
  ------------------
  |  Branch (1718:15): [True: 862, False: 1.92k]
  ------------------
 1719|    862|            wlst.emplace_back(i);
 1720|    862|          }
 1721|  2.79k|        }
 1722|  5.84k|      }
 1723|   273k|    }
 1724|  45.9k|}
_ZN10SuggestMgr9checkwordERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiPiPNS0_6chrono10time_pointINSA_12steady_clockENSA_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
 1735|  85.3M|                          std::chrono::steady_clock::time_point* timelimit) {
 1736|       |  // check overall suggestion time limit
 1737|  85.3M|  if (std::chrono::steady_clock::now() - suggest_start > TIMELIMIT_SUGGESTION_MS)
  ------------------
  |  |  105|  85.3M|#define TIMELIMIT_SUGGESTION_MS std::chrono::milliseconds(100)
  ------------------
  |  Branch (1737:7): [True: 1, False: 85.3M]
  ------------------
 1738|      1|    return 0;
 1739|       |
 1740|       |  // check time limit
 1741|  85.3M|  if (timer) {
  ------------------
  |  Branch (1741:7): [True: 2.18M, False: 83.1M]
  ------------------
 1742|  2.18M|    (*timer)--;
 1743|  2.18M|    if (!(*timer) && timelimit) {
  ------------------
  |  Branch (1743:9): [True: 17.4k, False: 2.17M]
  |  Branch (1743:22): [True: 17.4k, False: 0]
  ------------------
 1744|  17.4k|      if (std::chrono::steady_clock::now() - *timelimit > TIMELIMIT_MS)
  ------------------
  |  |  106|  17.4k|#define TIMELIMIT_MS std::chrono::milliseconds(50)
  ------------------
  |  Branch (1744:11): [True: 4, False: 17.4k]
  ------------------
 1745|      4|        return 0;
 1746|  17.4k|      *timer = MAXPLUSTIMER;
  ------------------
  |  |  108|  17.4k|#define MAXPLUSTIMER 100
  ------------------
 1747|  17.4k|    }
 1748|  2.18M|  }
 1749|       |
 1750|  85.3M|  if (pAMgr) {
  ------------------
  |  Branch (1750:7): [True: 85.3M, False: 0]
  ------------------
 1751|  85.3M|    struct hentry* rv = nullptr;
 1752|  85.3M|    int nosuffix = 0;
 1753|       |
 1754|  85.3M|    if (cpdsuggest >= 1) {
  ------------------
  |  Branch (1754:9): [True: 55.8M, False: 29.4M]
  ------------------
 1755|  55.8M|      if (pAMgr->get_compound()) {
  ------------------
  |  Branch (1755:11): [True: 13.9M, False: 41.9M]
  ------------------
 1756|  13.9M|        struct hentry* rv2 = nullptr;
 1757|  13.9M|        struct hentry* rwords[100] = {};  // buffer for COMPOUND pattern checking
 1758|  13.9M|        int info = (cpdsuggest == 1) ? SPELL_COMPOUND_2 : 0;
  ------------------
  |  |   85|  6.95M|#define SPELL_COMPOUND_2 (1 << 7)  // permit only 2 dictionary words in the compound
  ------------------
  |  Branch (1758:20): [True: 6.95M, False: 6.95M]
  ------------------
 1759|  13.9M|        AffixScratch scratch;
 1760|  13.9M|        rv = pAMgr->compound_check(word, 0, 0, 100, 0, nullptr, (hentry**)&rwords, 0, 1, &info, scratch);  // EXT
 1761|       |        // TODO filter 3-word or more compound words, as in spell()
 1762|       |        // (it's too slow to call suggest() here for all possible compound words)
 1763|  13.9M|        if (rv &&
  ------------------
  |  Branch (1763:13): [True: 0, False: 13.9M]
  |  Branch (1763:13): [True: 0, False: 13.9M]
  ------------------
 1764|      0|            (!(rv2 = pAMgr->lookup(word.c_str(), word.size())) || !rv2->astr ||
  ------------------
  |  Branch (1764:14): [True: 0, False: 0]
  |  Branch (1764:67): [True: 0, False: 0]
  ------------------
 1765|      0|             !(TESTAFF(rv2->astr, pAMgr->get_forbiddenword(), rv2->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1766|      0|               TESTAFF(rv2->astr, pAMgr->get_nosuggest(), rv2->alen))))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1767|      0|          return 3;  // XXX obsolote categorisation + only ICONV needs affix
 1768|       |                     // flag check?
 1769|  13.9M|      }
 1770|  55.8M|      return 0;
 1771|  55.8M|    }
 1772|       |
 1773|  29.4M|    rv = pAMgr->lookup(word.c_str(), word.size());
 1774|       |
 1775|  29.4M|    if (rv) {
  ------------------
  |  Branch (1775:9): [True: 49.0k, False: 29.4M]
  ------------------
 1776|  49.0k|      if ((rv->astr) &&
  ------------------
  |  Branch (1776:11): [True: 258, False: 48.8k]
  |  Branch (1776:11): [True: 0, False: 49.0k]
  ------------------
 1777|    258|          (TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) ||
  ------------------
  |  |   99|    516|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 258]
  |  |  ------------------
  ------------------
 1778|    258|           TESTAFF(rv->astr, pAMgr->get_nosuggest(), rv->alen) ||
  ------------------
  |  |   99|    516|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 258]
  |  |  ------------------
  ------------------
 1779|    258|           TESTAFF(rv->astr, pAMgr->get_substandard(), rv->alen)))
  ------------------
  |  |   99|    258|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 258]
  |  |  ------------------
  ------------------
 1780|      0|        return 0;
 1781|  49.3k|      while (rv) {
  ------------------
  |  Branch (1781:14): [True: 49.0k, False: 249]
  ------------------
 1782|  49.0k|        if (rv->astr &&
  ------------------
  |  Branch (1782:13): [True: 258, False: 48.8k]
  |  Branch (1782:13): [True: 249, False: 48.8k]
  ------------------
 1783|    258|            (TESTAFF(rv->astr, pAMgr->get_needaffix(), rv->alen) ||
  ------------------
  |  |   99|    516|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 258]
  |  |  ------------------
  ------------------
 1784|    258|             TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|    516|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 249, False: 9]
  |  |  ------------------
  ------------------
 1785|    249|             TESTAFF(rv->astr, pAMgr->get_onlyincompound(), rv->alen))) {
  ------------------
  |  |   99|      9|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1786|    249|          rv = rv->next_homonym;
 1787|    249|        } else
 1788|  48.8k|          break;
 1789|  49.0k|      }
 1790|  29.4M|    } else {
 1791|  29.4M|      AffixScratch scratch;
 1792|  29.4M|      rv = pAMgr->prefix_check(word, 0, word.size(),
 1793|  29.4M|                               0, scratch);  // only prefix, and prefix + suffix XXX
 1794|  29.4M|    }
 1795|       |
 1796|  29.4M|    if (rv) {
  ------------------
  |  Branch (1796:9): [True: 48.8k, False: 29.4M]
  ------------------
 1797|  48.8k|      nosuffix = 1;
 1798|  29.4M|    } else {
 1799|  29.4M|      AffixScratch scratch;
 1800|  29.4M|      rv = pAMgr->suffix_check(word, 0, word.size(), 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // only suffix
  ------------------
  |  |   96|  29.4M|#define FLAG_NULL 0x00
  ------------------
                    rv = pAMgr->suffix_check(word, 0, word.size(), 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // only suffix
  ------------------
  |  |   96|  29.4M|#define FLAG_NULL 0x00
  ------------------
                    rv = pAMgr->suffix_check(word, 0, word.size(), 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // only suffix
  ------------------
  |  |   72|  29.4M|#define IN_CPD_NOT 0
  ------------------
 1801|  29.4M|    }
 1802|       |
 1803|  29.4M|    if (!rv && pAMgr->have_contclass()) {
  ------------------
  |  Branch (1803:9): [True: 29.4M, False: 48.8k]
  |  Branch (1803:16): [True: 10.4M, False: 18.9M]
  ------------------
 1804|  10.4M|      AffixScratch scratch;
 1805|  10.4M|      rv = pAMgr->suffix_check_twosfx(word, 0, word.size(), 0, nullptr, scratch, FLAG_NULL);
  ------------------
  |  |   96|  10.4M|#define FLAG_NULL 0x00
  ------------------
 1806|  10.4M|      if (!rv)
  ------------------
  |  Branch (1806:11): [True: 10.4M, False: 0]
  ------------------
 1807|  10.4M|        rv = pAMgr->prefix_check_twosfx(word, 0, word.size(), 0, scratch, FLAG_NULL);
  ------------------
  |  |   96|  10.4M|#define FLAG_NULL 0x00
  ------------------
 1808|  10.4M|    }
 1809|       |
 1810|       |    // check forbidden words
 1811|  29.4M|    if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (1811:9): [True: 48.8k, False: 29.4M]
  |  Branch (1811:9): [True: 0, False: 29.4M]
  |  Branch (1811:17): [True: 9, False: 48.8k]
  ------------------
 1812|      9|        (TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) ||
  ------------------
  |  |   99|     18|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1813|      9|         TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
  ------------------
  |  |   99|     18|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1814|      9|         TESTAFF(rv->astr, pAMgr->get_nosuggest(), rv->alen) ||
  ------------------
  |  |   99|     18|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1815|      9|         TESTAFF(rv->astr, pAMgr->get_onlyincompound(), rv->alen)))
  ------------------
  |  |   99|      9|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1816|      0|      return 0;
 1817|       |
 1818|  29.4M|    if (rv) {  // XXX obsolote
  ------------------
  |  Branch (1818:9): [True: 48.8k, False: 29.4M]
  ------------------
 1819|  48.8k|      if ((pAMgr->get_compoundflag()) &&
  ------------------
  |  Branch (1819:11): [True: 12.0k, False: 36.8k]
  |  Branch (1819:11): [True: 6, False: 48.8k]
  ------------------
 1820|  12.0k|          TESTAFF(rv->astr, pAMgr->get_compoundflag(), rv->alen))
  ------------------
  |  |   99|  12.0k|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 6, False: 12.0k]
  |  |  ------------------
  ------------------
 1821|      6|        return 2 + nosuffix;
 1822|  48.8k|      return 1;
 1823|  48.8k|    }
 1824|  29.4M|  }
 1825|  29.4M|  return 0;
 1826|  85.3M|}
_ZN10SuggestMgr15check_forbiddenERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1828|  13.8k|int SuggestMgr::check_forbidden(const std::string& word) {
 1829|  13.8k|  if (pAMgr) {
  ------------------
  |  Branch (1829:7): [True: 13.8k, False: 0]
  ------------------
 1830|  13.8k|    struct hentry* rv = pAMgr->lookup(word.c_str(), word.size());
 1831|  13.8k|    if (rv && rv->astr &&
  ------------------
  |  Branch (1831:9): [True: 0, False: 13.8k]
  |  Branch (1831:9): [True: 0, False: 13.8k]
  |  Branch (1831:15): [True: 0, False: 0]
  ------------------
 1832|      0|        (TESTAFF(rv->astr, pAMgr->get_needaffix(), rv->alen) ||
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1833|      0|         TESTAFF(rv->astr, pAMgr->get_onlyincompound(), rv->alen)))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1834|      0|      rv = nullptr;
 1835|  13.8k|    size_t len = word.size();
 1836|  13.8k|    AffixScratch scratch;
 1837|  13.8k|    if (!(pAMgr->prefix_check(word, 0, len, 1, scratch)))
  ------------------
  |  Branch (1837:9): [True: 13.8k, False: 0]
  ------------------
 1838|  13.8k|      rv = pAMgr->suffix_check(word, 0, len, 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // prefix+suffix, suffix
  ------------------
  |  |   96|  13.8k|#define FLAG_NULL 0x00
  ------------------
                    rv = pAMgr->suffix_check(word, 0, len, 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // prefix+suffix, suffix
  ------------------
  |  |   96|  13.8k|#define FLAG_NULL 0x00
  ------------------
                    rv = pAMgr->suffix_check(word, 0, len, 0, nullptr, scratch, FLAG_NULL, FLAG_NULL, IN_CPD_NOT);  // prefix+suffix, suffix
  ------------------
  |  |   72|  13.8k|#define IN_CPD_NOT 0
  ------------------
 1839|       |    // check forbidden words
 1840|  13.8k|    if ((rv) && (rv->astr) &&
  ------------------
  |  Branch (1840:9): [True: 0, False: 13.8k]
  |  Branch (1840:9): [True: 0, False: 13.8k]
  |  Branch (1840:17): [True: 0, False: 0]
  ------------------
 1841|      0|        TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen))
  ------------------
  |  |   99|      0|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 1842|      0|      return 1;
 1843|  13.8k|  }
 1844|  13.8k|  return 0;
 1845|  13.8k|}
_ZN10SuggestMgr13suggest_morphERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE:
 1847|  10.7k|std::string SuggestMgr::suggest_morph(const std::string& in_w) {
 1848|  10.7k|  std::string result;
 1849|       |
 1850|  10.7k|  struct hentry* rv = nullptr;
 1851|       |
 1852|  10.7k|  if (!pAMgr)
  ------------------
  |  Branch (1852:7): [True: 0, False: 10.7k]
  ------------------
 1853|      0|    return {};
 1854|       |
 1855|  10.7k|  std::string w(in_w);
 1856|       |
 1857|       |  // word reversing wrapper for complex prefixes
 1858|  10.7k|  if (complexprefixes) {
  ------------------
  |  Branch (1858:7): [True: 551, False: 10.2k]
  ------------------
 1859|    551|    if (utf8)
  ------------------
  |  Branch (1859:9): [True: 0, False: 551]
  ------------------
 1860|      0|      reverseword_utf(w);
 1861|    551|    else
 1862|    551|      reverseword(w);
 1863|    551|  }
 1864|       |
 1865|  10.7k|  rv = pAMgr->lookup(w.c_str(), w.size());
 1866|       |
 1867|  12.9k|  while (rv) {
  ------------------
  |  Branch (1867:10): [True: 2.12k, False: 10.7k]
  ------------------
 1868|  2.12k|    if ((!rv->astr) ||
  ------------------
  |  Branch (1868:9): [True: 2.11k, False: 9]
  |  Branch (1868:9): [True: 2.12k, False: 0]
  ------------------
 1869|      9|        !(TESTAFF(rv->astr, pAMgr->get_forbiddenword(), rv->alen) ||
  ------------------
  |  |   99|     18|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1870|      9|          TESTAFF(rv->astr, pAMgr->get_needaffix(), rv->alen) ||
  ------------------
  |  |   99|     18|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1871|  2.12k|          TESTAFF(rv->astr, pAMgr->get_onlyincompound(), rv->alen))) {
  ------------------
  |  |   99|      9|#define TESTAFF(a, b, c) (std::binary_search(a, a + c, b))
  |  |  ------------------
  |  |  |  Branch (99:26): [True: 0, False: 9]
  |  |  ------------------
  ------------------
 1872|  2.12k|      if (!HENTRY_FIND(rv, MORPH_STEM)) {
  ------------------
  |  |  103|  2.12k|#define MORPH_STEM "st:"
  ------------------
  |  Branch (1872:11): [True: 2.12k, False: 0]
  ------------------
 1873|  2.12k|        result.push_back(MSEP_FLD);
  ------------------
  |  |  121|  2.12k|#define MSEP_FLD ' '
  ------------------
 1874|  2.12k|        result.append(MORPH_STEM);
  ------------------
  |  |  103|  2.12k|#define MORPH_STEM "st:"
  ------------------
 1875|  2.12k|        result.append(w);
 1876|  2.12k|      }
 1877|  2.12k|      if (HENTRY_DATA(rv)) {
  ------------------
  |  Branch (1877:11): [True: 0, False: 2.12k]
  ------------------
 1878|      0|        result.push_back(MSEP_FLD);
  ------------------
  |  |  121|      0|#define MSEP_FLD ' '
  ------------------
 1879|      0|        result.append(HENTRY_DATA2(rv));
 1880|      0|      }
 1881|  2.12k|      result.push_back(MSEP_REC);
  ------------------
  |  |  122|  2.12k|#define MSEP_REC '\n'
  ------------------
 1882|  2.12k|    }
 1883|  2.12k|    rv = rv->next_homonym;
 1884|  2.12k|  }
 1885|       |
 1886|  10.7k|  AffixScratch scratch;
 1887|  10.7k|  std::string st = pAMgr->affix_check_morph(w, 0, w.size(), scratch);
 1888|  10.7k|  if (!st.empty()) {
  ------------------
  |  Branch (1888:7): [True: 0, False: 10.7k]
  ------------------
 1889|      0|    result.append(st);
 1890|      0|  }
 1891|       |
 1892|  10.7k|  if (pAMgr->get_compound() && result.empty()) {
  ------------------
  |  Branch (1892:7): [True: 2.24k, False: 8.54k]
  |  Branch (1892:32): [True: 1.75k, False: 487]
  ------------------
 1893|  1.75k|    struct hentry* rwords[100] = {};  // buffer for COMPOUND pattern checking
 1894|  1.75k|    pAMgr->compound_check_morph(w, 0, 0, 100, 0, nullptr, (hentry**)&rwords, 0, result, nullptr, scratch);
 1895|  1.75k|  }
 1896|       |
 1897|  10.7k|  line_uniq(result, MSEP_REC);
  ------------------
  |  |  122|  10.7k|#define MSEP_REC '\n'
  ------------------
 1898|       |
 1899|  10.7k|  return result;
 1900|  10.7k|}
_ZN10SuggestMgr18suggest_hentry_genEP6hentryPKc:
 1925|   455k|std::string SuggestMgr::suggest_hentry_gen(hentry* rv, const char* pattern) {
 1926|   455k|  std::string result;
 1927|   455k|  int sfxcount = get_sfxcount(pattern);
 1928|       |
 1929|   455k|  if (get_sfxcount(HENTRY_DATA(rv)) > sfxcount)
  ------------------
  |  Branch (1929:7): [True: 0, False: 455k]
  ------------------
 1930|      0|    return result;
 1931|       |
 1932|   455k|  if (HENTRY_DATA(rv)) {
  ------------------
  |  Branch (1932:7): [True: 0, False: 455k]
  ------------------
 1933|      0|    std::string aff = pAMgr->morphgen(HENTRY_WORD(rv), rv->blen, rv->astr, rv->alen,
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1934|      0|                                      HENTRY_DATA(rv), pattern, 0);
 1935|      0|    if (!aff.empty()) {
  ------------------
  |  Branch (1935:9): [True: 0, False: 0]
  ------------------
 1936|      0|      result.append(aff);
 1937|      0|      result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1938|      0|    }
 1939|      0|  }
 1940|       |
 1941|       |  // check all allomorphs
 1942|   455k|  char* p = nullptr;
 1943|   455k|  if (HENTRY_DATA(rv))
  ------------------
  |  Branch (1943:7): [True: 0, False: 455k]
  ------------------
 1944|      0|    p = (char*)strstr(HENTRY_DATA2(rv), MORPH_ALLOMORPH);
  ------------------
  |  |  104|      0|#define MORPH_ALLOMORPH "al:"
  ------------------
 1945|   455k|  while (p) {
  ------------------
  |  Branch (1945:10): [True: 0, False: 455k]
  ------------------
 1946|      0|    p += MORPH_TAG_LEN;
  ------------------
  |  |  119|      0|#define MORPH_TAG_LEN strlen(MORPH_STEM)
  |  |  ------------------
  |  |  |  |  103|      0|#define MORPH_STEM "st:"
  |  |  ------------------
  ------------------
 1947|      0|    int plen = fieldlen(p);
 1948|      0|    std::string allomorph(p, plen);
 1949|      0|    struct hentry* rv2 = pAMgr->lookup(allomorph.c_str(), allomorph.size());
 1950|      0|    while (rv2) {
  ------------------
  |  Branch (1950:12): [True: 0, False: 0]
  ------------------
 1951|       |      //            if (HENTRY_DATA(rv2) && get_sfxcount(HENTRY_DATA(rv2)) <=
 1952|       |      //            sfxcount) {
 1953|      0|      if (HENTRY_DATA(rv2)) {
  ------------------
  |  Branch (1953:11): [True: 0, False: 0]
  ------------------
 1954|      0|        char* st = (char*)strstr(HENTRY_DATA2(rv2), MORPH_STEM);
  ------------------
  |  |  103|      0|#define MORPH_STEM "st:"
  ------------------
 1955|      0|        if (st && (strncmp(st + MORPH_TAG_LEN, HENTRY_WORD(rv),
  ------------------
  |  |  119|      0|#define MORPH_TAG_LEN strlen(MORPH_STEM)
  |  |  ------------------
  |  |  |  |  103|      0|#define MORPH_STEM "st:"
  |  |  ------------------
  ------------------
                      if (st && (strncmp(st + MORPH_TAG_LEN, HENTRY_WORD(rv),
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
  |  Branch (1955:13): [True: 0, False: 0]
  |  Branch (1955:19): [True: 0, False: 0]
  ------------------
 1956|      0|                           fieldlen(st + MORPH_TAG_LEN)) == 0)) {
  ------------------
  |  |  119|      0|#define MORPH_TAG_LEN strlen(MORPH_STEM)
  |  |  ------------------
  |  |  |  |  103|      0|#define MORPH_STEM "st:"
  |  |  ------------------
  ------------------
 1957|      0|          std::string aff = pAMgr->morphgen(HENTRY_WORD(rv2), rv2->blen, rv2->astr,
  ------------------
  |  |   54|      0|#define HENTRY_WORD(h) &(h->word[0])
  ------------------
 1958|      0|                                            rv2->alen, HENTRY_DATA(rv2), pattern, 0);
 1959|      0|          if (!aff.empty()) {
  ------------------
  |  Branch (1959:15): [True: 0, False: 0]
  ------------------
 1960|      0|            result.append(aff);
 1961|      0|            result.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 1962|      0|          }
 1963|      0|        }
 1964|      0|      }
 1965|      0|      rv2 = rv2->next_homonym;
 1966|      0|    }
 1967|      0|    p = strstr(p + plen, MORPH_ALLOMORPH);
  ------------------
  |  |  104|      0|#define MORPH_ALLOMORPH "al:"
  ------------------
 1968|      0|  }
 1969|       |
 1970|   455k|  return result;
 1971|   455k|}
_ZN10SuggestMgr11suggest_genERKNSt3__16vectorINS0_12basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEENS5_IS7_EEEERKS7_NS0_6chrono10time_pointINSE_12steady_clockENSE_8durationIxNS0_5ratioILl1ELl1000000000EEEEEEE:
 1974|   351k|                                    std::chrono::steady_clock::time_point start_time) {
 1975|   351k|  if (desc.empty() || !pAMgr)
  ------------------
  |  Branch (1975:7): [True: 186k, False: 165k]
  |  Branch (1975:23): [True: 0, False: 165k]
  ------------------
 1976|   186k|    return {};
 1977|       |
 1978|   165k|  const char* pattern = in_pattern.c_str();
 1979|   165k|  std::string result2;
 1980|   165k|  std::string newpattern;
 1981|   165k|  struct hentry* rv = nullptr;
 1982|       |
 1983|       |  // search affixed forms with and without derivational suffixes
 1984|   230k|  while (true) {
  ------------------
  |  Branch (1984:10): [True: 230k, Folded]
  ------------------
 1985|   230k|    for (const auto& k : desc) {
  ------------------
  |  Branch (1985:24): [True: 230k, False: 230k]
  ------------------
 1986|   230k|      if (std::chrono::steady_clock::now() - start_time > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|   230k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (1986:11): [True: 0, False: 230k]
  ------------------
 1987|      0|        return result2;
 1988|   230k|      std::string result;
 1989|       |
 1990|       |      // add compound word parts (except the last one)
 1991|   230k|      const size_t lastpart = append_compound_parts(k, result);
 1992|   230k|      const char* s = k.c_str() + lastpart;
 1993|   230k|      std::string tok(k, lastpart);
 1994|   230k|      size_t pos = tok.find(" | ");
 1995|   230k|      while (pos != std::string::npos) {
  ------------------
  |  Branch (1995:14): [True: 0, False: 230k]
  ------------------
 1996|      0|        tok[pos + 1] = MSEP_ALT;
  ------------------
  |  |  123|      0|#define MSEP_ALT '\v'
  ------------------
 1997|      0|        pos = tok.find(" | ", pos);
 1998|      0|      }
 1999|   230k|      std::vector<std::string> pl = line_tok(tok, MSEP_ALT);
  ------------------
  |  |  123|   230k|#define MSEP_ALT '\v'
  ------------------
 2000|   243k|      for (auto& i : pl) {
  ------------------
  |  Branch (2000:20): [True: 243k, False: 230k]
  ------------------
 2001|       |        // remove inflectional and terminal suffixes
 2002|   243k|        size_t is = i.find(MORPH_INFL_SFX);
  ------------------
  |  |  110|   243k|#define MORPH_INFL_SFX "is:"
  ------------------
 2003|   243k|        if (is != std::string::npos)
  ------------------
  |  Branch (2003:13): [True: 0, False: 243k]
  ------------------
 2004|      0|          i.resize(is);
 2005|   243k|        size_t ts = i.find(MORPH_TERM_SFX);
  ------------------
  |  |  111|   243k|#define MORPH_TERM_SFX "ts:"
  ------------------
 2006|   243k|        while (ts != std::string::npos) {
  ------------------
  |  Branch (2006:16): [True: 0, False: 243k]
  ------------------
 2007|      0|          i[ts] = '_';
 2008|      0|          ts = i.find(MORPH_TERM_SFX);
  ------------------
  |  |  111|      0|#define MORPH_TERM_SFX "ts:"
  ------------------
 2009|      0|        }
 2010|   243k|        const char* st = strstr(s, MORPH_STEM);
  ------------------
  |  |  103|   243k|#define MORPH_STEM "st:"
  ------------------
 2011|   243k|        if (st) {
  ------------------
  |  Branch (2011:13): [True: 227k, False: 15.9k]
  ------------------
 2012|   227k|          copy_field(tok, st, MORPH_STEM);
  ------------------
  |  |  103|   227k|#define MORPH_STEM "st:"
  ------------------
 2013|   227k|          rv = pAMgr->lookup(tok.c_str(), tok.size());
 2014|   455k|          while (rv) {
  ------------------
  |  Branch (2014:18): [True: 227k, False: 227k]
  ------------------
 2015|   227k|            if (std::chrono::steady_clock::now() - start_time > TIMELIMIT_GLOBAL_MS)
  ------------------
  |  |  104|   227k|#define TIMELIMIT_GLOBAL_MS std::chrono::milliseconds(250)
  ------------------
  |  Branch (2015:17): [True: 0, False: 227k]
  ------------------
 2016|      0|              return result2;
 2017|   227k|            std::string newpat(i);
 2018|   227k|            newpat.append(pattern);
 2019|   227k|            std::string sg = suggest_hentry_gen(rv, newpat.c_str());
 2020|   227k|            if (sg.empty())
  ------------------
  |  Branch (2020:17): [True: 227k, False: 0]
  ------------------
 2021|   227k|              sg = suggest_hentry_gen(rv, pattern);
 2022|   227k|            if (!sg.empty()) {
  ------------------
  |  Branch (2022:17): [True: 0, False: 227k]
  ------------------
 2023|      0|              std::vector<std::string> gen = line_tok(sg, MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2024|      0|              for (auto& j : gen) {
  ------------------
  |  Branch (2024:28): [True: 0, False: 0]
  ------------------
 2025|      0|                result2.push_back(MSEP_REC);
  ------------------
  |  |  122|      0|#define MSEP_REC '\n'
  ------------------
 2026|      0|                result2.append(result);
 2027|      0|                if (i.find(MORPH_SURF_PFX) != std::string::npos) {
  ------------------
  |  |  112|      0|#define MORPH_SURF_PFX "sp:"
  ------------------
  |  Branch (2027:21): [True: 0, False: 0]
  ------------------
 2028|      0|                  std::string field;
 2029|      0|                  copy_field(field, i, MORPH_SURF_PFX);
  ------------------
  |  |  112|      0|#define MORPH_SURF_PFX "sp:"
  ------------------
 2030|      0|                  result2.append(field);
 2031|      0|                }
 2032|      0|                result2.append(j);
 2033|      0|              }
 2034|      0|            }
 2035|   227k|            rv = rv->next_homonym;
 2036|   227k|          }
 2037|   227k|        }
 2038|   243k|      }
 2039|   230k|    }
 2040|       |
 2041|   230k|    if (!result2.empty() || !strstr(pattern, MORPH_DERI_SFX))
  ------------------
  |  |  109|   230k|#define MORPH_DERI_SFX "ds:"
  ------------------
  |  Branch (2041:9): [True: 0, False: 230k]
  |  Branch (2041:29): [True: 165k, False: 64.8k]
  ------------------
 2042|   165k|      break;
 2043|       |
 2044|  64.8k|    newpattern.assign(pattern);
 2045|  64.8k|    mystrrep(newpattern, MORPH_DERI_SFX, MORPH_TERM_SFX);
  ------------------
  |  |  109|  64.8k|#define MORPH_DERI_SFX "ds:"
  ------------------
                  mystrrep(newpattern, MORPH_DERI_SFX, MORPH_TERM_SFX);
  ------------------
  |  |  111|  64.8k|#define MORPH_TERM_SFX "ts:"
  ------------------
 2046|  64.8k|    pattern = newpattern.c_str();
 2047|  64.8k|  }
 2048|   165k|  return result2;
 2049|   165k|}
_ZN10SuggestMgr5ngramEiRKNSt3__16vectorI6w_charNS0_9allocatorIS2_EEEES7_i:
 2055|   587k|                      int opt) {
 2056|   587k|  int nscore = 0, ns, l1 = su1.size(), l2 = su2.size();
 2057|       |
 2058|   587k|  if (l2 == 0)
  ------------------
  |  Branch (2058:7): [True: 5.45k, False: 581k]
  ------------------
 2059|  5.45k|    return 0;
 2060|   886k|  for (int j = 1; j <= n; j++) {
  ------------------
  |  Branch (2060:19): [True: 837k, False: 48.3k]
  ------------------
 2061|   837k|    ns = 0;
 2062|  3.98M|    for (int i = 0; i <= (l1 - j); i++) {
  ------------------
  |  Branch (2062:21): [True: 3.14M, False: 837k]
  ------------------
 2063|  3.14M|      int k = 0;
 2064|  14.9M|      for (int l = 0; l <= (l2 - j); l++) {
  ------------------
  |  Branch (2064:23): [True: 12.8M, False: 2.04M]
  ------------------
 2065|  22.2M|        for (k = 0; k < j; k++) {
  ------------------
  |  Branch (2065:21): [True: 21.1M, False: 1.09M]
  ------------------
 2066|  21.1M|          if (su1[i + k] != su2[l + k])
  ------------------
  |  Branch (2066:15): [True: 11.7M, False: 9.35M]
  ------------------
 2067|  11.7M|            break;
 2068|  21.1M|        }
 2069|  12.8M|        if (k == j) {
  ------------------
  |  Branch (2069:13): [True: 1.09M, False: 11.7M]
  ------------------
 2070|  1.09M|          ns++;
 2071|  1.09M|          break;
 2072|  1.09M|        }
 2073|  12.8M|      }
 2074|  3.14M|      if (k != j && opt & NGRAM_WEIGHTED) {
  ------------------
  |  |   84|  2.04M|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
  |  Branch (2074:11): [True: 2.04M, False: 1.09M]
  |  Branch (2074:21): [True: 87.5k, False: 1.95M]
  ------------------
 2075|  87.5k|        ns--;
 2076|  87.5k|        if (i == 0 || i == l1 - j)
  ------------------
  |  Branch (2076:13): [True: 21.9k, False: 65.6k]
  |  Branch (2076:23): [True: 31.9k, False: 33.6k]
  ------------------
 2077|  53.8k|          ns--;  // side weight
 2078|  87.5k|      }
 2079|  3.14M|    }
 2080|   837k|    nscore = nscore + ns;
 2081|   837k|    if (ns < 2 && !(opt & NGRAM_WEIGHTED))
  ------------------
  |  |   84|   592k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
  |  Branch (2081:9): [True: 592k, False: 245k]
  |  Branch (2081:19): [True: 533k, False: 58.5k]
  ------------------
 2082|   533k|      break;
 2083|   837k|  }
 2084|       |
 2085|   581k|  ns = 0;
 2086|   581k|  if (opt & NGRAM_LONGER_WORSE)
  ------------------
  |  |   81|   581k|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
  |  Branch (2086:7): [True: 235k, False: 346k]
  ------------------
 2087|   235k|    ns = (l2 - l1) - 2;
 2088|   581k|  if (opt & NGRAM_ANY_MISMATCH)
  ------------------
  |  |   82|   581k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
  |  Branch (2088:7): [True: 346k, False: 235k]
  ------------------
 2089|   346k|    ns = abs(l2 - l1) - 2;
 2090|   581k|  ns = (nscore - ((ns > 0) ? ns : 0));
  ------------------
  |  Branch (2090:19): [True: 95.2k, False: 486k]
  ------------------
 2091|   581k|  return ns;
 2092|   587k|}
_ZN10SuggestMgr5ngramEiRKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_i:
 2098|   818k|                      int opt) {
 2099|   818k|  int nscore = 0, ns, l1, l2 = s2.size();
 2100|       |
 2101|   818k|  if (l2 == 0)
  ------------------
  |  Branch (2101:7): [True: 10.5k, False: 807k]
  ------------------
 2102|  10.5k|    return 0;
 2103|   807k|  l1 = s1.size();
 2104|  1.51M|  for (int j = 1; j <= n; j++) {
  ------------------
  |  Branch (2104:19): [True: 1.38M, False: 126k]
  ------------------
 2105|  1.38M|    ns = 0;
 2106|  10.5M|    for (int i = 0; i <= (l1 - j); i++) {
  ------------------
  |  Branch (2106:21): [True: 9.16M, False: 1.38M]
  ------------------
 2107|       |      //s2 is haystack, s1[i..i+j) is needle
 2108|  9.16M|      if (s2.find(s1.c_str()+i, 0, j) != std::string::npos) {
  ------------------
  |  Branch (2108:11): [True: 3.52M, False: 5.63M]
  ------------------
 2109|  3.52M|        ns++;
 2110|  5.63M|      } else if (opt & NGRAM_WEIGHTED) {
  ------------------
  |  |   84|  5.63M|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
  |  Branch (2110:18): [True: 331k, False: 5.30M]
  ------------------
 2111|   331k|        ns--;
 2112|   331k|        if (i == 0 || i == l1 - j)
  ------------------
  |  Branch (2112:13): [True: 42.3k, False: 289k]
  |  Branch (2112:23): [True: 100k, False: 188k]
  ------------------
 2113|   143k|          ns--;  // side weight
 2114|   331k|      }
 2115|  9.16M|    }
 2116|  1.38M|    nscore = nscore + ns;
 2117|  1.38M|    if (ns < 2 && !(opt & NGRAM_WEIGHTED))
  ------------------
  |  |   84|   804k|#define NGRAM_WEIGHTED (1 << 3)
  ------------------
  |  Branch (2117:9): [True: 804k, False: 584k]
  |  Branch (2117:19): [True: 681k, False: 123k]
  ------------------
 2118|   681k|      break;
 2119|  1.38M|  }
 2120|       |
 2121|   807k|  ns = 0;
 2122|   807k|  if (opt & NGRAM_LONGER_WORSE)
  ------------------
  |  |   81|   807k|#define NGRAM_LONGER_WORSE (1 << 0)
  ------------------
  |  Branch (2122:7): [True: 299k, False: 508k]
  ------------------
 2123|   299k|    ns = (l2 - l1) - 2;
 2124|   807k|  if (opt & NGRAM_ANY_MISMATCH)
  ------------------
  |  |   82|   807k|#define NGRAM_ANY_MISMATCH (1 << 1)
  ------------------
  |  Branch (2124:7): [True: 508k, False: 299k]
  ------------------
 2125|   508k|    ns = abs(l2 - l1) - 2;
 2126|   807k|  ns = (nscore - ((ns > 0) ? ns : 0));
  ------------------
  |  Branch (2126:19): [True: 171k, False: 636k]
  ------------------
 2127|   807k|  return ns;
 2128|   818k|}
_ZN10SuggestMgr19leftcommonsubstringERKNSt3__16vectorI6w_charNS0_9allocatorIS2_EEEES7_:
 2133|   491k|    const std::vector<w_char>& su2) {
 2134|   491k|  int l1 = su1.size(), l2 = su2.size();
 2135|       |  // decapitalize dictionary word
 2136|   491k|  if (complexprefixes) {
  ------------------
  |  Branch (2136:7): [True: 0, False: 491k]
  ------------------
 2137|      0|    if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1])
  ------------------
  |  Branch (2137:9): [True: 0, False: 0]
  |  Branch (2137:15): [True: 0, False: 0]
  |  Branch (2137:21): [True: 0, False: 0]
  ------------------
 2138|      0|      return 1;
 2139|   491k|  } else {
 2140|   491k|    unsigned short idx = su2.empty() ? 0 : (unsigned short)(su2[0]),
  ------------------
  |  Branch (2140:26): [True: 0, False: 491k]
  ------------------
 2141|   491k|                   otheridx = su1.empty() ? 0 : (unsigned short)(su1[0]);
  ------------------
  |  Branch (2141:31): [True: 14.2k, False: 477k]
  ------------------
 2142|   491k|    if (otheridx != idx && (otheridx != unicodetolower(idx, langnum)))
  ------------------
  |  Branch (2142:9): [True: 465k, False: 25.5k]
  |  Branch (2142:28): [True: 364k, False: 101k]
  ------------------
 2143|   364k|      return 0;
 2144|   126k|    int i;
 2145|   204k|    for (i = 1; (i < l1) && (i < l2) && (su1[i] == su2[i]);
  ------------------
  |  Branch (2145:17): [True: 192k, False: 12.6k]
  |  Branch (2145:29): [True: 175k, False: 16.6k]
  |  Branch (2145:41): [True: 78.1k, False: 97.2k]
  ------------------
 2146|   126k|         i++)
 2147|  78.1k|      ;
 2148|   126k|    return i;
 2149|   491k|  }
 2150|      0|  return 0;
 2151|   491k|}
_ZN10SuggestMgr19leftcommonsubstringEPKcS1_:
 2156|   641k|    const char* s2) {
 2157|   641k|  if (complexprefixes) {
  ------------------
  |  Branch (2157:7): [True: 51.7k, False: 589k]
  ------------------
 2158|  51.7k|    int l1 = strlen(s1), l2 = strlen(s2);
 2159|  51.7k|    if (l1 && l1 <= l2 && s1[l1 - 1] == s2[l2 - 1])
  ------------------
  |  Branch (2159:9): [True: 50.3k, False: 1.42k]
  |  Branch (2159:15): [True: 22.9k, False: 27.3k]
  |  Branch (2159:27): [True: 1.83k, False: 21.1k]
  ------------------
 2160|  1.83k|      return 1;
 2161|   589k|  } else if (csconv) {
  ------------------
  |  Branch (2161:14): [True: 589k, False: 0]
  ------------------
 2162|   589k|    const char* olds = s1;
 2163|       |    // decapitalise dictionary word
 2164|   589k|    if ((*s1 != *s2) && (((unsigned char)*s1) != csconv[((unsigned char)*s2)].clower))
  ------------------
  |  Branch (2164:9): [True: 539k, False: 50.2k]
  |  Branch (2164:25): [True: 409k, False: 130k]
  ------------------
 2165|   409k|      return 0;
 2166|   403k|    do {
 2167|   403k|      s1++;
 2168|   403k|      s2++;
 2169|   403k|    } while ((*s1 == *s2) && (*s1 != '\0'));
  ------------------
  |  Branch (2169:14): [True: 223k, False: 180k]
  |  Branch (2169:30): [True: 222k, False: 334]
  ------------------
 2170|   180k|    return (int)(s1 - olds);
 2171|   589k|  }
 2172|  49.9k|  return 0;
 2173|   641k|}
_ZN10SuggestMgr24commoncharacterpositionsEPKcS1_Pi:
 2177|  67.3k|                                         int* is_swap) {
 2178|  67.3k|  int num = 0, diff = 0, diffpos[2];
 2179|  67.3k|  *is_swap = 0;
 2180|  67.3k|  if (utf8) {
  ------------------
  |  Branch (2180:7): [True: 20.0k, False: 47.2k]
  ------------------
 2181|  20.0k|    std::vector<w_char> su1;
 2182|  20.0k|    std::vector<w_char> su2;
 2183|  20.0k|    int l1 = u8_u16(su1, s1), l2 = u8_u16(su2, s2);
 2184|       |
 2185|  20.0k|    if (l1 <= 0 || l2 <= 0)
  ------------------
  |  Branch (2185:9): [True: 3.12k, False: 16.9k]
  |  Branch (2185:20): [True: 0, False: 16.9k]
  ------------------
 2186|  3.12k|      return 0;
 2187|       |
 2188|       |    // decapitalize dictionary word
 2189|  16.9k|    if (complexprefixes) {
  ------------------
  |  Branch (2189:9): [True: 0, False: 16.9k]
  ------------------
 2190|      0|      su2[l2 - 1] = lower_utf(su2[l2 - 1], langnum);
 2191|  16.9k|    } else {
 2192|  16.9k|      su2[0] = lower_utf(su2[0], langnum);
 2193|  16.9k|    }
 2194|  63.6k|    for (int i = 0; (i < l1) && (i < l2); i++) {
  ------------------
  |  Branch (2194:21): [True: 51.8k, False: 11.8k]
  |  Branch (2194:33): [True: 46.6k, False: 5.13k]
  ------------------
 2195|  46.6k|      if (su1[i] == su2[i]) {
  ------------------
  |  Branch (2195:11): [True: 24.5k, False: 22.1k]
  ------------------
 2196|  24.5k|        num++;
 2197|  24.5k|      } else {
 2198|  22.1k|        if (diff < 2)
  ------------------
  |  Branch (2198:13): [True: 17.8k, False: 4.29k]
  ------------------
 2199|  17.8k|          diffpos[diff] = i;
 2200|  22.1k|        diff++;
 2201|  22.1k|      }
 2202|  46.6k|    }
 2203|  16.9k|    if ((diff == 2) && (l1 == l2) &&
  ------------------
  |  Branch (2203:9): [True: 2.74k, False: 14.1k]
  |  Branch (2203:24): [True: 558, False: 2.18k]
  ------------------
 2204|    558|        (su1[diffpos[0]] == su2[diffpos[1]]) &&
  ------------------
  |  Branch (2204:9): [True: 195, False: 363]
  ------------------
 2205|    195|        (su1[diffpos[1]] == su2[diffpos[0]]))
  ------------------
  |  Branch (2205:9): [True: 56, False: 139]
  ------------------
 2206|     56|      *is_swap = 1;
 2207|  47.2k|  } else {
 2208|  47.2k|    size_t i;
 2209|  47.2k|    std::string t(s2);
 2210|       |    // decapitalize dictionary word
 2211|  47.2k|    if (complexprefixes) {
  ------------------
  |  Branch (2211:9): [True: 2.87k, False: 44.4k]
  ------------------
 2212|  2.87k|      size_t l2 = t.size();
 2213|  2.87k|      t[l2 - 1] = csconv[(unsigned char)t[l2 - 1]].clower;
 2214|  44.4k|    } else {
 2215|  44.4k|      mkallsmall(t, csconv);
 2216|  44.4k|    }
 2217|   251k|    for (i = 0; i < t.size() && (*(s1 + i) != 0); ++i) {
  ------------------
  |  Branch (2217:17): [True: 225k, False: 26.6k]
  |  Branch (2217:33): [True: 204k, False: 20.6k]
  ------------------
 2218|   204k|      if (*(s1 + i) == t[i]) {
  ------------------
  |  Branch (2218:11): [True: 107k, False: 96.4k]
  ------------------
 2219|   107k|        num++;
 2220|   107k|      } else {
 2221|  96.4k|        if (diff < 2)
  ------------------
  |  Branch (2221:13): [True: 57.2k, False: 39.2k]
  ------------------
 2222|  57.2k|          diffpos[diff] = i;
 2223|  96.4k|        diff++;
 2224|  96.4k|      }
 2225|   204k|    }
 2226|  47.2k|    if ((diff == 2) && (*(s1 + i) == 0) && i == t.size() &&
  ------------------
  |  Branch (2226:9): [True: 8.68k, False: 38.6k]
  |  Branch (2226:24): [True: 5.55k, False: 3.12k]
  |  Branch (2226:44): [True: 2.02k, False: 3.52k]
  ------------------
 2227|  2.02k|        (*(s1 + diffpos[0]) == t[diffpos[1]]) &&
  ------------------
  |  Branch (2227:9): [True: 388, False: 1.64k]
  ------------------
 2228|    388|        (*(s1 + diffpos[1]) == t[diffpos[0]]))
  ------------------
  |  Branch (2228:9): [True: 78, False: 310]
  ------------------
 2229|     78|      *is_swap = 1;
 2230|  47.2k|  }
 2231|  64.2k|  return num;
 2232|  67.3k|}
_ZN10SuggestMgr10bubblesortEPPcS1_Pii:
 2243|  97.4k|void SuggestMgr::bubblesort(char** rword, char** rword2, int* rsc, int n) {
 2244|  97.4k|  int m = 1;
 2245|  18.9M|  while (m < n) {
  ------------------
  |  Branch (2245:10): [True: 18.8M, False: 97.4k]
  ------------------
 2246|  18.8M|    int j = m;
 2247|  36.4M|    while (j > 0) {
  ------------------
  |  Branch (2247:12): [True: 36.4M, False: 25.5k]
  ------------------
 2248|  36.4M|      if (rsc[j - 1] < rsc[j]) {
  ------------------
  |  Branch (2248:11): [True: 17.5M, False: 18.8M]
  ------------------
 2249|  17.5M|        int sctmp = rsc[j - 1];
 2250|  17.5M|        char* wdtmp = rword[j - 1];
 2251|  17.5M|        rsc[j - 1] = rsc[j];
 2252|  17.5M|        rword[j - 1] = rword[j];
 2253|  17.5M|        rsc[j] = sctmp;
 2254|  17.5M|        rword[j] = wdtmp;
 2255|  17.5M|        if (rword2) {
  ------------------
  |  Branch (2255:13): [True: 17.1M, False: 487k]
  ------------------
 2256|  17.1M|          wdtmp = rword2[j - 1];
 2257|  17.1M|          rword2[j - 1] = rword2[j];
 2258|  17.1M|          rword2[j] = wdtmp;
 2259|  17.1M|        }
 2260|  17.5M|        j--;
 2261|  17.5M|      } else
 2262|  18.8M|        break;
 2263|  36.4M|    }
 2264|  18.8M|    m++;
 2265|  18.8M|  }
 2266|  97.4k|}
_ZN10SuggestMgr3lcsEPKcS1_PiS2_:
 2272|  75.0k|                      int* l2) {
 2273|  75.0k|  int n, m, i, j;
 2274|  75.0k|  std::vector<w_char> su;
 2275|  75.0k|  std::vector<w_char> su2;
 2276|  75.0k|  if (utf8) {
  ------------------
  |  Branch (2276:7): [True: 21.4k, False: 53.5k]
  ------------------
 2277|  21.4k|    m = u8_u16(su, s);
 2278|  21.4k|    n = u8_u16(su2, s2);
 2279|  53.5k|  } else {
 2280|  53.5k|    m = strlen(s);
 2281|  53.5k|    n = strlen(s2);
 2282|  53.5k|  }
 2283|  75.0k|  if (m <= 0 || n <= 0) {
  ------------------
  |  Branch (2283:7): [True: 7.18k, False: 67.8k]
  |  Branch (2283:17): [True: 0, False: 67.8k]
  ------------------
 2284|  7.18k|    *l1 = 0;
 2285|  7.18k|    *l2 = 0;
 2286|  7.18k|    return nullptr;
 2287|  7.18k|  }
 2288|  67.8k|  char* c = new char[(m + 1) * (n + 1)]();
 2289|  67.8k|  char* b = new char[(m + 1) * (n + 1)]();
 2290|   406k|  for (i = 1; i <= m; i++) {
  ------------------
  |  Branch (2290:15): [True: 338k, False: 67.8k]
  ------------------
 2291|  3.28M|    for (j = 1; j <= n; j++) {
  ------------------
  |  Branch (2291:17): [True: 2.94M, False: 338k]
  ------------------
 2292|  2.94M|      if (((utf8) && (su[i - 1] == su2[j - 1])) ||
  ------------------
  |  Branch (2292:12): [True: 273k, False: 2.66M]
  |  Branch (2292:22): [True: 51.3k, False: 222k]
  ------------------
 2293|  2.89M|          ((!utf8) && (s[i - 1] == s2[j - 1]))) {
  ------------------
  |  Branch (2293:12): [True: 2.66M, False: 222k]
  |  Branch (2293:23): [True: 438k, False: 2.23M]
  ------------------
 2294|   489k|        c[i * (n + 1) + j] = c[(i - 1) * (n + 1) + j - 1] + 1;
 2295|   489k|        b[i * (n + 1) + j] = LCS_UPLEFT;
 2296|  2.45M|      } else if (c[(i - 1) * (n + 1) + j] >= c[i * (n + 1) + j - 1]) {
  ------------------
  |  Branch (2296:18): [True: 1.77M, False: 683k]
  ------------------
 2297|  1.77M|        c[i * (n + 1) + j] = c[(i - 1) * (n + 1) + j];
 2298|  1.77M|        b[i * (n + 1) + j] = LCS_UP;
 2299|  1.77M|      } else {
 2300|   683k|        c[i * (n + 1) + j] = c[i * (n + 1) + j - 1];
 2301|   683k|        b[i * (n + 1) + j] = LCS_LEFT;
 2302|   683k|      }
 2303|  2.94M|    }
 2304|   338k|  }
 2305|  67.8k|  delete[] c;
 2306|  67.8k|  *l1 = m;
 2307|  67.8k|  *l2 = n;
 2308|  67.8k|  return b;
 2309|  75.0k|}
_ZN10SuggestMgr6lcslenEPKcS1_:
 2311|  75.0k|int SuggestMgr::lcslen(const char* s, const char* s2) {
 2312|  75.0k|  int m, n, len = 0;
 2313|  75.0k|  char* result = lcs(s, s2, &m, &n);
 2314|  75.0k|  if (!result)
  ------------------
  |  Branch (2314:7): [True: 7.18k, False: 67.8k]
  ------------------
 2315|  7.18k|    return 0;
 2316|  67.8k|  int i = m, j = n;
 2317|   528k|  while ((i != 0) && (j != 0)) {
  ------------------
  |  Branch (2317:10): [True: 467k, False: 60.9k]
  |  Branch (2317:22): [True: 460k, False: 6.97k]
  ------------------
 2318|   460k|    if (result[i * (n + 1) + j] == LCS_UPLEFT) {
  ------------------
  |  Branch (2318:9): [True: 184k, False: 275k]
  ------------------
 2319|   184k|      len++;
 2320|   184k|      i--;
 2321|   184k|      j--;
 2322|   275k|    } else if (result[i * (n + 1) + j] == LCS_UP) {
  ------------------
  |  Branch (2322:16): [True: 139k, False: 136k]
  ------------------
 2323|   139k|      i--;
 2324|   139k|    } else
 2325|   136k|      j--;
 2326|   460k|  }
 2327|  67.8k|  delete[] result;
 2328|  67.8k|  return len;
 2329|  75.0k|}
_ZN10SuggestMgr6lcslenERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEES8_:
 2331|  5.84k|int SuggestMgr::lcslen(const std::string& s, const std::string& s2) {
 2332|  5.84k|  return lcslen(s.c_str(), s2.c_str());
 2333|  5.84k|}
suggestmgr.cxx:_ZN12_GLOBAL__N_115ngsuggest_guardC2EbPK7cs_infoPiPS3_:
 1164|  59.9k|      : m_nonbmp(nonbmp)
 1165|  59.9k|      , m_origconv(origconv)
 1166|  59.9k|      , m_utf8(utf8)
 1167|  59.9k|      , m_csconv(csconv)
 1168|  59.9k|    {
 1169|  59.9k|    }
suggestmgr.cxx:_ZN12_GLOBAL__N_115ngsuggest_guardD2Ev:
 1172|  59.9k|    {
 1173|  59.9k|      if (m_nonbmp) {
  ------------------
  |  Branch (1173:11): [True: 2.13k, False: 57.7k]
  ------------------
 1174|  2.13k|        *m_csconv = m_origconv;
 1175|  2.13k|        *m_utf8 = 1;
 1176|  2.13k|      }
 1177|  59.9k|    }
suggestmgr.cxx:_ZL12get_sfxcountPKc:
 1902|   911k|static int get_sfxcount(const char* morph) {
 1903|   911k|  if (!morph || !*morph)
  ------------------
  |  Branch (1903:7): [True: 455k, False: 455k]
  |  Branch (1903:17): [True: 0, False: 455k]
  ------------------
 1904|   455k|    return 0;
 1905|   455k|  int n = 0;
 1906|   455k|  const char* old = morph;
 1907|   455k|  morph = strstr(morph, MORPH_DERI_SFX);
  ------------------
  |  |  109|   455k|#define MORPH_DERI_SFX "ds:"
  ------------------
 1908|   455k|  if (!morph)
  ------------------
  |  Branch (1908:7): [True: 330k, False: 124k]
  ------------------
 1909|   330k|    morph = strstr(old, MORPH_INFL_SFX);
  ------------------
  |  |  110|   330k|#define MORPH_INFL_SFX "is:"
  ------------------
 1910|   455k|  if (!morph)
  ------------------
  |  Branch (1910:7): [True: 330k, False: 125k]
  ------------------
 1911|   330k|    morph = strstr(old, MORPH_TERM_SFX);
  ------------------
  |  |  111|   330k|#define MORPH_TERM_SFX "ts:"
  ------------------
 1912|   826k|  while (morph) {
  ------------------
  |  Branch (1912:10): [True: 370k, False: 455k]
  ------------------
 1913|   370k|    n++;
 1914|   370k|    old = morph;
 1915|   370k|    morph = strstr(morph + 1, MORPH_DERI_SFX);
  ------------------
  |  |  109|   370k|#define MORPH_DERI_SFX "ds:"
  ------------------
 1916|   370k|    if (!morph)
  ------------------
  |  Branch (1916:9): [True: 310k, False: 59.9k]
  ------------------
 1917|   310k|      morph = strstr(old + 1, MORPH_INFL_SFX);
  ------------------
  |  |  110|   310k|#define MORPH_INFL_SFX "is:"
  ------------------
 1918|   370k|    if (!morph)
  ------------------
  |  Branch (1918:9): [True: 310k, False: 59.9k]
  ------------------
 1919|   310k|      morph = strstr(old + 1, MORPH_TERM_SFX);
  ------------------
  |  |  111|   310k|#define MORPH_TERM_SFX "ts:"
  ------------------
 1920|   370k|  }
 1921|   455k|  return n;
 1922|   911k|}

_ZNK6w_charcvtEv:
   57|   252M|  {
   58|   252M|#if defined(_WIN32) || (defined(__BYTE_ORDER__) && (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__))  || defined(__LITTLE_ENDIAN__)
   59|       |    //use little-endian optimized version
   60|       |#if (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) && defined __cpp_lib_bit_cast && __cpp_lib_bit_cast >= 201806L
   61|       |    return std::bit_cast<unsigned short>(*this);
   62|       |#else
   63|   252M|    unsigned short u;
   64|   252M|    memcpy(&u, this, sizeof(unsigned short));
   65|   252M|    return u;
   66|   252M|#endif
   67|       |
   68|       |#else
   69|       |    return ((unsigned short)h << 8) | (unsigned short)l;
   70|       |#endif
   71|   252M|  }
_Zlt6w_charS_:
   73|  22.9M|  friend bool operator<(const w_char a, const w_char b) {
   74|  22.9M|    return (unsigned short)a < (unsigned short)b;
   75|  22.9M|  }
_Zeq6w_charS_:
   77|  83.8M|  friend bool operator==(const w_char a, const w_char b) {
   78|  83.8M|    return (unsigned short)a == (unsigned short)b;
   79|  83.8M|  }
_Zne6w_charS_:
   81|  81.6M|  friend bool operator!=(const w_char a, const w_char b) {
   82|  81.6M|    return !(a == b);
   83|  81.6M|  }

_Z8endswithRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEES7_:
   40|    200|{
   41|    200|    return str.size() >= suffix.size() &&
  ------------------
  |  Branch (41:12): [True: 192, False: 8]
  ------------------
   42|    192|           str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
  ------------------
  |  Branch (42:12): [True: 38, False: 154]
  ------------------
   43|    200|}
LLVMFuzzerInitialize:
   46|      2|{
   47|      2|    char* exe_path = (*argv)[0];
   48|       |    // dirname() can modify its argument.
   49|      2|    char* exe_path_copy = strdup(exe_path);
   50|      2|    char* dir = dirname(exe_path_copy);
   51|      2|    DIR* d = opendir(dir);
   52|      2|    struct dirent *direntry;
   53|      2|    std::vector<std::string> affs;
   54|    202|    while ((direntry = readdir(d)) != NULL)
  ------------------
  |  Branch (54:12): [True: 200, False: 2]
  ------------------
   55|    200|    {
   56|    200|        std::string entry(direntry->d_name);
   57|    200|        if (endswith(entry, ".aff"))
  ------------------
  |  Branch (57:13): [True: 38, False: 162]
  ------------------
   58|     38|            affs.push_back(std::move(entry));
   59|    200|    }
   60|      2|    closedir(d);
   61|      2|    free(exe_path_copy);
   62|       |
   63|       |    // sort so dict iteration order is reproducible across runs regardless of
   64|       |    // readdir ordering; a failing input then reproduces against the same dict
   65|      2|    std::sort(affs.begin(), affs.end());
   66|      2|    for (const auto& entry : affs)
  ------------------
  |  Branch (66:28): [True: 38, False: 2]
  ------------------
   67|     38|    {
   68|     38|        std::string dic = entry.substr(0, entry.size() - 4) + ".dic";
   69|     38|        dictionaries.emplace_back(new Hunspell(entry.c_str(), dic.c_str()));
   70|     38|    }
   71|       |
   72|      2|    return 0;
   73|      2|}
LLVMFuzzerTestOneInput:
   76|  3.21k|{
   77|  3.21k|    std::string word(data, size);
   78|  3.21k|    for (auto& dict : dictionaries)
  ------------------
  |  Branch (78:21): [True: 60.9k, False: 3.21k]
  ------------------
   79|  60.9k|    {
   80|  60.9k|        if (!dict->spell(word))
  ------------------
  |  Branch (80:13): [True: 60.4k, False: 572]
  ------------------
   81|  60.4k|            dict->suggest(word);
   82|  60.9k|    }
   83|  3.21k|    return 0;
   84|  3.21k|}

