LLVMFuzzerTestOneInput:
   52|  19.2k|LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   53|  19.2k|  if (size == 0)
  ------------------
  |  Branch (53:7): [True: 0, False: 19.2k]
  ------------------
   54|      0|    return 0;
   55|       |
   56|  19.2k|  XML_Parser p = XML_ParserCreate(xstr(ENCODING_FOR_FUZZING));
  ------------------
  |  |   26|  19.2k|#define xstr(s) str(s)
  |  |  ------------------
  |  |  |  |   27|  19.2k|#define str(s) #s
  |  |  ------------------
  ------------------
   57|  19.2k|  assert(p);
   58|      0|  XML_SetElementHandler(p, start, end);
   59|       |
   60|       |  // Set the hash salt using siphash to generate a deterministic hash.
   61|  19.2k|  struct sipkey *key = sip_keyof(hash_key);
  ------------------
  |  |  145|  19.2k|#define sip_keyof(k) sip_tokey(&(struct sipkey){{0}}, (k))
  ------------------
   62|  19.2k|  XML_SetHashSalt(p, (unsigned long)siphash24(data, size, key));
   63|       |
   64|  19.2k|  void *buf = XML_GetBuffer(p, size);
   65|  19.2k|  assert(buf);
   66|       |
   67|      0|  memcpy(buf, data, size);
   68|  19.2k|  XML_ParseBuffer(p, size, size == 0);
   69|  19.2k|  XML_ParserFree(p);
   70|  19.2k|  return 0;
   71|  19.2k|}
xml_parsebuffer_fuzzer.c:start:
   40|  2.51M|start(void *userData, const XML_Char *name, const XML_Char **atts) {
   41|  2.51M|  (void)userData;
   42|  2.51M|  (void)name;
   43|  2.51M|  (void)atts;
   44|  2.51M|}
xml_parsebuffer_fuzzer.c:end:
   46|  26.4k|end(void *userData, const XML_Char *name) {
   47|  26.4k|  (void)userData;
   48|  26.4k|  (void)name;
   49|  26.4k|}

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.2k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.2k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.2k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.2k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.2k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.2k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.2k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.2k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.2k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.2k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.2k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.2k|  return key;
  152|  19.2k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.2k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.2k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.2k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.2k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.2k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.2k|sip24_final(struct siphash *H) {
  232|  19.2k|  const char left = (char)(H->p - H->buf);
  233|  19.2k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.2k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.2k]
  ------------------
  236|  1.27k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.27k, False: 17.9k]
  ------------------
  237|  1.27k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.95k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.67k, False: 15.5k]
  ------------------
  240|  4.95k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.18k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.22k, False: 18.0k]
  ------------------
  243|  6.18k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  9.90k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.72k, False: 15.5k]
  ------------------
  246|  9.90k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.1k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.24k, False: 18.0k]
  ------------------
  249|  11.1k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.5k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.37k, False: 15.9k]
  ------------------
  252|  14.5k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.8k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.33k, False: 17.9k]
  ------------------
  255|  15.8k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.2k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.41k, False: 15.8k]
  ------------------
  258|  19.2k|    break;
  259|  19.2k|  }
  260|       |
  261|  19.2k|  H->v3 ^= b;
  262|  19.2k|  sip_round(H, 2);
  263|  19.2k|  H->v0 ^= b;
  264|  19.2k|  H->v2 ^= 0xff;
  265|  19.2k|  sip_round(H, 4);
  266|       |
  267|  19.2k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.2k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  40.7M|sip_round(struct siphash *H, const int rounds) {
  168|  40.7M|  int i;
  169|       |
  170|   122M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 81.4M, False: 40.7M]
  ------------------
  171|  81.4M|    H->v0 += H->v1;
  172|  81.4M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  81.4M|    H->v1 ^= H->v0;
  174|  81.4M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  81.4M|    H->v2 += H->v3;
  177|  81.4M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  81.4M|    H->v3 ^= H->v2;
  179|       |
  180|  81.4M|    H->v0 += H->v3;
  181|  81.4M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  81.4M|    H->v3 ^= H->v0;
  183|       |
  184|  81.4M|    H->v2 += H->v1;
  185|  81.4M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  81.4M|    H->v1 ^= H->v2;
  187|  81.4M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  81.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  81.4M|  }
  189|  40.7M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.2k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.2k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.2k|  uint64_t m;
  210|       |
  211|  40.6M|  do {
  212|   366M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   366M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 366M, False: 19.2k]
  |  Branch (212:22): [True: 325M, False: 40.6M]
  ------------------
  213|   325M|      *H->p++ = *p++;
  214|       |
  215|  40.6M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  40.6M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.8k, False: 40.6M]
  ------------------
  216|  15.8k|      break;
  217|       |
  218|  40.6M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  40.6M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  40.6M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  40.6M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  40.6M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  40.6M|    H->v3 ^= m;
  220|  40.6M|    sip_round(H, 2);
  221|  40.6M|    H->v0 ^= m;
  222|       |
  223|  40.6M|    H->p = H->buf;
  224|  40.6M|    H->c += 8;
  225|  40.6M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 40.6M, False: 3.41k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.2k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.2k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.2k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.2k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.2k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.2k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.2k|  H->p = H->buf;
  199|  19.2k|  H->c = 0;
  200|       |
  201|  19.2k|  return H;
  202|  19.2k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  3.39M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  3.39M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  3.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  3.39M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  3.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  3.39M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  3.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  3.39M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  3.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  3.39M|  H->p = H->buf;
  199|  3.39M|  H->c = 0;
  200|       |
  201|  3.39M|  return H;
  202|  3.39M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  3.39M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  3.39M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  3.39M|  uint64_t m;
  210|       |
  211|  4.11M|  do {
  212|  14.3M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  10.9M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 10.9M, False: 3.39M]
  |  Branch (212:22): [True: 10.1M, False: 719k]
  ------------------
  213|  10.1M|      *H->p++ = *p++;
  214|       |
  215|  4.11M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.11M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 3.38M, False: 729k]
  ------------------
  216|  3.38M|      break;
  217|       |
  218|   729k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   729k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   729k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   729k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   729k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   729k|    H->v3 ^= m;
  220|   729k|    sip_round(H, 2);
  221|   729k|    H->v0 ^= m;
  222|       |
  223|   729k|    H->p = H->buf;
  224|   729k|    H->c += 8;
  225|   729k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 719k, False: 9.61k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  3.39M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  7.52M|sip_round(struct siphash *H, const int rounds) {
  168|  7.52M|  int i;
  169|       |
  170|  29.3M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 21.8M, False: 7.52M]
  ------------------
  171|  21.8M|    H->v0 += H->v1;
  172|  21.8M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  21.8M|    H->v1 ^= H->v0;
  174|  21.8M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  21.8M|    H->v2 += H->v3;
  177|  21.8M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  21.8M|    H->v3 ^= H->v2;
  179|       |
  180|  21.8M|    H->v0 += H->v3;
  181|  21.8M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  21.8M|    H->v3 ^= H->v0;
  183|       |
  184|  21.8M|    H->v2 += H->v1;
  185|  21.8M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  21.8M|    H->v1 ^= H->v2;
  187|  21.8M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  21.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  21.8M|  }
  189|  7.52M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  3.39M|sip24_final(struct siphash *H) {
  232|  3.39M|  const char left = (char)(H->p - H->buf);
  233|  3.39M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  3.39M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 3.39M]
  ------------------
  236|  6.28k|  case 7:
  ------------------
  |  Branch (236:3): [True: 6.28k, False: 3.38M]
  ------------------
  237|  6.28k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  15.4k|  case 6:
  ------------------
  |  Branch (239:3): [True: 9.20k, False: 3.38M]
  ------------------
  240|  15.4k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  68.1k|  case 5:
  ------------------
  |  Branch (242:3): [True: 52.6k, False: 3.34M]
  ------------------
  243|  68.1k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|   165k|  case 4:
  ------------------
  |  Branch (245:3): [True: 97.4k, False: 3.29M]
  ------------------
  246|   165k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|   254k|  case 3:
  ------------------
  |  Branch (248:3): [True: 88.5k, False: 3.30M]
  ------------------
  249|   254k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   465k|  case 2:
  ------------------
  |  Branch (251:3): [True: 211k, False: 3.18M]
  ------------------
  252|   465k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  3.38M|  case 1:
  ------------------
  |  Branch (254:3): [True: 2.92M, False: 475k]
  ------------------
  255|  3.38M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  3.39M|  case 0:
  ------------------
  |  Branch (257:3): [True: 9.82k, False: 3.38M]
  ------------------
  258|  3.39M|    break;
  259|  3.39M|  }
  260|       |
  261|  3.39M|  H->v3 ^= b;
  262|  3.39M|  sip_round(H, 2);
  263|  3.39M|  H->v0 ^= b;
  264|  3.39M|  H->v2 ^= 0xff;
  265|  3.39M|  sip_round(H, 4);
  266|       |
  267|  3.39M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  3.39M|} /* sip24_final() */

XML_ParserCreate:
  719|  19.2k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  19.2k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  19.2k|}
XML_ParserCreate_MM:
  970|  19.2k|                    const XML_Char *nameSep) {
  971|  19.2k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  19.2k|}
XML_ParserFree:
 1441|  19.2k|XML_ParserFree(XML_Parser parser) {
 1442|  19.2k|  TAG *tagList;
 1443|  19.2k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 19.2k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  19.2k|  tagList = parser->m_tagStack;
 1448|  2.50M|  for (;;) {
 1449|  2.50M|    TAG *p;
 1450|  2.50M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 19.5k, False: 2.48M]
  ------------------
 1451|  19.5k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 19.2k, False: 226]
  ------------------
 1452|  19.2k|        break;
 1453|    226|      tagList = parser->m_freeTagList;
 1454|    226|      parser->m_freeTagList = NULL;
 1455|    226|    }
 1456|  2.48M|    p = tagList;
 1457|  2.48M|    tagList = tagList->parent;
 1458|  2.48M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  2.48M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  2.48M|    destroyBindings(p->bindings, parser);
 1460|  2.48M|    FREE(parser, p);
  ------------------
  |  |  716|  2.48M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  2.48M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  19.2k|  entityList = parser->m_openInternalEntities;
 1464|  20.8k|  for (;;) {
 1465|  20.8k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  20.8k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 19.8k, False: 978]
  ------------------
 1467|  19.8k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 19.2k, False: 579]
  ------------------
 1468|  19.2k|        break;
 1469|    579|      entityList = parser->m_freeInternalEntities;
 1470|    579|      parser->m_freeInternalEntities = NULL;
 1471|    579|    }
 1472|  1.55k|    openEntity = entityList;
 1473|  1.55k|    entityList = entityList->next;
 1474|  1.55k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  1.55k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  1.55k|  }
 1476|       |
 1477|  19.2k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  19.2k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  19.2k|  poolDestroy(&parser->m_tempPool);
 1480|  19.2k|  poolDestroy(&parser->m_temp2Pool);
 1481|  19.2k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  19.2k|#ifdef XML_DTD
 1483|       |  /* external parameter entity parsers share the DTD structure
 1484|       |     parser->m_dtd with the root parser, so we must not destroy it
 1485|       |  */
 1486|  19.2k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 19.2k, False: 0]
  |  Branch (1486:36): [True: 19.2k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  19.2k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  19.2k|               &parser->m_mem);
 1492|  19.2k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1493|       |#ifdef XML_ATTR_INFO
 1494|       |  FREE(parser, (void *)parser->m_attInfo);
 1495|       |#endif
 1496|  19.2k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.2k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.2k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.2k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.2k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  19.2k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 19.2k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  19.2k|  FREE(parser, parser);
  ------------------
  |  |  716|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  19.2k|}
XML_SetElementHandler:
 1596|  19.2k|                      XML_EndElementHandler end) {
 1597|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 19.2k]
  ------------------
 1598|      0|    return;
 1599|  19.2k|  parser->m_startElementHandler = start;
 1600|  19.2k|  parser->m_endElementHandler = end;
 1601|  19.2k|}
XML_SetHashSalt:
 1816|  19.2k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 19.2k]
  ------------------
 1818|      0|    return 0;
 1819|  19.2k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 19.2k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  19.2k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 19.2k]
  ------------------
 1823|  19.2k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 19.2k]
  ------------------
 1824|      0|    return 0;
 1825|  19.2k|  parser->m_hash_secret_salt = hash_salt;
 1826|  19.2k|  return 1;
 1827|  19.2k|}
XML_ParseBuffer:
 1984|  19.2k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  19.2k|  const char *start;
 1986|  19.2k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.2k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 19.2k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  19.2k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 19.2k]
  ------------------
 1992|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1993|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1994|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1994:3): [True: 0, False: 19.2k]
  ------------------
 1995|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1996|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1997|  19.2k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 19.2k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  19.2k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 19.2k]
  ------------------
 2000|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2001|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2002|      0|    }
 2003|       |
 2004|  19.2k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 19.2k, False: 0]
  |  Branch (2004:43): [True: 0, False: 19.2k]
  ------------------
 2005|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2006|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2007|      0|    }
 2008|       |    /* fall through */
 2009|  19.2k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 19.2k]
  ------------------
 2010|  19.2k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  19.2k|  }
 2012|       |
 2013|  19.2k|  start = parser->m_bufferPtr;
 2014|  19.2k|  parser->m_positionPtr = start;
 2015|  19.2k|  parser->m_bufferEnd += len;
 2016|  19.2k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  19.2k|  parser->m_parseEndByteIndex += len;
 2018|  19.2k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  19.2k|  parser->m_errorCode = parser->m_processor(
 2021|  19.2k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  19.2k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 8.18k, False: 11.0k]
  ------------------
 2024|  8.18k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  8.18k|    parser->m_processor = errorProcessor;
 2026|  8.18k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  8.18k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  11.0k|  } else {
 2028|  11.0k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 11.0k]
  ------------------
 2030|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2031|      0|      break;
 2032|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2032:5): [True: 0, False: 11.0k]
  ------------------
 2033|  11.0k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 11.0k, False: 0]
  ------------------
 2034|  11.0k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 11.0k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  11.0k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 11.0k]
  ------------------
 2039|  11.0k|    }
 2040|  11.0k|  }
 2041|       |
 2042|  11.0k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.0k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  11.0k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  11.0k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  11.0k|  return result;
 2046|  19.2k|}
XML_GetBuffer:
 2049|  19.2k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 19.2k]
  ------------------
 2051|      0|    return NULL;
 2052|  19.2k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 19.2k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  19.2k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 19.2k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 19.2k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  19.2k|  default:;
  ------------------
  |  Branch (2063:3): [True: 19.2k, False: 0]
  ------------------
 2064|  19.2k|  }
 2065|       |
 2066|  19.2k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.2k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 19.2k, False: 0]
  ------------------
 2067|  19.2k|#ifdef XML_CONTEXT_BYTES
 2068|  19.2k|    int keep;
 2069|  19.2k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  19.2k|    int neededSize = (int)((unsigned)len
 2072|  19.2k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.2k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  19.2k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  19.2k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 19.2k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  19.2k|#ifdef XML_CONTEXT_BYTES
 2079|  19.2k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.2k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  19.2k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  19.2k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 19.2k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  19.2k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 19.2k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  19.2k|    neededSize += keep;
 2088|  19.2k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  19.2k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 19.2k]
  ------------------
 2090|  19.2k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.2k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|#ifdef XML_CONTEXT_BYTES
 2092|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        int offset
 2094|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|      0|              - keep;
 2096|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2097|       |         * in the buffer */
 2098|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2099|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2100|      0|        parser->m_bufferEnd -= offset;
 2101|      0|        parser->m_bufferPtr -= offset;
 2102|      0|      }
 2103|       |#else
 2104|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2105|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2106|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2107|       |        parser->m_bufferEnd
 2108|       |            = parser->m_buffer
 2109|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2110|       |        parser->m_bufferPtr = parser->m_buffer;
 2111|       |      }
 2112|       |#endif /* not defined XML_CONTEXT_BYTES */
 2113|  19.2k|    } else {
 2114|  19.2k|      char *newBuf;
 2115|  19.2k|      int bufferSize
 2116|  19.2k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.2k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  19.2k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 19.2k, False: 0]
  ------------------
 2118|  19.2k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  19.2k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  30.5k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  30.5k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  30.5k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 11.2k, False: 19.2k]
  |  Branch (2122:43): [True: 11.2k, False: 0]
  ------------------
 2123|  19.2k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 19.2k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  19.2k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  19.2k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 19.2k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  19.2k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  19.2k|#ifdef XML_CONTEXT_BYTES
 2134|  19.2k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 19.2k]
  ------------------
 2135|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2136|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2137|      0|                   + keep);
 2138|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2139|      0|        parser->m_buffer = newBuf;
 2140|      0|        parser->m_bufferEnd
 2141|      0|            = parser->m_buffer
 2142|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2143|      0|              + keep;
 2144|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2145|  19.2k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  19.2k|        parser->m_bufferEnd = newBuf;
 2148|  19.2k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  19.2k|      }
 2150|       |#else
 2151|       |      if (parser->m_bufferPtr) {
 2152|       |        memcpy(newBuf, parser->m_bufferPtr,
 2153|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2154|       |        FREE(parser, parser->m_buffer);
 2155|       |        parser->m_bufferEnd
 2156|       |            = newBuf
 2157|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2158|       |      } else {
 2159|       |        /* This must be a brand new buffer with no data in it yet */
 2160|       |        parser->m_bufferEnd = newBuf;
 2161|       |      }
 2162|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2163|       |#endif /* not defined XML_CONTEXT_BYTES */
 2164|  19.2k|    }
 2165|  19.2k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  19.2k|    parser->m_positionPtr = NULL;
 2167|  19.2k|  }
 2168|  19.2k|  return parser->m_bufferEnd;
 2169|  19.2k|}
xmlparse.c:parserCreate:
  977|  19.2k|             DTD *dtd) {
  978|  19.2k|  XML_Parser parser;
  979|       |
  980|  19.2k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 19.2k]
  ------------------
  981|      0|    XML_Memory_Handling_Suite *mtemp;
  982|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  983|      0|    if (parser != NULL) {
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  985|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  986|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  987|      0|      mtemp->free_fcn = memsuite->free_fcn;
  988|      0|    }
  989|  19.2k|  } else {
  990|  19.2k|    XML_Memory_Handling_Suite *mtemp;
  991|  19.2k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  19.2k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 19.2k, False: 0]
  ------------------
  993|  19.2k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  19.2k|      mtemp->malloc_fcn = malloc;
  995|  19.2k|      mtemp->realloc_fcn = realloc;
  996|  19.2k|      mtemp->free_fcn = free;
  997|  19.2k|    }
  998|  19.2k|  }
  999|       |
 1000|  19.2k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 19.2k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  19.2k|  parser->m_buffer = NULL;
 1004|  19.2k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  19.2k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  19.2k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  19.2k|  parser->m_atts
 1008|  19.2k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  19.2k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 19.2k]
  ------------------
 1010|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1011|      0|    return NULL;
 1012|      0|  }
 1013|       |#ifdef XML_ATTR_INFO
 1014|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1015|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1016|       |  if (parser->m_attInfo == NULL) {
 1017|       |    FREE(parser, parser->m_atts);
 1018|       |    FREE(parser, parser);
 1019|       |    return NULL;
 1020|       |  }
 1021|       |#endif
 1022|  19.2k|  parser->m_dataBuf
 1023|  19.2k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  19.2k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 19.2k]
  ------------------
 1025|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1026|       |#ifdef XML_ATTR_INFO
 1027|       |    FREE(parser, parser->m_attInfo);
 1028|       |#endif
 1029|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1030|      0|    return NULL;
 1031|      0|  }
 1032|  19.2k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  19.2k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  19.2k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 19.2k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  19.2k|  else {
 1037|  19.2k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  19.2k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 19.2k]
  ------------------
 1039|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1041|       |#ifdef XML_ATTR_INFO
 1042|       |      FREE(parser, parser->m_attInfo);
 1043|       |#endif
 1044|      0|      FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1045|      0|      return NULL;
 1046|      0|    }
 1047|  19.2k|  }
 1048|       |
 1049|  19.2k|  parser->m_freeBindingList = NULL;
 1050|  19.2k|  parser->m_freeTagList = NULL;
 1051|  19.2k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  19.2k|  parser->m_groupSize = 0;
 1054|  19.2k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  19.2k|  parser->m_unknownEncodingHandler = NULL;
 1057|  19.2k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  19.2k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.2k|#define ASCII_EXCL 0x21
  ------------------
 1060|  19.2k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  19.2k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  19.2k|  parser->m_nsAtts = NULL;
 1064|  19.2k|  parser->m_nsAttsVersion = 0;
 1065|  19.2k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  19.2k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  19.2k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  19.2k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  19.2k|  parserInit(parser, encodingName);
 1072|       |
 1073|  19.2k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 19.2k, False: 0]
  |  Branch (1073:23): [True: 0, False: 19.2k]
  ------------------
 1074|      0|    if (dtd) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  ------------------
 1075|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1076|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1077|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1078|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1079|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1080|      0|      parser->m_dtd = NULL;
 1081|      0|    }
 1082|      0|    XML_ParserFree(parser);
 1083|      0|    return NULL;
 1084|      0|  }
 1085|       |
 1086|  19.2k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 19.2k]
  ------------------
 1087|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1088|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  163|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1089|      0|    parser->m_namespaceSeparator = *nameSep;
 1090|  19.2k|  } else {
 1091|  19.2k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  19.2k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  19.2k|  }
 1093|       |
 1094|  19.2k|  return parser;
 1095|  19.2k|}
xmlparse.c:dtdCreate:
 6716|  19.2k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  19.2k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  19.2k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 19.2k]
  ------------------
 6719|      0|    return p;
 6720|  19.2k|  poolInit(&(p->pool), ms);
 6721|  19.2k|  poolInit(&(p->entityValuePool), ms);
 6722|  19.2k|  hashTableInit(&(p->generalEntities), ms);
 6723|  19.2k|  hashTableInit(&(p->elementTypes), ms);
 6724|  19.2k|  hashTableInit(&(p->attributeIds), ms);
 6725|  19.2k|  hashTableInit(&(p->prefixes), ms);
 6726|  19.2k|#ifdef XML_DTD
 6727|  19.2k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  19.2k|  hashTableInit(&(p->paramEntities), ms);
 6729|  19.2k|#endif /* XML_DTD */
 6730|  19.2k|  p->defaultPrefix.name = NULL;
 6731|  19.2k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  19.2k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  19.2k|  p->scaffIndex = NULL;
 6735|  19.2k|  p->scaffold = NULL;
 6736|  19.2k|  p->scaffLevel = 0;
 6737|  19.2k|  p->scaffSize = 0;
 6738|  19.2k|  p->scaffCount = 0;
 6739|  19.2k|  p->contentStringLen = 0;
 6740|       |
 6741|  19.2k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  19.2k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.2k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  19.2k|  return p;
 6745|  19.2k|}
xmlparse.c:hashTableInit:
 7150|  96.3k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  96.3k|  p->power = 0;
 7152|  96.3k|  p->size = 0;
 7153|  96.3k|  p->used = 0;
 7154|  96.3k|  p->v = NULL;
 7155|  96.3k|  p->mem = ms;
 7156|  96.3k|}
xmlparse.c:poolInit:
 7175|  77.1k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  77.1k|  pool->blocks = NULL;
 7177|  77.1k|  pool->freeBlocks = NULL;
 7178|  77.1k|  pool->start = NULL;
 7179|  77.1k|  pool->ptr = NULL;
 7180|  77.1k|  pool->end = NULL;
 7181|  77.1k|  pool->mem = ms;
 7182|  77.1k|}
xmlparse.c:parserInit:
 1098|  19.2k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  19.2k|  parser->m_processor = prologInitProcessor;
 1100|  19.2k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  19.2k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 19.2k, False: 0]
  ------------------
 1102|  19.2k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  19.2k|  }
 1104|  19.2k|  parser->m_curBase = NULL;
 1105|  19.2k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  19.2k|  parser->m_userData = NULL;
 1107|  19.2k|  parser->m_handlerArg = NULL;
 1108|  19.2k|  parser->m_startElementHandler = NULL;
 1109|  19.2k|  parser->m_endElementHandler = NULL;
 1110|  19.2k|  parser->m_characterDataHandler = NULL;
 1111|  19.2k|  parser->m_processingInstructionHandler = NULL;
 1112|  19.2k|  parser->m_commentHandler = NULL;
 1113|  19.2k|  parser->m_startCdataSectionHandler = NULL;
 1114|  19.2k|  parser->m_endCdataSectionHandler = NULL;
 1115|  19.2k|  parser->m_defaultHandler = NULL;
 1116|  19.2k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  19.2k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  19.2k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  19.2k|  parser->m_notationDeclHandler = NULL;
 1120|  19.2k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  19.2k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  19.2k|  parser->m_notStandaloneHandler = NULL;
 1123|  19.2k|  parser->m_externalEntityRefHandler = NULL;
 1124|  19.2k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  19.2k|  parser->m_skippedEntityHandler = NULL;
 1126|  19.2k|  parser->m_elementDeclHandler = NULL;
 1127|  19.2k|  parser->m_attlistDeclHandler = NULL;
 1128|  19.2k|  parser->m_entityDeclHandler = NULL;
 1129|  19.2k|  parser->m_xmlDeclHandler = NULL;
 1130|  19.2k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  19.2k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  19.2k|  parser->m_parseEndByteIndex = 0;
 1133|  19.2k|  parser->m_parseEndPtr = NULL;
 1134|  19.2k|  parser->m_declElementType = NULL;
 1135|  19.2k|  parser->m_declAttributeId = NULL;
 1136|  19.2k|  parser->m_declEntity = NULL;
 1137|  19.2k|  parser->m_doctypeName = NULL;
 1138|  19.2k|  parser->m_doctypeSysid = NULL;
 1139|  19.2k|  parser->m_doctypePubid = NULL;
 1140|  19.2k|  parser->m_declAttributeType = NULL;
 1141|  19.2k|  parser->m_declNotationName = NULL;
 1142|  19.2k|  parser->m_declNotationPublicId = NULL;
 1143|  19.2k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.2k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  19.2k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  19.2k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  19.2k|  parser->m_eventPtr = NULL;
 1148|  19.2k|  parser->m_eventEndPtr = NULL;
 1149|  19.2k|  parser->m_positionPtr = NULL;
 1150|  19.2k|  parser->m_openInternalEntities = NULL;
 1151|  19.2k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  19.2k|  parser->m_tagLevel = 0;
 1153|  19.2k|  parser->m_tagStack = NULL;
 1154|  19.2k|  parser->m_inheritedBindings = NULL;
 1155|  19.2k|  parser->m_nSpecifiedAtts = 0;
 1156|  19.2k|  parser->m_unknownEncodingMem = NULL;
 1157|  19.2k|  parser->m_unknownEncodingRelease = NULL;
 1158|  19.2k|  parser->m_unknownEncodingData = NULL;
 1159|  19.2k|  parser->m_parentParser = NULL;
 1160|  19.2k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  19.2k|#ifdef XML_DTD
 1162|  19.2k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.2k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  19.2k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  19.2k|#endif
 1166|  19.2k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  19.2k|#ifdef XML_DTD
 1169|  19.2k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  19.2k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  19.2k|  parser->m_accounting.maximumAmplificationFactor
 1172|  19.2k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.2k|  100.0f
  ------------------
 1173|  19.2k|  parser->m_accounting.activationThresholdBytes
 1174|  19.2k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.2k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  19.2k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  19.2k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  19.2k|#endif
 1179|  19.2k|}
xmlparse.c:prologInitProcessor:
 4406|  19.2k|                    const char **nextPtr) {
 4407|  19.2k|  enum XML_Error result = initializeEncoding(parser);
 4408|  19.2k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 19.2k]
  ------------------
 4409|      0|    return result;
 4410|  19.2k|  parser->m_processor = prologProcessor;
 4411|  19.2k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  19.2k|}
xmlparse.c:initializeEncoding:
 4249|  19.2k|initializeEncoding(XML_Parser parser) {
 4250|  19.2k|  const char *s;
 4251|       |#ifdef XML_UNICODE
 4252|       |  char encodingBuf[128];
 4253|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4254|       |  if (! parser->m_protocolEncodingName)
 4255|       |    s = NULL;
 4256|       |  else {
 4257|       |    int i;
 4258|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4259|       |      if (i == sizeof(encodingBuf) - 1
 4260|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4261|       |        encodingBuf[0] = '\0';
 4262|       |        break;
 4263|       |      }
 4264|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4265|       |    }
 4266|       |    encodingBuf[i] = '\0';
 4267|       |    s = encodingBuf;
 4268|       |  }
 4269|       |#else
 4270|  19.2k|  s = parser->m_protocolEncodingName;
 4271|  19.2k|#endif
 4272|  19.2k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 19.2k, False: 0]
  |  Branch (4272:8): [True: 0, False: 19.2k]
  ------------------
 4273|  19.2k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  19.2k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  19.2k|}
xmlparse.c:prologProcessor:
 4606|  19.2k|                const char **nextPtr) {
 4607|  19.2k|  const char *next = s;
 4608|  19.2k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.2k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.2k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  19.2k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  19.2k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  19.2k|                  XML_ACCOUNT_DIRECT);
 4612|  19.2k|}
xmlparse.c:doProlog:
 4617|  19.2k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  19.2k|#ifdef XML_DTD
 4619|  19.2k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.2k|#define ASCII_HASH 0x23
  ------------------
 4620|  19.2k|#endif /* XML_DTD */
 4621|  19.2k|  static const XML_Char atypeCDATA[]
 4622|  19.2k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.2k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
 4623|  19.2k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
 4624|  19.2k|  static const XML_Char atypeIDREF[]
 4625|  19.2k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.2k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.2k|#define ASCII_F 0x46
  ------------------
 4626|  19.2k|  static const XML_Char atypeIDREFS[]
 4627|  19.2k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.2k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.2k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4628|  19.2k|  static const XML_Char atypeENTITY[]
 4629|  19.2k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.2k|#define ASCII_Y 0x59
  ------------------
 4630|  19.2k|  static const XML_Char atypeENTITIES[]
 4631|  19.2k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
 4632|  19.2k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4633|  19.2k|  static const XML_Char atypeNMTOKEN[]
 4634|  19.2k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.2k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.2k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
 4635|  19.2k|  static const XML_Char atypeNMTOKENS[]
 4636|  19.2k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.2k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.2k|#define ASCII_K 0x4B
  ------------------
 4637|  19.2k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4638|  19.2k|  static const XML_Char notationPrefix[]
 4639|  19.2k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
 4640|  19.2k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.2k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  19.2k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.2k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  19.2k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.2k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  19.2k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  19.2k|  const char **eventPP;
 4652|  19.2k|  const char **eventEndPP;
 4653|  19.2k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  19.2k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 19.2k, False: 0]
  ------------------
 4656|  19.2k|    eventPP = &parser->m_eventPtr;
 4657|  19.2k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  19.2k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  5.54M|  for (;;) {
 4664|  5.54M|    int role;
 4665|  5.54M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  5.54M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  5.54M|    *eventPP = s;
 4667|  5.54M|    *eventEndPP = next;
 4668|  5.54M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 6.35k, False: 5.53M]
  ------------------
 4669|  6.35k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.35k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 6.35k, False: 0]
  |  Branch (4669:23): [True: 4.29k, False: 2.06k]
  ------------------
 4670|  4.29k|        *nextPtr = s;
 4671|  4.29k|        return XML_ERROR_NONE;
 4672|  4.29k|      }
 4673|  2.06k|      switch (tok) {
 4674|  2.06k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.06k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 2.06k, False: 0]
  ------------------
 4675|  2.06k|        *eventPP = next;
 4676|  2.06k|        return XML_ERROR_INVALID_TOKEN;
 4677|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4677:7): [True: 0, False: 2.06k]
  ------------------
 4678|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4679|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4679:7): [True: 0, False: 2.06k]
  ------------------
 4680|      0|        return XML_ERROR_PARTIAL_CHAR;
 4681|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4681:7): [True: 0, False: 2.06k]
  ------------------
 4682|      0|        tok = -tok;
 4683|      0|        break;
 4684|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4684:7): [True: 0, False: 2.06k]
  ------------------
 4685|      0|#ifdef XML_DTD
 4686|       |        /* for internal PE NOT referenced between declarations */
 4687|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4687:13): [True: 0, False: 0]
  ------------------
 4688|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4688:16): [True: 0, False: 0]
  ------------------
 4689|      0|          *nextPtr = s;
 4690|      0|          return XML_ERROR_NONE;
 4691|      0|        }
 4692|       |        /* WFC: PE Between Declarations - must check that PE contains
 4693|       |           complete markup, not only for external PEs, but also for
 4694|       |           internal PEs if the reference occurs between declarations.
 4695|       |        */
 4696|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4696:13): [True: 0, False: 0]
  |  Branch (4696:40): [True: 0, False: 0]
  ------------------
 4697|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4697:15): [True: 0, False: 0]
  ------------------
 4698|      0|              == XML_ROLE_ERROR)
 4699|      0|            return XML_ERROR_INCOMPLETE_PE;
 4700|      0|          *nextPtr = s;
 4701|      0|          return XML_ERROR_NONE;
 4702|      0|        }
 4703|      0|#endif /* XML_DTD */
 4704|      0|        return XML_ERROR_NO_ELEMENTS;
 4705|      0|      default:
  ------------------
  |  Branch (4705:7): [True: 0, False: 2.06k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  2.06k|      }
 4710|  2.06k|    }
 4711|  5.53M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  5.53M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  5.53M|#ifdef XML_DTD
 4713|  5.53M|    switch (role) {
 4714|  11.1k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 11.1k, False: 5.52M]
  ------------------
 4715|  11.4k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 297, False: 5.53M]
  ------------------
 4716|  11.4k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 5.53M]
  ------------------
 4717|  11.4k|      break;
 4718|  5.52M|    default:
  ------------------
  |  Branch (4718:5): [True: 5.52M, False: 11.4k]
  ------------------
 4719|  5.52M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 0, False: 5.52M]
  ------------------
 4720|      0|        accountingOnAbort(parser);
 4721|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      0|      }
 4723|  5.53M|    }
 4724|  5.53M|#endif
 4725|  5.53M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 5.53M]
  ------------------
 4726|    297|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 297, False: 5.53M]
  ------------------
 4727|    297|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    297|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 230, False: 67]
  ------------------
 4729|    230|        return result;
 4730|     67|      enc = parser->m_encoding;
 4731|     67|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     67|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     67|    } break;
 4733|  5.67k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 5.67k, False: 5.53M]
  ------------------
 4734|  5.67k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 5.67k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  5.67k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  5.67k|      break;
 4745|  4.86k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 4.86k, False: 5.53M]
  ------------------
 4746|  4.86k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 4.86k]
  ------------------
 4747|      0|        parser->m_startDoctypeDeclHandler(
 4748|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4749|      0|            parser->m_doctypePubid, 1);
 4750|      0|        parser->m_doctypeName = NULL;
 4751|      0|        poolClear(&parser->m_tempPool);
 4752|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4753|      0|      }
 4754|  4.86k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 5.53M]
  ------------------
 4757|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4758|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4758:11): [True: 0, False: 0]
  ------------------
 4759|      0|        return result;
 4760|      0|      enc = parser->m_encoding;
 4761|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4762|      0|    } break;
 4763|      0|#endif /* XML_DTD */
 4764|    694|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 694, False: 5.53M]
  ------------------
 4765|    694|#ifdef XML_DTD
 4766|    694|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    694|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    694|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    694|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    694|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 694]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    694|#endif /* XML_DTD */
 4772|    694|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    694|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    694|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 694]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  2.62k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 1.92k, False: 5.53M]
  ------------------
 4790|  2.62k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.62k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 91, False: 2.52k]
  ------------------
 4791|     91|        return XML_ERROR_PUBLICID;
 4792|  2.52k|    alreadyChecked:
 4793|  2.52k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 2.27k, False: 258]
  |  Branch (4793:34): [True: 742, False: 1.52k]
  ------------------
 4794|    742|        XML_Char *tem
 4795|    742|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    742|                              next - enc->minBytesPerChar);
 4797|    742|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 742]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    742|        normalizePublicId(tem);
 4800|    742|        parser->m_declEntity->publicId = tem;
 4801|    742|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    742|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4802|       |        /* Don't suppress the default handler if we fell through from
 4803|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4804|       |         */
 4805|    742|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 742]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    742|      }
 4808|  2.52k|      break;
 4809|  2.52k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 2.12k, False: 5.53M]
  ------------------
 4810|  2.12k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.12k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 2.12k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  2.12k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 2.12k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  2.12k|#ifdef XML_DTD
 4827|  2.12k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 3, False: 2.12k]
  |  Branch (4827:37): [True: 0, False: 2.12k]
  ------------------
 4828|      3|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|      3|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      3|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|      3|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 3]
  ------------------
 4831|      3|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4831:16): [True: 0, False: 0]
  ------------------
 4832|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4833|      0|                                            externalSubsetName, sizeof(ENTITY));
 4834|      0|          if (! entity) {
  ------------------
  |  Branch (4834:15): [True: 0, False: 0]
  ------------------
 4835|       |            /* The external subset name "#" will have already been
 4836|       |             * inserted into the hash table at the start of the
 4837|       |             * external entity parsing, so no allocation will happen
 4838|       |             * and lookup() cannot fail.
 4839|       |             */
 4840|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4841|      0|          }
 4842|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4842:15): [True: 0, False: 0]
  ------------------
 4843|      0|            entity->base = parser->m_curBase;
 4844|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4845|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4845:15): [True: 0, False: 0]
  ------------------
 4846|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4847|      0|                  entity->systemId, entity->publicId))
 4848|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4849|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4849:15): [True: 0, False: 0]
  ------------------
 4850|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4850:17): [True: 0, False: 0]
  |  Branch (4850:38): [True: 0, False: 0]
  ------------------
 4851|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  ------------------
 4852|      0|              return XML_ERROR_NOT_STANDALONE;
 4853|      0|          }
 4854|       |          /* if we didn't read the foreign DTD then this means that there
 4855|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4856|       |          */
 4857|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4857:20): [True: 0, False: 0]
  ------------------
 4858|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4859|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4860|      0|        }
 4861|      3|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|      3|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|      3|      }
 4863|  2.12k|#endif /* XML_DTD */
 4864|  2.12k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 2.12k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  2.12k|      break;
 4869|  11.1k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 11.1k, False: 5.52M]
  ------------------
 4870|  11.1k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  11.1k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 11.1k]
  ------------------
 4875|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4876|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4877|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4877:13): [True: 0, False: 0]
  ------------------
 4878|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4878:16): [True: 0, False: 0]
  ------------------
 4879|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4880|      0|                                            externalSubsetName, sizeof(ENTITY));
 4881|      0|          if (! entity)
  ------------------
  |  Branch (4881:15): [True: 0, False: 0]
  ------------------
 4882|      0|            return XML_ERROR_NO_MEMORY;
 4883|      0|          entity->base = parser->m_curBase;
 4884|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4885|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4885:15): [True: 0, False: 0]
  ------------------
 4886|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4887|      0|                  entity->systemId, entity->publicId))
 4888|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4889|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4889:15): [True: 0, False: 0]
  ------------------
 4890|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4890:17): [True: 0, False: 0]
  |  Branch (4890:38): [True: 0, False: 0]
  ------------------
 4891|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4891:20): [True: 0, False: 0]
  ------------------
 4892|      0|              return XML_ERROR_NOT_STANDALONE;
 4893|      0|          }
 4894|       |          /* if we didn't read the foreign DTD then this means that there
 4895|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4896|       |          */
 4897|      0|          else
 4898|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4899|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4900|      0|        }
 4901|      0|      }
 4902|  11.1k|#endif /* XML_DTD */
 4903|  11.1k|      parser->m_processor = contentProcessor;
 4904|  11.1k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  16.9k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 16.9k, False: 5.51M]
  ------------------
 4906|  16.9k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  16.9k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 16.9k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  16.9k|      goto checkAttListDeclHandler;
 4910|  48.7k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 48.7k, False: 5.48M]
  ------------------
 4911|  48.7k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  48.7k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 48.7k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  48.7k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  48.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  48.7k|      parser->m_declAttributeType = NULL;
 4916|  48.7k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  48.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  48.7k|      goto checkAttListDeclHandler;
 4918|    140|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 140, False: 5.53M]
  ------------------
 4919|    140|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    140|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|    140|      parser->m_declAttributeType = atypeCDATA;
 4921|    140|      goto checkAttListDeclHandler;
 4922|  4.95k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 4.95k, False: 5.53M]
  ------------------
 4923|  4.95k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  4.95k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  4.95k|      parser->m_declAttributeType = atypeID;
 4925|  4.95k|      goto checkAttListDeclHandler;
 4926|  1.99k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 1.99k, False: 5.53M]
  ------------------
 4927|  1.99k|      parser->m_declAttributeType = atypeIDREF;
 4928|  1.99k|      goto checkAttListDeclHandler;
 4929|    944|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 944, False: 5.53M]
  ------------------
 4930|    944|      parser->m_declAttributeType = atypeIDREFS;
 4931|    944|      goto checkAttListDeclHandler;
 4932|    555|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 555, False: 5.53M]
  ------------------
 4933|    555|      parser->m_declAttributeType = atypeENTITY;
 4934|    555|      goto checkAttListDeclHandler;
 4935|  8.99k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 8.99k, False: 5.52M]
  ------------------
 4936|  8.99k|      parser->m_declAttributeType = atypeENTITIES;
 4937|  8.99k|      goto checkAttListDeclHandler;
 4938|    342|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 342, False: 5.53M]
  ------------------
 4939|    342|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|    342|      goto checkAttListDeclHandler;
 4941|    104|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 104, False: 5.53M]
  ------------------
 4942|    104|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  83.7k|    checkAttListDeclHandler:
 4944|  83.7k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 82.6k, False: 1.11k]
  |  Branch (4944:34): [True: 0, False: 82.6k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  83.7k|      break;
 4947|  35.0k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 35.0k, False: 5.50M]
  ------------------
 4948|  36.4k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 1.32k, False: 5.53M]
  ------------------
 4949|  36.4k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 35.5k, False: 831]
  |  Branch (4949:34): [True: 0, False: 35.5k]
  ------------------
 4950|      0|        const XML_Char *prefix;
 4951|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|          prefix = enumValueSep;
 4953|      0|        } else {
 4954|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4954:21): [True: 0, False: 0]
  ------------------
 4955|      0|                                                              : enumValueStart);
 4956|      0|        }
 4957|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4957:13): [True: 0, False: 0]
  ------------------
 4958|      0|          return XML_ERROR_NO_MEMORY;
 4959|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|          return XML_ERROR_NO_MEMORY;
 4961|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4962|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4963|      0|      }
 4964|  36.4k|      break;
 4965|  36.4k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 30.6k, False: 5.50M]
  ------------------
 4966|  31.5k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 860, False: 5.53M]
  ------------------
 4967|  31.5k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 31.3k, False: 243]
  ------------------
 4968|  31.3k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 31.3k]
  ------------------
 4969|  31.3k|                              parser->m_declAttributeId,
 4970|  31.3k|                              parser->m_declAttributeIsCdata,
 4971|  31.3k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  31.3k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 31.3k]
  |  Branch (4973:45): [True: 0, False: 0]
  ------------------
 4974|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:15): [True: 0, False: 0]
  ------------------
 4975|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:19): [True: 0, False: 0]
  ------------------
 4976|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4976:22): [True: 0, False: 0]
  ------------------
 4977|       |            /* Enumerated or Notation type */
 4978|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:17): [True: 0, False: 0]
  ------------------
 4979|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4979:20): [True: 0, False: 0]
  ------------------
 4980|      0|              return XML_ERROR_NO_MEMORY;
 4981|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4982|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4983|      0|          }
 4984|      0|          *eventEndPP = s;
 4985|      0|          parser->m_attlistDeclHandler(
 4986|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4987|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4988|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4989|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4990|      0|        }
 4991|  31.3k|      }
 4992|  31.5k|      poolClear(&parser->m_tempPool);
 4993|  31.5k|      break;
 4994|  15.9k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 15.9k, False: 5.52M]
  ------------------
 4995|  16.7k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 763, False: 5.53M]
  ------------------
 4996|  16.7k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 16.3k, False: 437]
  ------------------
 4997|  16.3k|        const XML_Char *attVal;
 4998|  16.3k|        enum XML_Error result = storeAttributeValue(
 4999|  16.3k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  16.3k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  16.3k|            XML_ACCOUNT_NONE);
 5002|  16.3k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 19, False: 16.2k]
  ------------------
 5003|     19|          return result;
 5004|  16.2k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  16.2k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  16.2k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  16.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  16.2k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 16.2k]
  ------------------
 5008|  16.2k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  16.2k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  16.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  16.2k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 16.2k]
  |  Branch (5011:45): [True: 0, False: 0]
  ------------------
 5012|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:15): [True: 0, False: 0]
  ------------------
 5013|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:19): [True: 0, False: 0]
  ------------------
 5014|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5014:22): [True: 0, False: 0]
  ------------------
 5015|       |            /* Enumerated or Notation type */
 5016|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:17): [True: 0, False: 0]
  ------------------
 5017|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5017:20): [True: 0, False: 0]
  ------------------
 5018|      0|              return XML_ERROR_NO_MEMORY;
 5019|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5020|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5021|      0|          }
 5022|      0|          *eventEndPP = s;
 5023|      0|          parser->m_attlistDeclHandler(
 5024|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5025|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5026|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5027|      0|          poolClear(&parser->m_tempPool);
 5028|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5029|      0|        }
 5030|  16.2k|      }
 5031|  16.7k|      break;
 5032|  16.7k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 8.48k, False: 5.52M]
  ------------------
 5033|  8.48k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 7.60k, False: 881]
  ------------------
 5034|  7.60k|        enum XML_Error result
 5035|  7.60k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  7.60k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  7.60k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 3.30k, False: 4.30k]
  ------------------
 5038|  3.30k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  3.30k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  3.30k|          parser->m_declEntity->textLen
 5040|  3.30k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  3.30k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  3.30k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  3.30k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  3.30k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 3.30k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  3.30k|        } else
 5051|  4.30k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  4.30k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  7.60k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 72, False: 7.53k]
  ------------------
 5053|     72|          return result;
 5054|  7.60k|      }
 5055|  8.41k|      break;
 5056|  8.41k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 35, False: 5.53M]
  ------------------
 5057|     35|#ifdef XML_DTD
 5058|     35|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     35|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|     35|#endif /* XML_DTD */
 5060|     35|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     35|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|     35|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 35]
  ------------------
 5062|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5063|      0|                                                 s + enc->minBytesPerChar,
 5064|      0|                                                 next - enc->minBytesPerChar);
 5065|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5065:13): [True: 0, False: 0]
  ------------------
 5066|      0|          return XML_ERROR_NO_MEMORY;
 5067|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5068|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5069|      0|      }
 5070|     35|#ifdef XML_DTD
 5071|     35|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|     35|        parser->m_doctypeSysid = externalSubsetName;
 5075|     35|#endif /* XML_DTD */
 5076|     35|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 34, False: 1]
  ------------------
 5077|     35|#ifdef XML_DTD
 5078|     35|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 34, False: 0]
  ------------------
 5079|     35|#endif /* XML_DTD */
 5080|     35|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 34]
  ------------------
 5081|     35|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5081:14): [True: 0, False: 0]
  ------------------
 5082|      0|        return XML_ERROR_NOT_STANDALONE;
 5083|       |#ifndef XML_DTD
 5084|       |      break;
 5085|       |#else  /* XML_DTD */
 5086|     35|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 9, False: 26]
  ------------------
 5087|      9|        parser->m_declEntity = (ENTITY *)lookup(
 5088|      9|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|      9|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 9]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|      9|        parser->m_declEntity->publicId = NULL;
 5092|      9|      }
 5093|     35|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  3.35k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 3.32k, False: 5.53M]
  ------------------
 5096|  3.35k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 2.62k, False: 732]
  |  Branch (5096:34): [True: 272, False: 2.35k]
  ------------------
 5097|    272|        parser->m_declEntity->systemId
 5098|    272|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    272|                              next - enc->minBytesPerChar);
 5100|    272|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 272]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    272|        parser->m_declEntity->base = parser->m_curBase;
 5103|    272|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    272|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5104|       |        /* Don't suppress the default handler if we fell through from
 5105|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5106|       |         */
 5107|    272|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 272]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    272|      }
 5110|  3.35k|      break;
 5111|  3.35k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 2.59k, False: 5.53M]
  ------------------
 5112|  2.59k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 2.32k, False: 274]
  |  Branch (5112:34): [True: 196, False: 2.12k]
  ------------------
 5113|  2.59k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 196]
  ------------------
 5114|      0|        *eventEndPP = s;
 5115|      0|        parser->m_entityDeclHandler(
 5116|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5117|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5118|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5119|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5120|      0|      }
 5121|  2.59k|      break;
 5122|    707|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 707, False: 5.53M]
  ------------------
 5123|    707|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 252, False: 455]
  |  Branch (5123:34): [True: 28, False: 224]
  ------------------
 5124|     28|        parser->m_declEntity->notation
 5125|     28|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     28|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 28]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     28|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     28|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     28|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 28]
  ------------------
 5130|      0|          *eventEndPP = s;
 5131|      0|          parser->m_unparsedEntityDeclHandler(
 5132|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5133|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5134|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5135|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5136|     28|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 28]
  ------------------
 5137|      0|          *eventEndPP = s;
 5138|      0|          parser->m_entityDeclHandler(
 5139|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5140|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5141|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5142|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5143|      0|        }
 5144|     28|      }
 5145|    707|      break;
 5146|  8.26k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 8.26k, False: 5.52M]
  ------------------
 5147|  8.26k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  8.26k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 387, False: 7.88k]
  |  |  ------------------
  ------------------
 5148|    387|        parser->m_declEntity = NULL;
 5149|    387|        break;
 5150|    387|      }
 5151|  7.88k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 7.14k, False: 741]
  ------------------
 5152|  7.14k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  7.14k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 7.14k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  7.14k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  7.14k|                                                name, sizeof(ENTITY));
 5157|  7.14k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 7.14k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  7.14k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 3.95k, False: 3.18k]
  ------------------
 5160|  3.95k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  3.95k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  3.95k|          parser->m_declEntity = NULL;
 5162|  3.95k|        } else {
 5163|  3.18k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  3.18k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  3.18k|          parser->m_declEntity->publicId = NULL;
 5165|  3.18k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.18k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  3.18k|          parser->m_declEntity->is_internal
 5170|  3.18k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 3.18k]
  |  Branch (5170:46): [True: 0, False: 3.18k]
  ------------------
 5171|  3.18k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 3.18k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  3.18k|        }
 5174|  7.14k|      } else {
 5175|    741|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    741|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    741|        parser->m_declEntity = NULL;
 5177|    741|      }
 5178|  7.88k|    } break;
 5179|  7.88k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 3.70k, False: 5.53M]
  ------------------
 5180|  3.70k|#ifdef XML_DTD
 5181|  3.70k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 3.12k, False: 580]
  ------------------
 5182|  3.12k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  3.12k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 3.12k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  3.12k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  3.12k|                                                name, sizeof(ENTITY));
 5187|  3.12k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 3.12k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  3.12k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 2.68k, False: 438]
  ------------------
 5190|  2.68k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.68k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  2.68k|          parser->m_declEntity = NULL;
 5192|  2.68k|        } else {
 5193|    438|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    438|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    438|          parser->m_declEntity->publicId = NULL;
 5195|    438|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    438|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5196|       |          /* if we have a parent parser or are reading an internal parameter
 5197|       |             entity, then the entity declaration is not considered "internal"
 5198|       |          */
 5199|    438|          parser->m_declEntity->is_internal
 5200|    438|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 438]
  |  Branch (5200:46): [True: 0, False: 438]
  ------------------
 5201|    438|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 438]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    438|        }
 5204|  3.12k|      } else {
 5205|    580|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    580|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    580|        parser->m_declEntity = NULL;
 5207|    580|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  3.70k|      break;
 5212|  3.70k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 1.38k, False: 5.53M]
  ------------------
 5213|  1.38k|      parser->m_declNotationPublicId = NULL;
 5214|  1.38k|      parser->m_declNotationName = NULL;
 5215|  1.38k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 1.38k]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|  1.38k|      break;
 5224|  1.38k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 1.22k, False: 5.53M]
  ------------------
 5225|  1.22k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.22k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 2, False: 1.22k]
  ------------------
 5226|      2|        return XML_ERROR_PUBLICID;
 5227|  1.22k|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 1.22k]
  ------------------
 5228|  1.22k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|  1.22k|      break;
 5240|  1.22k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 573, False: 5.53M]
  ------------------
 5241|    573|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 573]
  |  Branch (5241:41): [True: 0, False: 0]
  ------------------
 5242|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5243|      0|                                                   s + enc->minBytesPerChar,
 5244|      0|                                                   next - enc->minBytesPerChar);
 5245|      0|        if (! systemId)
  ------------------
  |  Branch (5245:13): [True: 0, False: 0]
  ------------------
 5246|      0|          return XML_ERROR_NO_MEMORY;
 5247|      0|        *eventEndPP = s;
 5248|      0|        parser->m_notationDeclHandler(
 5249|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5250|      0|            systemId, parser->m_declNotationPublicId);
 5251|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5252|      0|      }
 5253|    573|      poolClear(&parser->m_tempPool);
 5254|    573|      break;
 5255|    763|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 763, False: 5.53M]
  ------------------
 5256|    763|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 763]
  |  Branch (5256:45): [True: 0, False: 0]
  ------------------
 5257|      0|        *eventEndPP = s;
 5258|      0|        parser->m_notationDeclHandler(
 5259|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5260|      0|            0, parser->m_declNotationPublicId);
 5261|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5262|      0|      }
 5263|    763|      poolClear(&parser->m_tempPool);
 5264|    763|      break;
 5265|  1.32k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.32k, False: 5.53M]
  ------------------
 5266|  1.32k|      switch (tok) {
 5267|      5|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      5|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 5, False: 1.32k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      5|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 1, False: 1.32k]
  ------------------
 5272|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.31k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.31k, False: 6]
  ------------------
 5274|  1.31k|        return XML_ERROR_SYNTAX;
 5275|  1.32k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 5.53M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  3.86M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 3.86M, False: 1.67M]
  ------------------
 5292|  3.86M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 1.17k, False: 3.86M]
  ------------------
 5293|  1.17k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 481, False: 698]
  ------------------
 5294|    481|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    481|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 481]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    481|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    481|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    481|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    481|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 481]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    481|            parser->m_groupConnector = new_connector;
 5307|    481|          }
 5308|       |
 5309|    481|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 481]
  ------------------
 5310|       |            /* Detect and prevent integer overflow.
 5311|       |             * The preprocessor guard addresses the "always false" warning
 5312|       |             * from -Wtype-limits on platforms where
 5313|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5314|       |#if UINT_MAX >= SIZE_MAX
 5315|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5316|       |              return XML_ERROR_NO_MEMORY;
 5317|       |            }
 5318|       |#endif
 5319|       |
 5320|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5321|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5322|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5322:17): [True: 0, False: 0]
  ------------------
 5323|      0|              return XML_ERROR_NO_MEMORY;
 5324|      0|            dtd->scaffIndex = new_scaff_index;
 5325|      0|          }
 5326|    698|        } else {
 5327|    698|          parser->m_groupConnector
 5328|    698|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    698|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    698|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 698]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    698|        }
 5334|  1.17k|      }
 5335|  3.86M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  3.86M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 3.86M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  3.86M|      break;
 5348|  3.86M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 241k, False: 5.29M]
  ------------------
 5349|   241k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|   241k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 1, False: 241k]
  ------------------
 5350|      1|        return XML_ERROR_SYNTAX;
 5351|   241k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|   241k|#define ASCII_COMMA 0x2C
  ------------------
 5352|   241k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 241k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|   241k|      break;
 5355|  4.51k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 4.51k, False: 5.53M]
  ------------------
 5356|  4.51k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  4.51k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 1, False: 4.51k]
  ------------------
 5357|      1|        return XML_ERROR_SYNTAX;
 5358|  4.51k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 4.51k]
  ------------------
 5359|  4.51k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  4.51k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5360:14): [True: 0, False: 0]
  ------------------
 5361|      0|              != XML_CTYPE_MIXED)) {
 5362|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5363|      0|            = XML_CTYPE_CHOICE;
 5364|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5364:13): [True: 0, False: 0]
  ------------------
 5365|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5366|      0|      }
 5367|  4.51k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  4.51k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  4.51k|      break;
 5369|  4.56k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 4.56k, False: 5.53M]
  ------------------
 5370|  4.56k|#ifdef XML_DTD
 5371|  4.56k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 5.53M]
  ------------------
 5372|  4.56k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  4.56k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  4.56k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 4.56k, False: 0]
  ------------------
 5374|  4.56k|        dtd->keepProcessing = dtd->standalone;
 5375|      0|      else {
 5376|      0|        const XML_Char *name;
 5377|      0|        ENTITY *entity;
 5378|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5379|      0|                               next - enc->minBytesPerChar);
 5380|      0|        if (! name)
  ------------------
  |  Branch (5380:13): [True: 0, False: 0]
  ------------------
 5381|      0|          return XML_ERROR_NO_MEMORY;
 5382|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5383|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5384|       |        /* first, determine if a check for an existing declaration is needed;
 5385|       |           if yes, check that the entity exists, and that it is internal,
 5386|       |           otherwise call the skipped entity handler
 5387|       |        */
 5388|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5388:13): [True: 0, False: 0]
  ------------------
 5389|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5389:16): [True: 0, False: 0]
  |  Branch (5389:17): [True: 0, False: 0]
  ------------------
 5390|      0|                                : ! dtd->hasParamEntityRefs)) {
 5391|      0|          if (! entity)
  ------------------
  |  Branch (5391:15): [True: 0, False: 0]
  ------------------
 5392|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5393|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5393:20): [True: 0, False: 0]
  ------------------
 5394|       |            /* It's hard to exhaustively search the code to be sure,
 5395|       |             * but there doesn't seem to be a way of executing the
 5396|       |             * following line.  There are two cases:
 5397|       |             *
 5398|       |             * If 'standalone' is false, the DTD must have no
 5399|       |             * parameter entities or we wouldn't have passed the outer
 5400|       |             * 'if' statement.  That means the only entity in the hash
 5401|       |             * table is the external subset name "#" which cannot be
 5402|       |             * given as a parameter entity name in XML syntax, so the
 5403|       |             * lookup must have returned NULL and we don't even reach
 5404|       |             * the test for an internal entity.
 5405|       |             *
 5406|       |             * If 'standalone' is true, it does not seem to be
 5407|       |             * possible to create entities taking this code path that
 5408|       |             * are not internal entities, so fail the test above.
 5409|       |             *
 5410|       |             * Because this analysis is very uncertain, the code is
 5411|       |             * being left in place and merely removed from the
 5412|       |             * coverage test statistics.
 5413|       |             */
 5414|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5415|      0|          }
 5416|      0|        } else if (! entity) {
  ------------------
  |  Branch (5416:20): [True: 0, False: 0]
  ------------------
 5417|      0|          dtd->keepProcessing = dtd->standalone;
 5418|       |          /* cannot report skipped entities in declarations */
 5419|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5419:15): [True: 0, False: 0]
  ------------------
 5420|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5420:18): [True: 0, False: 0]
  ------------------
 5421|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5422|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5423|      0|          }
 5424|      0|          break;
 5425|      0|        }
 5426|      0|        if (entity->open)
  ------------------
  |  Branch (5426:13): [True: 0, False: 0]
  ------------------
 5427|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5428|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5428:13): [True: 0, False: 0]
  ------------------
 5429|      0|          enum XML_Error result;
 5430|      0|          XML_Bool betweenDecl
 5431|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5431:18): [True: 0, False: 0]
  ------------------
 5432|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5433|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5433:15): [True: 0, False: 0]
  ------------------
 5434|      0|            return result;
 5435|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5436|      0|          break;
 5437|      0|        }
 5438|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5438:13): [True: 0, False: 0]
  ------------------
 5439|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5440|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5441|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5442|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5442:15): [True: 0, False: 0]
  ------------------
 5443|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5444|      0|                  entity->systemId, entity->publicId)) {
 5445|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5446|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5447|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5448|      0|          }
 5449|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5450|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5452|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5452:15): [True: 0, False: 0]
  ------------------
 5453|      0|            dtd->keepProcessing = dtd->standalone;
 5454|      0|            break;
 5455|      0|          }
 5456|      0|        } else {
 5457|      0|          dtd->keepProcessing = dtd->standalone;
 5458|      0|          break;
 5459|      0|        }
 5460|      0|      }
 5461|  4.56k|#endif /* XML_DTD */
 5462|  4.56k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 4.32k, False: 248]
  |  Branch (5462:32): [True: 0, False: 4.32k]
  ------------------
 5463|  4.56k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  4.56k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  6.63k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 6.63k, False: 5.52M]
  ------------------
 5470|  6.63k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 6.63k]
  ------------------
 5471|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5472|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5472:13): [True: 0, False: 0]
  ------------------
 5473|      0|          return XML_ERROR_NO_MEMORY;
 5474|      0|        dtd->scaffLevel = 0;
 5475|      0|        dtd->scaffCount = 0;
 5476|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5477|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5478|      0|      }
 5479|  6.63k|      break;
 5480|       |
 5481|  6.63k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 25, False: 5.53M]
  ------------------
 5482|    450|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 425, False: 5.53M]
  ------------------
 5483|    450|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 450]
  ------------------
 5484|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5484:13): [True: 0, False: 0]
  ------------------
 5485|      0|          XML_Content *content
 5486|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5487|      0|          if (! content)
  ------------------
  |  Branch (5487:15): [True: 0, False: 0]
  ------------------
 5488|      0|            return XML_ERROR_NO_MEMORY;
 5489|      0|          content->quant = XML_CQUANT_NONE;
 5490|      0|          content->name = NULL;
 5491|      0|          content->numchildren = 0;
 5492|      0|          content->children = NULL;
 5493|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5493:28): [True: 0, False: 0]
  ------------------
 5494|      0|                                                          : XML_CTYPE_EMPTY);
 5495|      0|          *eventEndPP = s;
 5496|      0|          parser->m_elementDeclHandler(
 5497|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5498|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5499|      0|        }
 5500|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5501|      0|      }
 5502|    450|      break;
 5503|       |
 5504|  2.60k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 2.60k, False: 5.53M]
  ------------------
 5505|  2.60k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 2.60k]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|  2.60k|      break;
 5512|       |
 5513|   247k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 247k, False: 5.28M]
  ------------------
 5514|   247k|      quant = XML_CQUANT_NONE;
 5515|   247k|      goto elementContent;
 5516|  1.18k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 1.18k, False: 5.53M]
  ------------------
 5517|  1.18k|      quant = XML_CQUANT_OPT;
 5518|  1.18k|      goto elementContent;
 5519|  2.03k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 2.03k, False: 5.53M]
  ------------------
 5520|  2.03k|      quant = XML_CQUANT_REP;
 5521|  2.03k|      goto elementContent;
 5522|  1.43k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 1.43k, False: 5.53M]
  ------------------
 5523|  1.43k|      quant = XML_CQUANT_PLUS;
 5524|   251k|    elementContent:
 5525|   251k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 251k]
  ------------------
 5526|      0|        ELEMENT_TYPE *el;
 5527|      0|        const XML_Char *name;
 5528|      0|        size_t nameLen;
 5529|      0|        const char *nxt
 5530|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5530:16): [True: 0, False: 0]
  ------------------
 5531|      0|        int myindex = nextScaffoldPart(parser);
 5532|      0|        if (myindex < 0)
  ------------------
  |  Branch (5532:13): [True: 0, False: 0]
  ------------------
 5533|      0|          return XML_ERROR_NO_MEMORY;
 5534|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5535|      0|        dtd->scaffold[myindex].quant = quant;
 5536|      0|        el = getElementType(parser, enc, s, nxt);
 5537|      0|        if (! el)
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return XML_ERROR_NO_MEMORY;
 5539|      0|        name = el->name;
 5540|      0|        dtd->scaffold[myindex].name = name;
 5541|      0|        nameLen = 0;
 5542|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5542:16): [True: 0, False: 0]
  ------------------
 5543|      0|          ;
 5544|       |
 5545|       |        /* Detect and prevent integer overflow */
 5546|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5546:13): [True: 0, False: 0]
  ------------------
 5547|      0|          return XML_ERROR_NO_MEMORY;
 5548|      0|        }
 5549|       |
 5550|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5551|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5551:13): [True: 0, False: 0]
  ------------------
 5552|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5553|      0|      }
 5554|   251k|      break;
 5555|       |
 5556|   251k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 246k, False: 5.29M]
  ------------------
 5557|   246k|      quant = XML_CQUANT_NONE;
 5558|   246k|      goto closeGroup;
 5559|  33.4k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 33.4k, False: 5.50M]
  ------------------
 5560|  33.4k|      quant = XML_CQUANT_OPT;
 5561|  33.4k|      goto closeGroup;
 5562|  45.5k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 45.5k, False: 5.49M]
  ------------------
 5563|  45.5k|      quant = XML_CQUANT_REP;
 5564|  45.5k|      goto closeGroup;
 5565|  81.4k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 81.4k, False: 5.45M]
  ------------------
 5566|  81.4k|      quant = XML_CQUANT_PLUS;
 5567|   406k|    closeGroup:
 5568|   406k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 406k]
  ------------------
 5569|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5569:13): [True: 0, False: 0]
  ------------------
 5570|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5571|      0|        dtd->scaffLevel--;
 5572|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5573|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5573:13): [True: 0, False: 0]
  ------------------
 5574|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5574:15): [True: 0, False: 0]
  ------------------
 5575|      0|            XML_Content *model = build_model(parser);
 5576|      0|            if (! model)
  ------------------
  |  Branch (5576:17): [True: 0, False: 0]
  ------------------
 5577|      0|              return XML_ERROR_NO_MEMORY;
 5578|      0|            *eventEndPP = s;
 5579|      0|            parser->m_elementDeclHandler(
 5580|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5581|      0|          }
 5582|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5583|      0|          dtd->contentStringLen = 0;
 5584|      0|        }
 5585|      0|      }
 5586|   406k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|   406k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 6.81k, False: 5.52M]
  ------------------
 5590|  6.81k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 6.81k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  6.81k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.81k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  6.81k|      break;
 5594|  1.25k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 1.25k, False: 5.53M]
  ------------------
 5595|  1.25k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 1.25k]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|  1.25k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.25k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|  1.25k|      break;
 5599|  19.4k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 19.4k, False: 5.51M]
  ------------------
 5600|  19.4k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 12.1k, False: 7.24k]
  ------------------
 5601|  7.24k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  7.24k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 7.24k, False: 12.1k]
  ------------------
 5602|  7.24k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.24k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|  7.24k|        break;
 5604|  19.4k|      }
 5605|  19.4k|      break;
 5606|  19.4k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 16.5k, False: 5.51M]
  ------------------
 5607|  16.5k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 16.5k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  16.5k|      break;
 5610|  66.4k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 66.4k, False: 5.46M]
  ------------------
 5611|  66.4k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 55.5k, False: 10.8k]
  |  Branch (5611:34): [True: 0, False: 55.5k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  66.4k|      break;
 5614|  7.95k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 7.95k, False: 5.52M]
  ------------------
 5615|  7.95k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 7.95k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  7.95k|      break;
 5618|   268k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 268k, False: 5.26M]
  ------------------
 5619|   268k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 265k, False: 3.72k]
  |  Branch (5619:34): [True: 0, False: 265k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|   268k|      break;
 5622|   140k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 140k, False: 5.39M]
  ------------------
 5623|   140k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 140k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|   140k|      break;
 5626|  5.53M|    } /* end of big switch */
 5627|       |
 5628|  5.52M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 5.50M, False: 15.3k]
  |  Branch (5628:26): [True: 0, False: 5.50M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  5.52M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 5.52M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 5.52M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  5.52M|    default:
  ------------------
  |  Branch (5637:5): [True: 5.52M, False: 0]
  ------------------
 5638|  5.52M|      s = next;
 5639|  5.52M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  5.52M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.52M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5640|  5.52M|    }
 5641|  5.52M|  }
 5642|       |  /* not reached */
 5643|  19.2k|}
xmlparse.c:accountingDiffTolerated:
 7737|   411M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|   411M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 410M, False: 736k]
  ------------------
 7742|  2.68k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.68k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.68k, False: 411M]
  ------------------
 7743|  5.15k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  5.15k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.46k, False: 411M]
  ------------------
 7744|  5.59k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.59k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 440, False: 411M]
  ------------------
 7745|   736k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   736k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 731k, False: 410M]
  ------------------
 7746|   736k|    return XML_TRUE;
  ------------------
  |  |   55|   736k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|   411M|  }
 7748|       |
 7749|   410M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 2.34M, False: 408M]
  ------------------
 7750|  2.34M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  2.34M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|   408M|  unsigned int levelsAwayFromRootParser;
 7753|   408M|  const XML_Parser rootParser
 7754|   408M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|   408M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|   408M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 8.11M, False: 400M]
  |  Branch (7758:44): [True: 8.11M, False: 0]
  ------------------
 7759|   408M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|   408M|  XmlBigCount *const additionTarget
 7762|   408M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 8.11M, False: 400M]
  ------------------
 7763|   408M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|   408M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 408M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|   408M|  *additionTarget += bytesMore;
 7769|       |
 7770|   408M|  const XmlBigCount countBytesOutput
 7771|   408M|      = rootParser->m_accounting.countBytesDirect
 7772|   408M|        + rootParser->m_accounting.countBytesIndirect;
 7773|   408M|  const float amplificationFactor
 7774|   408M|      = accountingGetCurrentAmplification(rootParser);
 7775|   408M|  const XML_Bool tolerated
 7776|   408M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 140M, False: 267M]
  ------------------
 7777|   408M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 267M, False: 52]
  ------------------
 7778|   267M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|   408M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 408M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|   408M|  return tolerated;
 7787|   408M|}
xmlparse.c:getRootParserOf:
 7852|   410M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|   410M|  XML_Parser rootParser = parser;
 7854|   410M|  unsigned int stepsTakenUpwards = 0;
 7855|   410M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 410M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|   410M|  assert(! rootParser->m_parentParser);
 7860|   410M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 408M, False: 1.38M]
  ------------------
 7861|   408M|    *outLevelDiff = stepsTakenUpwards;
 7862|   408M|  }
 7863|   410M|  return rootParser;
 7864|   410M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|   408M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|   408M|  const XmlBigCount countBytesOutput
 7662|   408M|      = rootParser->m_accounting.countBytesDirect
 7663|   408M|        + rootParser->m_accounting.countBytesIndirect;
 7664|   408M|  const float amplificationFactor
 7665|   408M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 408M, False: 0]
  ------------------
 7666|   408M|            ? (countBytesOutput
 7667|   408M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|   408M|            : 1.0f;
 7669|   408M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|   408M|}
xmlparse.c:accountingReportStats:
 7674|     52|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     52|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     52|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     52|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 52, False: 0]
  ------------------
 7679|     52|    return;
 7680|     52|  }
 7681|       |
 7682|      0|  const float amplificationFactor
 7683|      0|      = accountingGetCurrentAmplification(rootParser);
 7684|      0|  fprintf(stderr,
 7685|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7686|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7687|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7688|      0|          rootParser->m_accounting.countBytesIndirect,
 7689|      0|          (double)amplificationFactor, epilog);
 7690|      0|}
xmlparse.c:accountingOnAbort:
 7693|     52|accountingOnAbort(XML_Parser originParser) {
 7694|     52|  accountingReportStats(originParser, " ABORTING\n");
 7695|     52|}
xmlparse.c:processXmlDecl:
 4280|    297|               const char *next) {
 4281|    297|  const char *encodingName = NULL;
 4282|    297|  const XML_Char *storedEncName = NULL;
 4283|    297|  const ENCODING *newEncoding = NULL;
 4284|    297|  const char *version = NULL;
 4285|    297|  const char *versionend = NULL;
 4286|    297|  const XML_Char *storedversion = NULL;
 4287|    297|  int standalone = -1;
 4288|       |
 4289|    297|#ifdef XML_DTD
 4290|    297|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    297|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 297]
  ------------------
 4291|    297|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    297|#endif
 4296|       |
 4297|    297|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 230, False: 67]
  |  Branch (4297:10): [True: 0, False: 297]
  ------------------
 4298|    297|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    297|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    230|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 230]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    230|    else
 4303|    230|      return XML_ERROR_XML_DECL;
 4304|    230|  }
 4305|     67|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 67, False: 0]
  |  Branch (4305:32): [True: 25, False: 42]
  ------------------
 4306|     25|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     25|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     25|#ifdef XML_DTD
 4308|     25|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 25]
  ------------------
 4309|     25|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     25|#endif /* XML_DTD */
 4312|     25|  }
 4313|     67|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 67]
  ------------------
 4314|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4314:9): [True: 0, False: 0]
  ------------------
 4315|      0|      storedEncName = poolStoreString(
 4316|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4317|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4318|      0|      if (! storedEncName)
  ------------------
  |  Branch (4318:11): [True: 0, False: 0]
  ------------------
 4319|      0|        return XML_ERROR_NO_MEMORY;
 4320|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4321|      0|    }
 4322|      0|    if (version) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 0]
  ------------------
 4323|      0|      storedversion
 4324|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4325|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4326|      0|      if (! storedversion)
  ------------------
  |  Branch (4326:11): [True: 0, False: 0]
  ------------------
 4327|      0|        return XML_ERROR_NO_MEMORY;
 4328|      0|    }
 4329|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4330|      0|                             standalone);
 4331|     67|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 67]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     67|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 67]
  ------------------
 4334|      0|    if (newEncoding) {
  ------------------
  |  Branch (4334:9): [True: 0, False: 0]
  ------------------
 4335|       |      /* Check that the specified encoding does not conflict with what
 4336|       |       * the parser has already deduced.  Do we have the same number
 4337|       |       * of bytes in the smallest representation of a character?  If
 4338|       |       * this is UTF-16, is it the same endianness?
 4339|       |       */
 4340|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4340:11): [True: 0, False: 0]
  ------------------
 4341|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4341:15): [True: 0, False: 0]
  ------------------
 4342|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4342:18): [True: 0, False: 0]
  ------------------
 4343|      0|        parser->m_eventPtr = encodingName;
 4344|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4345|      0|      }
 4346|      0|      parser->m_encoding = newEncoding;
 4347|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4347:16): [True: 0, False: 0]
  ------------------
 4348|      0|      enum XML_Error result;
 4349|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4349:11): [True: 0, False: 0]
  ------------------
 4350|      0|        storedEncName = poolStoreString(
 4351|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4352|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4353|      0|        if (! storedEncName)
  ------------------
  |  Branch (4353:13): [True: 0, False: 0]
  ------------------
 4354|      0|          return XML_ERROR_NO_MEMORY;
 4355|      0|      }
 4356|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4357|      0|      poolClear(&parser->m_temp2Pool);
 4358|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4358:11): [True: 0, False: 0]
  ------------------
 4359|      0|        parser->m_eventPtr = encodingName;
 4360|      0|      return result;
 4361|      0|    }
 4362|      0|  }
 4363|       |
 4364|     67|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 67]
  |  Branch (4364:24): [True: 0, False: 67]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     67|  return XML_ERROR_NONE;
 4368|     67|}
xmlparse.c:poolStoreString:
 7284|   897k|                const char *end) {
 7285|   897k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 897k]
  ------------------
 7286|      0|    return NULL;
 7287|   897k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 353, False: 897k]
  |  Branch (7287:33): [True: 0, False: 353]
  ------------------
 7288|      0|    return NULL;
 7289|   897k|  *(pool->ptr)++ = 0;
 7290|   897k|  return pool->start;
 7291|   897k|}
xmlparse.c:lookup:
 7043|  3.40M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  3.40M|  size_t i;
 7045|  3.40M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 44.0k, False: 3.36M]
  ------------------
 7046|  44.0k|    size_t tsize;
 7047|  44.0k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 27.2k, False: 16.7k]
  ------------------
 7048|  27.2k|      return NULL;
 7049|  16.7k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  16.7k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  16.7k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  16.7k|#define INIT_POWER 6
  ------------------
 7052|  16.7k|    tsize = table->size * sizeof(NAMED *);
 7053|  16.7k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  16.7k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 16.7k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  16.7k|    memset(table->v, 0, tsize);
 7059|  16.7k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  3.36M|  } else {
 7061|  3.36M|    unsigned long h = hash(parser, name);
 7062|  3.36M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  3.36M|    unsigned char step = 0;
 7064|  3.36M|    i = h & mask;
 7065|  3.92M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 3.82M, False: 92.2k]
  ------------------
 7066|  3.82M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 3.26M, False: 559k]
  ------------------
 7067|  3.26M|        return table->v[i];
 7068|   559k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 530k, False: 29.1k]
  ------------------
 7069|   530k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|   530k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|   530k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|   559k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 15.8k, False: 543k]
  ------------------
 7071|   559k|    }
 7072|  92.2k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 70.9k, False: 21.2k]
  ------------------
 7073|  70.9k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  21.2k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 276, False: 21.0k]
  ------------------
 7077|    276|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    276|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 276]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    276|      size_t newSize = (size_t)1 << newPower;
 7085|    276|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    276|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 276]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    276|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    276|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    276|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 276]
  ------------------
 7095|      0|        return NULL;
 7096|    276|      memset(newV, 0, tsize);
 7097|  35.4k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 35.2k, False: 276]
  ------------------
 7098|  35.2k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 17.6k, False: 17.6k]
  ------------------
 7099|  17.6k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  17.6k|          size_t j = newHash & newMask;
 7101|  17.6k|          step = 0;
 7102|  20.5k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.95k, False: 17.6k]
  ------------------
 7103|  2.95k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 2.36k, False: 593]
  ------------------
 7104|  2.36k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  2.36k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  2.36k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.95k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 382, False: 2.57k]
  ------------------
 7106|  2.95k|          }
 7107|  17.6k|          newV[j] = table->v[i];
 7108|  17.6k|        }
 7109|    276|      table->mem->free_fcn(table->v);
 7110|    276|      table->v = newV;
 7111|    276|      table->power = newPower;
 7112|    276|      table->size = newSize;
 7113|    276|      i = h & newMask;
 7114|    276|      step = 0;
 7115|    434|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 158, False: 276]
  ------------------
 7116|    158|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 93, False: 65]
  ------------------
 7117|     93|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     93|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     93|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    158|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 22, False: 136]
  ------------------
 7119|    158|      }
 7120|    276|    }
 7121|  21.2k|  }
 7122|  38.0k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  38.0k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 38.0k]
  ------------------
 7124|      0|    return NULL;
 7125|  38.0k|  memset(table->v[i], 0, createSize);
 7126|  38.0k|  table->v[i]->name = name;
 7127|  38.0k|  (table->used)++;
 7128|  38.0k|  return table->v[i];
 7129|  38.0k|}
xmlparse.c:hash:
 7032|  3.39M|hash(XML_Parser parser, KEY s) {
 7033|  3.39M|  struct siphash state;
 7034|  3.39M|  struct sipkey key;
 7035|  3.39M|  (void)sip24_valid;
 7036|  3.39M|  copy_salt_to_sipkey(parser, &key);
 7037|  3.39M|  sip24_init(&state, &key);
 7038|  3.39M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  3.39M|  return (unsigned long)sip24_final(&state);
 7040|  3.39M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  3.39M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  3.39M|  key->k[0] = 0;
 7028|  3.39M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  3.39M|}
xmlparse.c:get_hash_secret_salt:
  947|  3.39M|get_hash_secret_salt(XML_Parser parser) {
  948|  3.39M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 3.39M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  3.39M|  return parser->m_hash_secret_salt;
  951|  3.39M|}
xmlparse.c:keylen:
 7018|  3.39M|keylen(KEY s) {
 7019|  3.39M|  size_t len = 0;
 7020|  13.5M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 10.1M, False: 3.39M]
  ------------------
 7021|  10.1M|    ;
 7022|  3.39M|  return len;
 7023|  3.39M|}
xmlparse.c:keyeq:
 7010|  3.82M|keyeq(KEY s1, KEY s2) {
 7011|  10.3M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 9.81M, False: 559k]
  ------------------
 7012|  9.81M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 3.26M, False: 6.54M]
  ------------------
 7013|  3.26M|      return XML_TRUE;
  ------------------
  |  |   55|  3.26M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|   559k|  return XML_FALSE;
  ------------------
  |  |   56|   559k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  3.82M|}
xmlparse.c:normalizePublicId:
 6695|    742|normalizePublicId(XML_Char *publicId) {
 6696|    742|  XML_Char *p = publicId;
 6697|    742|  XML_Char *s;
 6698|  18.9k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 18.1k, False: 742]
  ------------------
 6699|  18.1k|    switch (*s) {
 6700|    694|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 694, False: 17.4k]
  ------------------
 6701|  1.67k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 985, False: 17.1k]
  ------------------
 6702|  2.54k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 862, False: 17.3k]
  ------------------
 6703|  2.54k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 1.40k, False: 1.13k]
  |  Branch (6703:28): [True: 478, False: 929]
  ------------------
 6704|    478|        *p++ = 0x20;
 6705|  2.54k|      break;
 6706|  15.6k|    default:
  ------------------
  |  Branch (6706:5): [True: 15.6k, False: 2.54k]
  ------------------
 6707|  15.6k|      *p++ = *s;
 6708|  18.1k|    }
 6709|  18.1k|  }
 6710|    742|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 537, False: 205]
  |  Branch (6710:24): [True: 39, False: 498]
  ------------------
 6711|     39|    --p;
 6712|    742|  *p = XML_T('\0');
  ------------------
  |  |  191|    742|#  define XML_T(x) x
  ------------------
 6713|    742|}
xmlparse.c:contentProcessor:
 2622|  11.1k|                 const char **endPtr) {
 2623|  11.1k|  enum XML_Error result = doContent(
 2624|  11.1k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  11.1k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  11.1k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 6.79k, False: 4.38k]
  ------------------
 2627|  6.79k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 6.79k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  6.79k|  }
 2630|  11.1k|  return result;
 2631|  11.1k|}
xmlparse.c:doContent:
 2752|   296k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|   296k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|   296k|  const char **eventPP;
 2757|   296k|  const char **eventEndPP;
 2758|   296k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 11.1k, False: 285k]
  ------------------
 2759|  11.1k|    eventPP = &parser->m_eventPtr;
 2760|  11.1k|    eventEndPP = &parser->m_eventEndPtr;
 2761|   285k|  } else {
 2762|   285k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|   285k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|   285k|  }
 2765|   296k|  *eventPP = s;
 2766|       |
 2767|   197M|  for (;;) {
 2768|   197M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|   197M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|   197M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   197M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|   197M|#ifdef XML_DTD
 2771|   197M|    const char *accountAfter
 2772|   197M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|   197M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|   197M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 549, False: 197M]
  |  Branch (2772:46): [True: 57, False: 197M]
  ------------------
 2773|   197M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 88, False: 518]
  ------------------
 2774|   197M|              : next;
 2775|   197M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 26, False: 197M]
  ------------------
 2776|   197M|                                  account)) {
 2777|     26|      accountingOnAbort(parser);
 2778|     26|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|     26|    }
 2780|   197M|#endif
 2781|   197M|    *eventEndPP = next;
 2782|   197M|    switch (tok) {
 2783|     57|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     57|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 57, False: 197M]
  ------------------
 2784|     57|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 57, False: 0]
  ------------------
 2785|     57|        *nextPtr = s;
 2786|     57|        return XML_ERROR_NONE;
 2787|     57|      }
 2788|      0|      *eventEndPP = end;
 2789|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2789:11): [True: 0, False: 0]
  ------------------
 2790|      0|        XML_Char c = 0xA;
 2791|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2792|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2792:18): [True: 0, False: 0]
  ------------------
 2793|      0|        reportDefault(parser, enc, s, end);
 2794|       |      /* We are at the end of the final buffer, should we check for
 2795|       |         XML_SUSPENDED, XML_FINISHED?
 2796|       |      */
 2797|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2797:11): [True: 0, False: 0]
  ------------------
 2798|      0|        return XML_ERROR_NO_ELEMENTS;
 2799|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2799:11): [True: 0, False: 0]
  ------------------
 2800|      0|        return XML_ERROR_ASYNC_ENTITY;
 2801|      0|      *nextPtr = end;
 2802|      0|      return XML_ERROR_NONE;
 2803|   288k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   288k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 288k, False: 197M]
  ------------------
 2804|   288k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 3.52k, False: 284k]
  ------------------
 2805|  3.52k|        *nextPtr = s;
 2806|  3.52k|        return XML_ERROR_NONE;
 2807|  3.52k|      }
 2808|   284k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 284k, False: 0]
  ------------------
 2809|   284k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 56, False: 284k]
  ------------------
 2810|     56|          return XML_ERROR_ASYNC_ENTITY;
 2811|   284k|        *nextPtr = s;
 2812|   284k|        return XML_ERROR_NONE;
 2813|   284k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.46k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.46k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.46k, False: 197M]
  ------------------
 2816|  2.46k|      *eventPP = next;
 2817|  2.46k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.31k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.31k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.31k, False: 197M]
  ------------------
 2819|  2.31k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 2.21k, False: 97]
  ------------------
 2820|  2.21k|        *nextPtr = s;
 2821|  2.21k|        return XML_ERROR_NONE;
 2822|  2.21k|      }
 2823|     97|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    310|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    310|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 310, False: 197M]
  ------------------
 2825|    310|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 310, False: 0]
  ------------------
 2826|    310|        *nextPtr = s;
 2827|    310|        return XML_ERROR_NONE;
 2828|    310|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   360k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   360k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 360k, False: 197M]
  ------------------
 2831|   360k|      const XML_Char *name;
 2832|   360k|      ENTITY *entity;
 2833|   360k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   360k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   360k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   360k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 2.56k, False: 357k]
  ------------------
 2836|  2.56k|#ifdef XML_DTD
 2837|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2838|       |         *       so there is no amplification and hence recording without
 2839|       |         *       protection. */
 2840|  2.56k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  2.56k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  2.56k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  2.56k|#endif /* XML_DTD */
 2844|  2.56k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 2.56k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  2.56k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 2.56k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  2.56k|        break;
 2849|  2.56k|      }
 2850|   357k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   357k|                             next - enc->minBytesPerChar);
 2852|   357k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 357k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   357k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   357k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   357k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2856|       |      /* First, determine if a check for an existing declaration is needed;
 2857|       |         if yes, check that the entity exists, and that it is internal,
 2858|       |         otherwise call the skipped entity or default handler.
 2859|       |      */
 2860|   357k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 13.0k, False: 344k]
  |  Branch (2860:40): [True: 66, False: 344k]
  ------------------
 2861|  13.0k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 335, False: 12.7k]
  ------------------
 2862|    335|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|  12.7k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 12.7k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|   344k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 71.7k, False: 273k]
  ------------------
 2866|  71.7k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 71.7k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  71.7k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 71.7k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  71.7k|        break;
 2871|  71.7k|      }
 2872|   285k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 7, False: 285k]
  ------------------
 2873|      7|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|   285k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 1, False: 285k]
  ------------------
 2875|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|   285k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 285k, False: 66]
  ------------------
 2877|   285k|        enum XML_Error result;
 2878|   285k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 285k]
  ------------------
 2879|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2881|      0|                                           0);
 2882|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2882:20): [True: 0, False: 0]
  ------------------
 2883|      0|            reportDefault(parser, enc, s, next);
 2884|      0|          break;
 2885|      0|        }
 2886|   285k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   285k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|   285k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 740, False: 284k]
  ------------------
 2888|    740|          return result;
 2889|   285k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 66]
  ------------------
 2890|      0|        const XML_Char *context;
 2891|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2892|      0|        context = getContext(parser);
 2893|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2894|      0|        if (! context)
  ------------------
  |  Branch (2894:13): [True: 0, False: 0]
  ------------------
 2895|      0|          return XML_ERROR_NO_MEMORY;
 2896|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2896:13): [True: 0, False: 0]
  ------------------
 2897|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2898|      0|                entity->systemId, entity->publicId))
 2899|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2900|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2901|     66|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 66]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|   285k|      break;
 2904|   285k|    }
 2905|  2.48M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.48M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 2.48M, False: 195M]
  ------------------
 2906|       |      /* fall through */
 2907|  2.49M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.49M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 8.20k, False: 197M]
  ------------------
 2908|  2.49M|      TAG *tag;
 2909|  2.49M|      enum XML_Error result;
 2910|  2.49M|      XML_Char *toPtr;
 2911|  2.49M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 9.54k, False: 2.48M]
  ------------------
 2912|  9.54k|        tag = parser->m_freeTagList;
 2913|  9.54k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  2.48M|      } else {
 2915|  2.48M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  2.48M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  2.48M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 2.48M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  2.48M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  2.48M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  2.48M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 2.48M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  2.48M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  2.48M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  2.48M|      }
 2925|  2.49M|      tag->bindings = NULL;
 2926|  2.49M|      tag->parent = parser->m_tagStack;
 2927|  2.49M|      parser->m_tagStack = tag;
 2928|  2.49M|      tag->name.localPart = NULL;
 2929|  2.49M|      tag->name.prefix = NULL;
 2930|  2.49M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  2.49M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.49M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  2.49M|      ++parser->m_tagLevel;
 2933|  2.49M|      {
 2934|  2.49M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  2.49M|        const char *fromPtr = tag->rawName;
 2936|  2.49M|        toPtr = (XML_Char *)tag->buf;
 2937|  2.49M|        for (;;) {
 2938|  2.49M|          int bufSize;
 2939|  2.49M|          int convLen;
 2940|  2.49M|          const enum XML_Convert_Result convert_res
 2941|  2.49M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  2.49M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.49M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  2.49M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  2.49M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  2.49M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 2.49M, False: 1.78k]
  ------------------
 2945|  2.49M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 1.78k]
  ------------------
 2946|  2.49M|            tag->name.strLen = convLen;
 2947|  2.49M|            break;
 2948|  2.49M|          }
 2949|  1.78k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  1.78k|          {
 2951|  1.78k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  1.78k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  1.78k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 1.78k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  1.78k|            tag->buf = temp;
 2955|  1.78k|            tag->bufEnd = temp + bufSize;
 2956|  1.78k|            toPtr = (XML_Char *)temp + convLen;
 2957|  1.78k|          }
 2958|  1.78k|        }
 2959|  2.49M|      }
 2960|  2.49M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  2.49M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  2.49M|#  define XML_T(x) x
  ------------------
 2962|  2.49M|      result
 2963|  2.49M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  2.49M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 587, False: 2.49M]
  ------------------
 2965|    587|        return result;
 2966|  2.49M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 2.49M, False: 0]
  ------------------
 2967|  2.49M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  2.49M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  2.49M|      poolClear(&parser->m_tempPool);
 2972|  2.49M|      break;
 2973|  2.49M|    }
 2974|  8.52k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  8.52k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 8.52k, False: 197M]
  ------------------
 2975|       |      /* fall through */
 2976|  16.5k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  16.5k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 8.06k, False: 197M]
  ------------------
 2977|  16.5k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  16.5k|      enum XML_Error result;
 2979|  16.5k|      BINDING *bindings = NULL;
 2980|  16.5k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  16.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  16.5k|      TAG_NAME name;
 2982|  16.5k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  16.5k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  16.5k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  16.5k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 16.5k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  16.5k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  16.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  16.5k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  16.5k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  16.5k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 58, False: 16.5k]
  ------------------
 2990|     58|        freeBindings(parser, bindings);
 2991|     58|        return result;
 2992|     58|      }
 2993|  16.5k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  16.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  16.5k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 16.5k, False: 0]
  ------------------
 2995|  16.5k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  16.5k|                                      (const XML_Char **)parser->m_atts);
 2997|  16.5k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  16.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  16.5k|      }
 2999|  16.5k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 16.5k, False: 0]
  ------------------
 3000|  16.5k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 16.5k, False: 0]
  ------------------
 3001|  16.5k|          *eventPP = *eventEndPP;
 3002|  16.5k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  16.5k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  16.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  16.5k|      }
 3005|  16.5k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 16.5k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  16.5k|      poolClear(&parser->m_tempPool);
 3008|  16.5k|      freeBindings(parser, bindings);
 3009|  16.5k|    }
 3010|  16.5k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 106, False: 16.4k]
  ------------------
 3011|  16.5k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 106, False: 0]
  ------------------
 3012|    106|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 106]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|    106|        else
 3015|    106|          return epilogProcessor(parser, next, end, nextPtr);
 3016|    106|      }
 3017|  16.4k|      break;
 3018|  16.4k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  10.1k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 10.1k, False: 197M]
  ------------------
 3019|  10.1k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 9, False: 10.1k]
  ------------------
 3020|      9|        return XML_ERROR_ASYNC_ENTITY;
 3021|  10.1k|      else {
 3022|  10.1k|        int len;
 3023|  10.1k|        const char *rawName;
 3024|  10.1k|        TAG *tag = parser->m_tagStack;
 3025|  10.1k|        rawName = s + enc->minBytesPerChar * 2;
 3026|  10.1k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  10.1k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|  10.1k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 35, False: 10.0k]
  ------------------
 3028|  10.1k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 186, False: 9.89k]
  ------------------
 3029|    221|          *eventPP = rawName;
 3030|    221|          return XML_ERROR_TAG_MISMATCH;
 3031|    221|        }
 3032|  9.89k|        parser->m_tagStack = tag->parent;
 3033|  9.89k|        tag->parent = parser->m_freeTagList;
 3034|  9.89k|        parser->m_freeTagList = tag;
 3035|  9.89k|        --parser->m_tagLevel;
 3036|  9.89k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 9.89k, False: 0]
  ------------------
 3037|  9.89k|          const XML_Char *localPart;
 3038|  9.89k|          const XML_Char *prefix;
 3039|  9.89k|          XML_Char *uri;
 3040|  9.89k|          localPart = tag->name.localPart;
 3041|  9.89k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 9.89k]
  |  Branch (3041:31): [True: 0, False: 0]
  ------------------
 3042|       |            /* localPart and prefix may have been overwritten in
 3043|       |               tag->name.str, since this points to the binding->uri
 3044|       |               buffer which gets re-used; so we have to add them again
 3045|       |            */
 3046|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3047|       |            /* don't need to check for space - already done in storeAtts() */
 3048|      0|            while (*localPart)
  ------------------
  |  Branch (3048:20): [True: 0, False: 0]
  ------------------
 3049|      0|              *uri++ = *localPart++;
 3050|      0|            prefix = tag->name.prefix;
 3051|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3051:17): [True: 0, False: 0]
  |  Branch (3051:42): [True: 0, False: 0]
  ------------------
 3052|      0|              *uri++ = parser->m_namespaceSeparator;
 3053|      0|              while (*prefix)
  ------------------
  |  Branch (3053:22): [True: 0, False: 0]
  ------------------
 3054|      0|                *uri++ = *prefix++;
 3055|      0|            }
 3056|      0|            *uri = XML_T('\0');
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
 3057|      0|          }
 3058|  9.89k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|  9.89k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|  9.89k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 9.89k]
  ------------------
 3062|      0|          BINDING *b = tag->bindings;
 3063|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3063:15): [True: 0, False: 0]
  ------------------
 3064|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3065|      0|                                              b->prefix->name);
 3066|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3067|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3068|      0|          parser->m_freeBindingList = b;
 3069|      0|          b->prefix->binding = b->prevPrefixBinding;
 3070|      0|        }
 3071|  9.89k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 28, False: 9.86k]
  ------------------
 3072|  9.89k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 28, False: 0]
  ------------------
 3073|     28|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 28]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     28|          else
 3076|     28|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     28|        }
 3078|  9.89k|      }
 3079|  9.86k|      break;
 3080|  9.86k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.58k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 8.58k, False: 197M]
  ------------------
 3081|  8.58k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.58k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  8.58k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 199, False: 8.38k]
  ------------------
 3083|    199|        return XML_ERROR_BAD_CHAR_REF;
 3084|  8.38k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 8.38k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  8.38k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 8.38k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  8.38k|    } break;
 3091|     10|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|     10|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 10, False: 197M]
  ------------------
 3092|     10|      return XML_ERROR_MISPLACED_XML_PI;
 3093|   177M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   177M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 177M, False: 19.7M]
  ------------------
 3094|   177M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 177M]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|   177M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 177M]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|   177M|      break;
 3100|  2.48k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.48k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 2.48k, False: 197M]
  ------------------
 3101|  2.48k|      enum XML_Error result;
 3102|  2.48k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 2.48k]
  ------------------
 3103|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3104|       |      /* BEGIN disabled code */
 3105|       |      /* Suppose you doing a transformation on a document that involves
 3106|       |         changing only the character data.  You set up a defaultHandler
 3107|       |         and a characterDataHandler.  The defaultHandler simply copies
 3108|       |         characters through.  The characterDataHandler does the
 3109|       |         transformation and writes the characters out escaping them as
 3110|       |         necessary.  This case will fail to work if we leave out the
 3111|       |         following two lines (because & and < inside CDATA sections will
 3112|       |         be incorrectly escaped).
 3113|       |
 3114|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3115|       |         easier to let the user deal with this.
 3116|       |      */
 3117|  2.48k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3117:16): [Folded - Ignored]
  |  Branch (3117:23): [True: 0, False: 0]
  ------------------
 3118|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3119|      0|                                       0);
 3120|       |      /* END disabled code */
 3121|  2.48k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 2.48k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  2.48k|      result
 3124|  2.48k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  2.48k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 225, False: 2.25k]
  ------------------
 3126|    225|        return result;
 3127|  2.25k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 600, False: 1.65k]
  ------------------
 3128|    600|        parser->m_processor = cdataSectionProcessor;
 3129|    600|        return result;
 3130|    600|      }
 3131|  2.48k|    } break;
 3132|  1.65k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    549|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 549, False: 197M]
  ------------------
 3133|    549|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 31, False: 518]
  ------------------
 3134|     31|        *nextPtr = s;
 3135|     31|        return XML_ERROR_NONE;
 3136|     31|      }
 3137|    518|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 518]
  ------------------
 3138|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3139|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3140|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3141|      0|          parser->m_characterDataHandler(
 3142|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3143|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3144|      0|        } else
 3145|      0|          parser->m_characterDataHandler(
 3146|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3147|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3148|    518|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 518]
  ------------------
 3149|      0|        reportDefault(parser, enc, s, end);
 3150|       |      /* We are at the end of the final buffer, should we check for
 3151|       |         XML_SUSPENDED, XML_FINISHED?
 3152|       |      */
 3153|    518|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 518]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|    518|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 17, False: 501]
  ------------------
 3158|     17|        *eventPP = end;
 3159|     17|        return XML_ERROR_ASYNC_ENTITY;
 3160|     17|      }
 3161|    501|      *nextPtr = end;
 3162|    501|      return XML_ERROR_NONE;
 3163|  16.5M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  16.5M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 16.5M, False: 181M]
  ------------------
 3164|  16.5M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|  16.5M|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 16.5M]
  ------------------
 3166|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3167|      0|          for (;;) {
 3168|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3169|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3170|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3171|      0|            *eventEndPP = s;
 3172|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3173|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3174|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3174:17): [True: 0, False: 0]
  ------------------
 3175|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3175:20): [True: 0, False: 0]
  ------------------
 3176|      0|              break;
 3177|      0|            *eventPP = s;
 3178|      0|          }
 3179|      0|        } else
 3180|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3181|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3182|  16.5M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 16.5M]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|  16.5M|    } break;
 3185|  9.55k|    case XML_TOK_PI:
  ------------------
  |  |   76|  9.55k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 9.55k, False: 197M]
  ------------------
 3186|  9.55k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 9.55k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  9.55k|      break;
 3189|  9.55k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    978|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 978, False: 197M]
  ------------------
 3190|    978|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 978]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|    978|      break;
 3193|    978|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 197M]
  ------------------
 3194|       |      /* All of the tokens produced by XmlContentTok() have their own
 3195|       |       * explicit cases, so this default is not strictly necessary.
 3196|       |       * However it is a useful safety net, so we retain the code and
 3197|       |       * simply exclude it from the coverage tests.
 3198|       |       *
 3199|       |       * LCOV_EXCL_START
 3200|       |       */
 3201|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3201:11): [True: 0, False: 0]
  ------------------
 3202|      0|        reportDefault(parser, enc, s, next);
 3203|      0|      break;
 3204|       |      /* LCOV_EXCL_STOP */
 3205|   197M|    }
 3206|   197M|    *eventPP = s = next;
 3207|   197M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 197M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 197M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|   197M|    default:;
  ------------------
  |  Branch (3213:5): [True: 197M, False: 0]
  ------------------
 3214|   197M|    }
 3215|   197M|  }
 3216|       |  /* not reached */
 3217|   296k|}
xmlparse.c:hashTableIterInit:
 7159|  19.2k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  19.2k|  iter->p = table->v;
 7161|  19.2k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 10.1k, False: 9.10k]
  ------------------
 7162|  19.2k|}
xmlparse.c:hashTableIterNext:
 7165|  42.2k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   694k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 675k, False: 19.2k]
  ------------------
 7167|   675k|    NAMED *tem = *(iter->p)++;
 7168|   675k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 22.9k, False: 652k]
  ------------------
 7169|  22.9k|      return tem;
 7170|   675k|  }
 7171|  19.2k|  return NULL;
 7172|  42.2k|}
xmlparse.c:storeAtts:
 3254|  2.51M|          enum XML_Account account) {
 3255|  2.51M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  2.51M|  ELEMENT_TYPE *elementType;
 3257|  2.51M|  int nDefaultAtts;
 3258|  2.51M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  2.51M|  int attIndex = 0;
 3260|  2.51M|  int prefixLen;
 3261|  2.51M|  int i;
 3262|  2.51M|  int n;
 3263|  2.51M|  XML_Char *uri;
 3264|  2.51M|  int nPrefixes = 0;
 3265|  2.51M|  BINDING *binding;
 3266|  2.51M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  2.51M|  elementType
 3270|  2.51M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  2.51M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 15.7k, False: 2.49M]
  ------------------
 3272|  15.7k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  15.7k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 15.7k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  15.7k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  15.7k|                                         sizeof(ELEMENT_TYPE));
 3277|  15.7k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 15.7k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  15.7k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 15.7k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  15.7k|  }
 3282|  2.51M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  2.51M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.51M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  2.51M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 2.51M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  2.51M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 401, False: 2.51M]
  ------------------
 3293|    401|    int oldAttsSize = parser->m_attsSize;
 3294|    401|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    401|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    401|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 401]
  ------------------
 3301|    401|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    401|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 401]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    401|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    401|#define INIT_ATTS_SIZE 16
  ------------------
 3306|       |
 3307|       |    /* Detect and prevent integer overflow.
 3308|       |     * The preprocessor guard addresses the "always false" warning
 3309|       |     * from -Wtype-limits on platforms where
 3310|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3311|       |#if UINT_MAX >= SIZE_MAX
 3312|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3313|       |      parser->m_attsSize = oldAttsSize;
 3314|       |      return XML_ERROR_NO_MEMORY;
 3315|       |    }
 3316|       |#endif
 3317|       |
 3318|    401|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    401|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    401|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    401|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 401]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    401|    parser->m_atts = temp;
 3325|       |#ifdef XML_ATTR_INFO
 3326|       |    /* Detect and prevent integer overflow.
 3327|       |     * The preprocessor guard addresses the "always false" warning
 3328|       |     * from -Wtype-limits on platforms where
 3329|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3330|       |#  if UINT_MAX >= SIZE_MAX
 3331|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3332|       |      parser->m_attsSize = oldAttsSize;
 3333|       |      return XML_ERROR_NO_MEMORY;
 3334|       |    }
 3335|       |#  endif
 3336|       |
 3337|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3338|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3339|       |    if (temp2 == NULL) {
 3340|       |      parser->m_attsSize = oldAttsSize;
 3341|       |      return XML_ERROR_NO_MEMORY;
 3342|       |    }
 3343|       |    parser->m_attInfo = temp2;
 3344|       |#endif
 3345|    401|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 383, False: 18]
  ------------------
 3346|    383|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    383|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    401|  }
 3348|       |
 3349|  2.51M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  2.53M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 22.9k, False: 2.51M]
  ------------------
 3351|  22.9k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3352|       |#ifdef XML_ATTR_INFO
 3353|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3354|       |#endif
 3355|       |    /* add the name and value to the attribute list */
 3356|  22.9k|    ATTRIBUTE_ID *attId
 3357|  22.9k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  22.9k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  22.9k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  22.9k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 22.9k]
  ------------------
 3360|      0|      return XML_ERROR_NO_MEMORY;
 3361|       |#ifdef XML_ATTR_INFO
 3362|       |    currAttInfo->nameStart
 3363|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3364|       |    currAttInfo->nameEnd
 3365|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3366|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3367|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3368|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3369|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3370|       |#endif
 3371|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3372|       |       namespace processing is turned on and different prefixes for the same
 3373|       |       namespace are used. For this case we have a check further down.
 3374|       |    */
 3375|  22.9k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 465, False: 22.4k]
  ------------------
 3376|    465|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 464, False: 1]
  ------------------
 3377|    464|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    465|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    465|    }
 3380|  22.4k|    (attId->name)[-1] = 1;
 3381|  22.4k|    appAtts[attIndex++] = attId->name;
 3382|  22.4k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 14.4k, False: 8.05k]
  ------------------
 3383|  14.4k|      enum XML_Error result;
 3384|  14.4k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  14.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  14.4k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 1.68k, False: 12.7k]
  ------------------
 3388|  1.68k|        int j;
 3389|  43.7k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 43.0k, False: 774]
  ------------------
 3390|  43.0k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 912, False: 42.0k]
  ------------------
 3391|    912|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|    912|            break;
 3393|    912|          }
 3394|  43.0k|        }
 3395|  1.68k|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  14.4k|      result = storeAttributeValue(
 3399|  14.4k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  14.4k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  14.4k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 180, False: 14.2k]
  ------------------
 3402|    180|        return result;
 3403|  14.2k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  14.2k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  14.2k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  14.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  14.2k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  8.05k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  8.05k|                                          parser->m_atts[i].valuePtr,
 3409|  8.05k|                                          parser->m_atts[i].valueEnd);
 3410|  8.05k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 8.05k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  8.05k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  8.05k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  8.05k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  22.3k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 22.3k]
  ------------------
 3416|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3416:11): [True: 0, False: 0]
  ------------------
 3417|       |        /* deal with namespace declarations here */
 3418|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3419|      0|                                           appAtts[attIndex], bindingsPtr);
 3420|      0|        if (result)
  ------------------
  |  Branch (3420:13): [True: 0, False: 0]
  ------------------
 3421|      0|          return result;
 3422|      0|        --attIndex;
 3423|      0|      } else {
 3424|       |        /* deal with other prefixed names later */
 3425|      0|        attIndex++;
 3426|      0|        nPrefixes++;
 3427|      0|        (attId->name)[-1] = 2;
 3428|      0|      }
 3429|      0|    } else
 3430|  22.3k|      attIndex++;
 3431|  22.3k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  2.51M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  2.51M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 1.33k, False: 2.51M]
  |  Branch (3435:29): [True: 498, False: 832]
  ------------------
 3436|    816|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 816, False: 0]
  ------------------
 3437|    816|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 498, False: 318]
  ------------------
 3438|    498|        parser->m_idAttIndex = i;
 3439|    498|        break;
 3440|    498|      }
 3441|    498|  } else
 3442|  2.51M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  2.72M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 214k, False: 2.51M]
  ------------------
 3446|   214k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|   214k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 213k, False: 1.05k]
  |  Branch (3447:33): [True: 442, False: 212k]
  ------------------
 3448|    442|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 442]
  ------------------
 3449|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3449:13): [True: 0, False: 0]
  ------------------
 3450|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3451|      0|                                             da->value, bindingsPtr);
 3452|      0|          if (result)
  ------------------
  |  Branch (3452:15): [True: 0, False: 0]
  ------------------
 3453|      0|            return result;
 3454|      0|        } else {
 3455|      0|          (da->id->name)[-1] = 2;
 3456|      0|          nPrefixes++;
 3457|      0|          appAtts[attIndex++] = da->id->name;
 3458|      0|          appAtts[attIndex++] = da->value;
 3459|      0|        }
 3460|    442|      } else {
 3461|    442|        (da->id->name)[-1] = 1;
 3462|    442|        appAtts[attIndex++] = da->id->name;
 3463|    442|        appAtts[attIndex++] = da->value;
 3464|    442|      }
 3465|    442|    }
 3466|   214k|  }
 3467|  2.51M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  2.51M|  i = 0;
 3472|  2.51M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 2.51M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  2.53M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 21.7k, False: 2.51M]
  ------------------
 3640|  21.7k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  2.51M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 2.51M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  2.51M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 2.51M, False: 0]
  ------------------
 3645|  2.51M|    return XML_ERROR_NONE;
 3646|       |
 3647|       |  /* expand the element type name */
 3648|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3648:7): [True: 0, False: 0]
  ------------------
 3649|      0|    binding = elementType->prefix->binding;
 3650|      0|    if (! binding)
  ------------------
  |  Branch (3650:9): [True: 0, False: 0]
  ------------------
 3651|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3652|      0|    localPart = tagNamePtr->str;
 3653|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3653:12): [True: 0, False: 0]
  ------------------
 3654|      0|      ;
 3655|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3655:14): [True: 0, False: 0]
  ------------------
 3656|      0|    binding = dtd->defaultPrefix.binding;
 3657|      0|    localPart = tagNamePtr->str;
 3658|      0|  } else
 3659|      0|    return XML_ERROR_NONE;
 3660|      0|  prefixLen = 0;
 3661|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 0]
  |  Branch (3661:32): [True: 0, False: 0]
  ------------------
 3662|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3662:12): [True: 0, False: 0]
  ------------------
 3663|      0|      ; /* prefixLen includes null terminator */
 3664|      0|  }
 3665|      0|  tagNamePtr->localPart = localPart;
 3666|      0|  tagNamePtr->uriLen = binding->uriLen;
 3667|      0|  tagNamePtr->prefix = binding->prefix->name;
 3668|      0|  tagNamePtr->prefixLen = prefixLen;
 3669|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3669:15): [True: 0, False: 0]
  ------------------
 3670|      0|    ; /* i includes null terminator */
 3671|       |
 3672|       |  /* Detect and prevent integer overflow */
 3673|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3673:7): [True: 0, False: 0]
  ------------------
 3674|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3674:10): [True: 0, False: 0]
  ------------------
 3675|      0|    return XML_ERROR_NO_MEMORY;
 3676|      0|  }
 3677|       |
 3678|      0|  n = i + binding->uriLen + prefixLen;
 3679|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3679:7): [True: 0, False: 0]
  ------------------
 3680|      0|    TAG *p;
 3681|       |
 3682|       |    /* Detect and prevent integer overflow */
 3683|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3683:9): [True: 0, False: 0]
  ------------------
 3684|      0|      return XML_ERROR_NO_MEMORY;
 3685|      0|    }
 3686|       |    /* Detect and prevent integer overflow.
 3687|       |     * The preprocessor guard addresses the "always false" warning
 3688|       |     * from -Wtype-limits on platforms where
 3689|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3690|       |#if UINT_MAX >= SIZE_MAX
 3691|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3692|       |      return XML_ERROR_NO_MEMORY;
 3693|       |    }
 3694|       |#endif
 3695|       |
 3696|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3697|      0|    if (! uri)
  ------------------
  |  Branch (3697:9): [True: 0, False: 0]
  ------------------
 3698|      0|      return XML_ERROR_NO_MEMORY;
 3699|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
 3700|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3701|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3701:34): [True: 0, False: 0]
  ------------------
 3702|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3702:11): [True: 0, False: 0]
  ------------------
 3703|      0|        p->name.str = uri;
 3704|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3705|      0|    binding->uri = uri;
 3706|      0|  }
 3707|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3708|      0|  uri = binding->uri + binding->uriLen;
 3709|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3710|       |  /* we always have a namespace separator between localPart and prefix */
 3711|      0|  if (prefixLen) {
  ------------------
  |  Branch (3711:7): [True: 0, False: 0]
  ------------------
 3712|      0|    uri += i - 1;
 3713|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3714|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3715|      0|  }
 3716|      0|  tagNamePtr->str = binding->uri;
 3717|      0|  return XML_ERROR_NONE;
 3718|      0|}
xmlparse.c:setElementTypePrefix:
 6447|  7.23k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  7.23k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  7.23k|  const XML_Char *name;
 6450|   138k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 135k, False: 2.87k]
  ------------------
 6451|   135k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|   135k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 4.36k, False: 130k]
  ------------------
 6452|  4.36k|      PREFIX *prefix;
 6453|  4.36k|      const XML_Char *s;
 6454|   105k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 101k, False: 4.36k]
  ------------------
 6455|   101k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|   101k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 132, False: 100k]
  |  |  |  Branch (603:35): [True: 0, False: 132]
  |  |  ------------------
  |  |  604|   101k|       ? 0                                                                     \
  |  |  605|   101k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 101k]
  ------------------
 6456|      0|          return 0;
 6457|   101k|      }
 6458|  4.36k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  4.36k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 19, False: 4.35k]
  |  |  |  Branch (603:35): [True: 0, False: 19]
  |  |  ------------------
  |  |  604|  4.36k|       ? 0                                                                     \
  |  |  605|  4.36k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 4.36k]
  ------------------
 6459|      0|        return 0;
 6460|  4.36k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  4.36k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  4.36k|                                sizeof(PREFIX));
 6462|  4.36k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 4.36k]
  ------------------
 6463|      0|        return 0;
 6464|  4.36k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  4.36k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 3.63k, False: 730]
  ------------------
 6465|  3.63k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  3.63k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    730|      else
 6467|    730|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    730|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  4.36k|      elementType->prefix = prefix;
 6469|  4.36k|      break;
 6470|  4.36k|    }
 6471|   135k|  }
 6472|  7.23k|  return 1;
 6473|  7.23k|}
xmlparse.c:freeBindings:
 3224|  16.5k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  16.5k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 16.5k]
  ------------------
 3226|      0|    BINDING *b = bindings;
 3227|       |
 3228|       |    /* m_startNamespaceDeclHandler will have been called for this
 3229|       |     * binding in addBindings(), so call the end handler now.
 3230|       |     */
 3231|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3231:9): [True: 0, False: 0]
  ------------------
 3232|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3233|       |
 3234|      0|    bindings = bindings->nextTagBinding;
 3235|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3236|      0|    parser->m_freeBindingList = b;
 3237|      0|    b->prefix->binding = b->prevPrefixBinding;
 3238|      0|  }
 3239|  16.5k|}
xmlparse.c:epilogProcessor:
 5647|    134|                const char **nextPtr) {
 5648|    134|  parser->m_processor = epilogProcessor;
 5649|    134|  parser->m_eventPtr = s;
 5650|  1.52k|  for (;;) {
 5651|  1.52k|    const char *next = NULL;
 5652|  1.52k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.52k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.52k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|  1.52k|#ifdef XML_DTD
 5654|  1.52k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 1.52k]
  ------------------
 5655|  1.52k|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|  1.52k|#endif
 5660|  1.52k|    parser->m_eventEndPtr = next;
 5661|  1.52k|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 1, False: 1.52k]
  ------------------
 5664|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 1]
  ------------------
 5665|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5666|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5666:13): [True: 0, False: 0]
  ------------------
 5667|      0|          return XML_ERROR_ABORTED;
 5668|      0|      }
 5669|      1|      *nextPtr = next;
 5670|      1|      return XML_ERROR_NONE;
 5671|     59|    case XML_TOK_NONE:
  ------------------
  |  |   51|     59|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 59, False: 1.46k]
  ------------------
 5672|     59|      *nextPtr = s;
 5673|     59|      return XML_ERROR_NONE;
 5674|    542|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    542|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 542, False: 984]
  ------------------
 5675|    542|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 542]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    542|      break;
 5678|    459|    case XML_TOK_PI:
  ------------------
  |  |   76|    459|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 459, False: 1.06k]
  ------------------
 5679|    459|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 459]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    459|      break;
 5682|    459|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    391|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 391, False: 1.13k]
  ------------------
 5683|    391|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 391]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|    391|      break;
 5686|    391|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 21, False: 1.50k]
  ------------------
 5687|     21|      parser->m_eventPtr = next;
 5688|     21|      return XML_ERROR_INVALID_TOKEN;
 5689|      4|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5689:5): [True: 4, False: 1.52k]
  ------------------
 5690|      4|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5690:11): [True: 4, False: 0]
  ------------------
 5691|      4|        *nextPtr = s;
 5692|      4|        return XML_ERROR_NONE;
 5693|      4|      }
 5694|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5695|      2|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5695:5): [True: 2, False: 1.52k]
  ------------------
 5696|      2|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5696:11): [True: 2, False: 0]
  ------------------
 5697|      2|        *nextPtr = s;
 5698|      2|        return XML_ERROR_NONE;
 5699|      2|      }
 5700|      0|      return XML_ERROR_PARTIAL_CHAR;
 5701|     47|    default:
  ------------------
  |  Branch (5701:5): [True: 47, False: 1.47k]
  ------------------
 5702|     47|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|  1.52k|    }
 5704|  1.39k|    parser->m_eventPtr = s = next;
 5705|  1.39k|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 1.39k]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 1.39k]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|  1.39k|    default:;
  ------------------
  |  Branch (5711:5): [True: 1.39k, False: 0]
  ------------------
 5712|  1.39k|    }
 5713|  1.39k|  }
 5714|    134|}
xmlparse.c:doCdataSection:
 4027|  2.48k|               enum XML_Account account) {
 4028|  2.48k|  const char *s = *startPtr;
 4029|  2.48k|  const char **eventPP;
 4030|  2.48k|  const char **eventEndPP;
 4031|  2.48k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 1.47k, False: 1.00k]
  ------------------
 4032|  1.47k|    eventPP = &parser->m_eventPtr;
 4033|  1.47k|    *eventPP = s;
 4034|  1.47k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  1.47k|  } else {
 4036|  1.00k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  1.00k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  1.00k|  }
 4039|  2.48k|  *eventPP = s;
 4040|  2.48k|  *startPtr = NULL;
 4041|       |
 4042|  98.3k|  for (;;) {
 4043|  98.3k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|  98.3k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|  98.3k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  98.3k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|  98.3k|#ifdef XML_DTD
 4046|  98.3k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 1, False: 98.3k]
  ------------------
 4047|      1|      accountingOnAbort(parser);
 4048|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      1|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|  98.3k|    *eventEndPP = next;
 4054|  98.3k|    switch (tok) {
 4055|  1.65k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  1.65k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 1.65k, False: 96.6k]
  ------------------
 4056|  1.65k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 1.65k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  1.65k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4060:16): [Folded - Ignored]
  |  Branch (4060:23): [True: 0, False: 0]
  ------------------
 4061|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4062|      0|                                       0);
 4063|       |      /* END disabled code */
 4064|  1.65k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 1.65k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  1.65k|      *startPtr = next;
 4067|  1.65k|      *nextPtr = next;
 4068|  1.65k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 1.65k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  1.65k|      else
 4071|  1.65k|        return XML_ERROR_NONE;
 4072|  40.5k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  40.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 40.5k, False: 57.7k]
  ------------------
 4073|  40.5k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 40.5k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|  40.5k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 40.5k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|  40.5k|      break;
 4079|  55.2k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  55.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 55.2k, False: 43.0k]
  ------------------
 4080|  55.2k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|  55.2k|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 55.2k]
  ------------------
 4082|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4083|      0|          for (;;) {
 4084|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4085|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4086|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4087|      0|            *eventEndPP = next;
 4088|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4089|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4090|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4090:17): [True: 0, False: 0]
  ------------------
 4091|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4091:20): [True: 0, False: 0]
  ------------------
 4092|      0|              break;
 4093|      0|            *eventPP = s;
 4094|      0|          }
 4095|      0|        } else
 4096|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4097|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4098|  55.2k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 55.2k]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|  55.2k|    } break;
 4101|    166|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    166|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 166, False: 98.1k]
  ------------------
 4102|    166|      *eventPP = next;
 4103|    166|      return XML_ERROR_INVALID_TOKEN;
 4104|    128|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    128|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 128, False: 98.1k]
  ------------------
 4105|    128|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 128, False: 0]
  ------------------
 4106|    128|        *nextPtr = s;
 4107|    128|        return XML_ERROR_NONE;
 4108|    128|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|    102|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|    102|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 102, False: 98.2k]
  ------------------
 4111|    530|    case XML_TOK_NONE:
  ------------------
  |  |   51|    530|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 428, False: 97.8k]
  ------------------
 4112|    530|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 472, False: 58]
  ------------------
 4113|    472|        *nextPtr = s;
 4114|    472|        return XML_ERROR_NONE;
 4115|    472|      }
 4116|     58|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 98.3k]
  ------------------
 4118|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4119|       |       * explicit case, so this default case will never be executed.
 4120|       |       * We retain it as a safety net and exclude it from the coverage
 4121|       |       * statistics.
 4122|       |       *
 4123|       |       * LCOV_EXCL_START
 4124|       |       */
 4125|      0|      *eventPP = next;
 4126|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4127|       |      /* LCOV_EXCL_STOP */
 4128|  98.3k|    }
 4129|       |
 4130|  95.8k|    *eventPP = s = next;
 4131|  95.8k|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 95.8k]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 95.8k]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|  95.8k|    default:;
  ------------------
  |  Branch (4137:5): [True: 95.8k, False: 0]
  ------------------
 4138|  95.8k|    }
 4139|  95.8k|  }
 4140|       |  /* not reached */
 4141|  2.48k|}
xmlparse.c:storeRawNames:
 2572|  6.79k|storeRawNames(XML_Parser parser) {
 2573|  6.79k|  TAG *tag = parser->m_tagStack;
 2574|  88.6k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 81.8k, False: 6.79k]
  ------------------
 2575|  81.8k|    int bufSize;
 2576|  81.8k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  81.8k|    size_t rawNameLen;
 2578|  81.8k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  81.8k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 81.8k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  81.8k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  81.8k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  81.8k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 81.8k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  81.8k|    bufSize = nameLen + (int)rawNameLen;
 2594|  81.8k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 682, False: 81.2k]
  ------------------
 2595|    682|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    682|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    682|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 682]
  ------------------
 2597|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2598|       |      /* if tag->name.str points to tag->buf (only when namespace
 2599|       |         processing is off) then we have to update it
 2600|       |      */
 2601|    682|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 682, False: 0]
  ------------------
 2602|    682|        tag->name.str = (XML_Char *)temp;
 2603|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2604|       |         then update it as well, since it will always point into tag->buf
 2605|       |      */
 2606|    682|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 682]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    682|      tag->buf = temp;
 2610|    682|      tag->bufEnd = temp + bufSize;
 2611|    682|      rawNameBuf = temp + nameLen;
 2612|    682|    }
 2613|  81.8k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  81.8k|    tag->rawName = rawNameBuf;
 2615|  81.8k|    tag = tag->parent;
 2616|  81.8k|  }
 2617|  6.79k|  return XML_TRUE;
  ------------------
  |  |   55|  6.79k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  6.79k|}
xmlparse.c:getElementType:
 7615|  16.9k|               const char *end) {
 7616|  16.9k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  16.9k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  16.9k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  16.9k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 16.9k]
  ------------------
 7621|      0|    return NULL;
 7622|  16.9k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  16.9k|                               sizeof(ELEMENT_TYPE));
 7624|  16.9k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 16.9k]
  ------------------
 7625|      0|    return NULL;
 7626|  16.9k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 9.73k, False: 7.23k]
  ------------------
 7627|  9.73k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  9.73k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  7.23k|  else {
 7629|  7.23k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.23k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  7.23k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 7.23k]
  ------------------
 7631|      0|      return NULL;
 7632|  7.23k|  }
 7633|  16.9k|  return ret;
 7634|  16.9k|}
xmlparse.c:getAttributeId:
 6477|  71.7k|               const char *end) {
 6478|  71.7k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|  71.7k|  ATTRIBUTE_ID *id;
 6480|  71.7k|  const XML_Char *name;
 6481|  71.7k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  71.7k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 466, False: 71.2k]
  |  |  |  Branch (603:35): [True: 0, False: 466]
  |  |  ------------------
  |  |  604|  71.7k|       ? 0                                                                     \
  |  |  605|  71.7k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 71.7k]
  ------------------
 6482|      0|    return NULL;
 6483|  71.7k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|  71.7k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 71.7k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|  71.7k|  ++name;
 6488|  71.7k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|  71.7k|                              sizeof(ATTRIBUTE_ID));
 6490|  71.7k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 71.7k]
  ------------------
 6491|      0|    return NULL;
 6492|  71.7k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 64.5k, False: 7.15k]
  ------------------
 6493|  64.5k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  64.5k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  7.15k|  else {
 6495|  7.15k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.15k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  7.15k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 7.15k, False: 0]
  ------------------
 6497|  7.15k|      ;
 6498|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:14): [True: 0, False: 0]
  |  Branch (6498:43): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  |  Branch (6499:46): [True: 0, False: 0]
  ------------------
 6500|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:17): [True: 0, False: 0]
  ------------------
 6501|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:18): [True: 0, False: 0]
  |  Branch (6501:44): [True: 0, False: 0]
  ------------------
 6502|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6502:11): [True: 0, False: 0]
  ------------------
 6503|      0|        id->prefix = &dtd->defaultPrefix;
 6504|      0|      else
 6505|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6506|      0|                                      sizeof(PREFIX));
 6507|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6508|      0|    } else {
 6509|      0|      int i;
 6510|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6510:19): [True: 0, False: 0]
  ------------------
 6511|       |        /* attributes without prefix are *not* in the default namespace */
 6512|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6512:13): [True: 0, False: 0]
  ------------------
 6513|      0|          int j;
 6514|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6514:23): [True: 0, False: 0]
  ------------------
 6515|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6515:17): [True: 0, False: 0]
  ------------------
 6516|      0|              return NULL;
 6517|      0|          }
 6518|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6518:15): [True: 0, False: 0]
  ------------------
 6519|      0|            return NULL;
 6520|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6521|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6522|      0|          if (! id->prefix)
  ------------------
  |  Branch (6522:15): [True: 0, False: 0]
  ------------------
 6523|      0|            return NULL;
 6524|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6524:15): [True: 0, False: 0]
  ------------------
 6525|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6526|      0|          else
 6527|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6528|      0|          break;
 6529|      0|        }
 6530|      0|      }
 6531|      0|    }
 6532|  7.15k|  }
 6533|  71.7k|  return id;
 6534|  71.7k|}
xmlparse.c:poolAppend:
 7221|  36.1M|           const char *end) {
 7222|  36.1M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 26.2k, False: 36.1M]
  |  Branch (7222:22): [True: 0, False: 26.2k]
  ------------------
 7223|      0|    return NULL;
 7224|  36.1M|  for (;;) {
 7225|  36.1M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  36.1M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  36.1M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  36.1M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  36.1M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 36.1M, False: 14.2k]
  ------------------
 7228|  36.1M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 14.2k]
  ------------------
 7229|  36.1M|      break;
 7230|  14.2k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 14.2k]
  ------------------
 7231|      0|      return NULL;
 7232|  14.2k|  }
 7233|  36.1M|  return pool->start;
 7234|  36.1M|}
xmlparse.c:defineAttribute:
 6387|  47.5k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  47.5k|  DEFAULT_ATTRIBUTE *att;
 6389|  47.5k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 16.2k, False: 31.3k]
  |  Branch (6389:16): [True: 1.14k, False: 30.1k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  17.4k|    int i;
 6393|  63.7k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 61.2k, False: 2.48k]
  ------------------
 6394|  61.2k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 14.9k, False: 46.2k]
  ------------------
 6395|  14.9k|        return 1;
 6396|  2.48k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 349, False: 2.13k]
  |  Branch (6396:17): [True: 200, False: 149]
  |  Branch (6396:34): [True: 200, False: 0]
  ------------------
 6397|    200|      type->idAtt = attId;
 6398|  2.48k|  }
 6399|  32.6k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 1.97k, False: 30.6k]
  ------------------
 6400|  1.97k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 1.45k, False: 521]
  ------------------
 6401|  1.45k|      type->allocDefaultAtts = 8;
 6402|  1.45k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|  1.45k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|  1.45k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|  1.45k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 1.45k]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|  1.45k|    } else {
 6409|    521|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    521|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 521]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    521|      int count = type->allocDefaultAtts * 2;
 6417|       |
 6418|       |      /* Detect and prevent integer overflow.
 6419|       |       * The preprocessor guard addresses the "always false" warning
 6420|       |       * from -Wtype-limits on platforms where
 6421|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6422|       |#if UINT_MAX >= SIZE_MAX
 6423|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6424|       |        return 0;
 6425|       |      }
 6426|       |#endif
 6427|       |
 6428|    521|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    521|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    521|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    521|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 521]
  ------------------
 6431|      0|        return 0;
 6432|    521|      type->allocDefaultAtts = count;
 6433|    521|      type->defaultAtts = temp;
 6434|    521|    }
 6435|  1.97k|  }
 6436|  32.6k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  32.6k|  att->id = attId;
 6438|  32.6k|  att->value = value;
 6439|  32.6k|  att->isCdata = isCdata;
 6440|  32.6k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 32.5k, False: 97]
  ------------------
 6441|  32.5k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  32.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  32.6k|  type->nDefaultAtts += 1;
 6443|  32.6k|  return 1;
 6444|  32.6k|}
xmlparse.c:poolGrow:
 7322|  55.8k|poolGrow(STRING_POOL *pool) {
 7323|  55.8k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 25.7k, False: 30.0k]
  ------------------
 7324|  25.7k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 22.0k, False: 3.68k]
  ------------------
 7325|  22.0k|      pool->blocks = pool->freeBlocks;
 7326|  22.0k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  22.0k|      pool->blocks->next = NULL;
 7328|  22.0k|      pool->start = pool->blocks->s;
 7329|  22.0k|      pool->end = pool->start + pool->blocks->size;
 7330|  22.0k|      pool->ptr = pool->start;
 7331|  22.0k|      return XML_TRUE;
  ------------------
  |  |   55|  22.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  22.0k|    }
 7333|  3.68k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 3.49k, False: 189]
  ------------------
 7334|  3.49k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  3.49k|      pool->freeBlocks->next = pool->blocks;
 7336|  3.49k|      pool->blocks = pool->freeBlocks;
 7337|  3.49k|      pool->freeBlocks = tem;
 7338|  3.49k|      memcpy(pool->blocks->s, pool->start,
 7339|  3.49k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  3.49k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  3.49k|      pool->start = pool->blocks->s;
 7342|  3.49k|      pool->end = pool->start + pool->blocks->size;
 7343|  3.49k|      return XML_TRUE;
  ------------------
  |  |   55|  3.49k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  3.49k|    }
 7345|  3.68k|  }
 7346|  30.2k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 13.0k, False: 17.1k]
  |  Branch (7346:23): [True: 8.78k, False: 4.30k]
  ------------------
 7347|  8.78k|    BLOCK *temp;
 7348|  8.78k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  8.78k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  8.78k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  8.78k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 8.78k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  8.78k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  8.78k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 8.78k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  8.78k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  8.78k|                                           (unsigned)bytesToAllocate);
 7371|  8.78k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 8.78k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  8.78k|    pool->blocks = temp;
 7374|  8.78k|    pool->blocks->size = blockSize;
 7375|  8.78k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  8.78k|    pool->start = pool->blocks->s;
 7377|  8.78k|    pool->end = pool->start + blockSize;
 7378|  21.4k|  } else {
 7379|  21.4k|    BLOCK *tem;
 7380|  21.4k|    int blockSize = (int)(pool->end - pool->start);
 7381|  21.4k|    size_t bytesToAllocate;
 7382|       |
 7383|  21.4k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 21.4k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  21.4k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  21.4k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 21.0k, False: 346]
  ------------------
 7397|  21.0k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  21.0k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    346|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    346|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 346]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    346|      blockSize *= 2;
 7404|    346|    }
 7405|       |
 7406|  21.4k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  21.4k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 21.4k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  21.4k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  21.4k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 21.4k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  21.4k|    tem->size = blockSize;
 7414|  21.4k|    tem->next = pool->blocks;
 7415|  21.4k|    pool->blocks = tem;
 7416|  21.4k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 3.47k, False: 17.9k]
  ------------------
 7417|  3.47k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  21.4k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  21.4k|    pool->start = tem->s;
 7420|  21.4k|    pool->end = tem->s + blockSize;
 7421|  21.4k|  }
 7422|  30.2k|  return XML_TRUE;
  ------------------
  |  |   55|  30.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  30.2k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  30.2k|poolBytesToAllocateFor(int blockSize) {
 7295|       |  /* Unprotected math would be:
 7296|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7297|       |  **
 7298|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7299|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7300|       |  ** on top has no chance of making us accept a small non-negative number
 7301|       |  */
 7302|  30.2k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  30.2k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 30.2k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  30.2k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 30.2k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  30.2k|  {
 7311|  30.2k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  30.2k|    const int bytesToAllocate
 7313|  30.2k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  30.2k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 30.2k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  30.2k|    return (size_t)bytesToAllocate;
 7318|  30.2k|  }
 7319|  30.2k|}
xmlparse.c:storeAttributeValue:
 5872|  30.7k|                    enum XML_Account account) {
 5873|  30.7k|  enum XML_Error result
 5874|  30.7k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  30.7k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 199, False: 30.5k]
  ------------------
 5876|    199|    return result;
 5877|  30.5k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  47.6k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 13.7k, False: 3.33k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  13.7k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 17.1k, False: 13.4k]
  |  Branch (5877:40): [True: 1.08k, False: 12.7k]
  ------------------
 5878|  1.08k|    poolChop(pool);
  ------------------
  |  |  598|  1.08k|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  30.5k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  30.5k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 892, False: 29.6k]
  |  |  |  Branch (603:35): [True: 0, False: 892]
  |  |  ------------------
  |  |  604|  30.5k|       ? 0                                                                     \
  |  |  605|  30.5k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 30.5k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  30.5k|  return XML_ERROR_NONE;
 5882|  30.5k|}
xmlparse.c:appendAttributeValue:
 5887|   435k|                     enum XML_Account account) {
 5888|   435k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|   206M|  for (;;) {
 5894|   206M|    const char *next
 5895|   206M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|   206M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|   206M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   206M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|   206M|#ifdef XML_DTD
 5898|   206M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 25, False: 206M]
  ------------------
 5899|     25|      accountingOnAbort(parser);
 5900|     25|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     25|    }
 5902|   206M|#endif
 5903|   206M|    switch (tok) {
 5904|   435k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   435k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 435k, False: 205M]
  ------------------
 5905|   435k|      return XML_ERROR_NONE;
 5906|     14|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 14, False: 206M]
  ------------------
 5907|     14|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 9, False: 5]
  ------------------
 5908|      9|        parser->m_eventPtr = next;
 5909|     14|      return XML_ERROR_INVALID_TOKEN;
 5910|      4|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5910:5): [True: 4, False: 206M]
  ------------------
 5911|      4|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5911:11): [True: 3, False: 1]
  ------------------
 5912|      3|        parser->m_eventPtr = ptr;
 5913|      4|      return XML_ERROR_INVALID_TOKEN;
 5914|  20.6k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  20.6k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 20.6k, False: 206M]
  ------------------
 5915|  20.6k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  20.6k|      int i;
 5917|  20.6k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  20.6k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  20.6k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 38, False: 20.5k]
  ------------------
 5919|     38|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 38, False: 0]
  ------------------
 5920|     38|          parser->m_eventPtr = ptr;
 5921|     38|        return XML_ERROR_BAD_CHAR_REF;
 5922|     38|      }
 5923|  20.5k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 1.38k, False: 19.2k]
  |  Branch (5923:24): [True: 983, False: 406]
  ------------------
 5924|  20.5k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    983|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    763|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 220, False: 763]
  |  Branch (5924:40): [True: 405, False: 358]
  ------------------
 5925|    625|        break;
 5926|  19.9k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  19.9k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5927|       |      /* The XmlEncode() functions can never return 0 here.  That
 5928|       |       * error return happens if the code point passed in is either
 5929|       |       * negative or greater than or equal to 0x110000.  The
 5930|       |       * XmlCharRefNumber() functions will all return a number
 5931|       |       * strictly less than 0x110000 or a negative value if an error
 5932|       |       * occurred.  The negative value is intercepted above, so
 5933|       |       * XmlEncode() is never passed a value it might return an
 5934|       |       * error for.
 5935|       |       */
 5936|  59.5k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 39.6k, False: 19.9k]
  ------------------
 5937|  39.6k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  39.6k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 374, False: 39.2k]
  |  |  |  Branch (603:35): [True: 0, False: 374]
  |  |  ------------------
  |  |  604|  39.6k|       ? 0                                                                     \
  |  |  605|  39.6k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 39.6k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  39.6k|      }
 5940|  19.9k|    } break;
 5941|  34.7M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  34.7M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 34.7M, False: 171M]
  ------------------
 5942|  34.7M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 34.7M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  34.7M|      break;
 5945|  34.7M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  2.32k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 2.32k, False: 206M]
  ------------------
 5946|  2.32k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|  29.0M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  29.0M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 29.0M, False: 177M]
  ------------------
 5949|   170M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   170M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 141M, False: 64.6M]
  ------------------
 5950|   170M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|   243k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|   227k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 243k, False: 170M]
  |  Branch (5950:25): [True: 16.0k, False: 227k]
  |  Branch (5950:50): [True: 182k, False: 44.7k]
  ------------------
 5951|   198k|        break;
 5952|   170M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|   170M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 2.60k, False: 170M]
  |  |  |  Branch (603:35): [True: 0, False: 2.60k]
  |  |  ------------------
  |  |  604|   170M|       ? 0                                                                     \
  |  |  605|   170M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 170M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|   170M|      break;
 5955|   170M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   416k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 416k, False: 205M]
  ------------------
 5956|   416k|      const XML_Char *name;
 5957|   416k|      ENTITY *entity;
 5958|   416k|      char checkEntityDecl;
 5959|   416k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   416k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|   416k|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|   416k|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 1.43k, False: 415k]
  ------------------
 5962|  1.43k|#ifdef XML_DTD
 5963|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5964|       |         *       so there is no amplification and hence recording without
 5965|       |         *       protection. */
 5966|  1.43k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  1.43k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  1.43k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  1.43k|#endif /* XML_DTD */
 5970|  1.43k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  1.43k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 220, False: 1.21k]
  |  |  |  Branch (603:35): [True: 0, False: 220]
  |  |  ------------------
  |  |  604|  1.43k|       ? 0                                                                     \
  |  |  605|  1.43k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 1.43k]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  1.43k|        break;
 5973|  1.43k|      }
 5974|   415k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|   415k|                             ptr + enc->minBytesPerChar,
 5976|   415k|                             next - enc->minBytesPerChar);
 5977|   415k|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 415k]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|   415k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|   415k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|   415k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5981|       |      /* First, determine if a check for an existing declaration is needed;
 5982|       |         if yes, check that the entity exists, and that it is internal.
 5983|       |      */
 5984|   415k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 17.7k, False: 397k]
  ------------------
 5985|  17.7k|        checkEntityDecl =
 5986|  17.7k|#ifdef XML_DTD
 5987|  17.7k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 17.7k, False: 0]
  ------------------
 5988|  17.7k|#endif /* XML_DTD */
 5989|  17.7k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 17.7k, False: 0]
  |  Branch (5989:14): [True: 195, False: 17.5k]
  ------------------
 5990|  17.7k|                             : ! dtd->hasParamEntityRefs);
 5991|   397k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|   397k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 168k, False: 229k]
  |  Branch (5992:56): [True: 0, False: 229k]
  ------------------
 5993|   415k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 186k, False: 229k]
  ------------------
 5994|   186k|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 111, False: 186k]
  ------------------
 5995|    111|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|   186k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 186k]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|   229k|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 10.3k, False: 218k]
  ------------------
 5999|       |        /* Cannot report skipped entity here - see comments on
 6000|       |           parser->m_skippedEntityHandler.
 6001|       |        if (parser->m_skippedEntityHandler)
 6002|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6003|       |        */
 6004|       |        /* Cannot call the default handler because this would be
 6005|       |           out of sync with the call to the startElementHandler.
 6006|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6007|       |          reportDefault(parser, enc, ptr, next);
 6008|       |        */
 6009|  10.3k|        break;
 6010|  10.3k|      }
 6011|   404k|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 5, False: 404k]
  ------------------
 6012|      5|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 5]
  ------------------
 6013|       |          /* It does not appear that this line can be executed.
 6014|       |           *
 6015|       |           * The "if (entity->open)" check catches recursive entity
 6016|       |           * definitions.  In order to be called with an open
 6017|       |           * entity, it must have gone through this code before and
 6018|       |           * been through the recursive call to
 6019|       |           * appendAttributeValue() some lines below.  That call
 6020|       |           * sets the local encoding ("enc") to the parser's
 6021|       |           * internal encoding (internal_utf8 or internal_utf16),
 6022|       |           * which can never be the same as the principle encoding.
 6023|       |           * It doesn't appear there is another code path that gets
 6024|       |           * here with entity->open being TRUE.
 6025|       |           *
 6026|       |           * Since it is not certain that this logic is watertight,
 6027|       |           * we keep the line and merely exclude it from coverage
 6028|       |           * tests.
 6029|       |           */
 6030|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6031|      0|        }
 6032|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      5|      }
 6034|   404k|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 0, False: 404k]
  ------------------
 6035|      0|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6035:13): [True: 0, False: 0]
  ------------------
 6036|      0|          parser->m_eventPtr = ptr;
 6037|      0|        return XML_ERROR_BINARY_ENTITY_REF;
 6038|      0|      }
 6039|   404k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 404k]
  ------------------
 6040|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6040:13): [True: 1, False: 1]
  ------------------
 6041|      1|          parser->m_eventPtr = ptr;
 6042|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6043|   404k|      } else {
 6044|   404k|        enum XML_Error result;
 6045|   404k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|   404k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   404k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|   404k|#ifdef XML_DTD
 6048|   404k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|   404k|#endif
 6050|   404k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|   404k|                                      isCdata, (const char *)entity->textPtr,
 6052|   404k|                                      (const char *)textEnd, pool,
 6053|   404k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|   404k|#ifdef XML_DTD
 6055|   404k|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|   404k|#endif
 6057|   404k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   404k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|   404k|        if (result)
  ------------------
  |  Branch (6058:13): [True: 60, False: 404k]
  ------------------
 6059|     60|          return result;
 6060|   404k|      }
 6061|   404k|    } break;
 6062|   404k|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 206M]
  ------------------
 6063|       |      /* The only token returned by XmlAttributeValueTok() that does
 6064|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6065|       |       * Getting that would require an entity name to contain an
 6066|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6067|       |       * tokenisers will have already recognised and rejected such
 6068|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6069|       |       * default case should be retained as a safety net, but the code
 6070|       |       * excluded from coverage tests.
 6071|       |       *
 6072|       |       * LCOV_EXCL_START
 6073|       |       */
 6074|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6074:11): [True: 0, False: 0]
  ------------------
 6075|      0|        parser->m_eventPtr = ptr;
 6076|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6077|       |      /* LCOV_EXCL_STOP */
 6078|   206M|    }
 6079|   205M|    ptr = next;
 6080|   205M|  }
 6081|       |  /* not reached */
 6082|   435k|}
xmlparse.c:storeEntityValue:
 6087|  7.60k|                 enum XML_Account account) {
 6088|  7.60k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  7.60k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  7.60k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  7.60k|#ifdef XML_DTD
 6092|  7.60k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  7.60k|  parser->m_prologState.inEntityValue = 1;
 6094|       |#else
 6095|       |  UNUSED_P(account);
 6096|       |#endif /* XML_DTD */
 6097|       |  /* never return Null for the value argument in EntityDeclHandler,
 6098|       |     since this would indicate an external entity; therefore we
 6099|       |     have to make sure that entityValuePool.start is not null */
 6100|  7.60k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.34k, False: 5.26k]
  ------------------
 6101|  2.34k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.34k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.34k|  }
 6104|       |
 6105|  2.20M|  for (;;) {
 6106|  2.20M|    const char *next
 6107|  2.20M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|  2.20M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  2.20M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  2.20M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|  2.20M|#ifdef XML_DTD
 6111|  2.20M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 2.20M]
  ------------------
 6112|  2.20M|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|  2.20M|#endif
 6118|       |
 6119|  2.20M|    switch (tok) {
 6120|      3|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      3|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 3, False: 2.20M]
  ------------------
 6121|      3|#ifdef XML_DTD
 6122|      3|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6122:11): [True: 0, False: 3]
  |  Branch (6122:38): [True: 0, False: 3]
  ------------------
 6123|      0|        const XML_Char *name;
 6124|      0|        ENTITY *entity;
 6125|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6126|      0|                               entityTextPtr + enc->minBytesPerChar,
 6127|      0|                               next - enc->minBytesPerChar);
 6128|      0|        if (! name) {
  ------------------
  |  Branch (6128:13): [True: 0, False: 0]
  ------------------
 6129|      0|          result = XML_ERROR_NO_MEMORY;
 6130|      0|          goto endEntityValue;
 6131|      0|        }
 6132|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6133|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6134|      0|        if (! entity) {
  ------------------
  |  Branch (6134:13): [True: 0, False: 0]
  ------------------
 6135|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6136|       |          /* cannot report skipped entity here - see comments on
 6137|       |             parser->m_skippedEntityHandler
 6138|       |          if (parser->m_skippedEntityHandler)
 6139|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6140|       |          */
 6141|      0|          dtd->keepProcessing = dtd->standalone;
 6142|      0|          goto endEntityValue;
 6143|      0|        }
 6144|      0|        if (entity->open) {
  ------------------
  |  Branch (6144:13): [True: 0, False: 0]
  ------------------
 6145|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6145:15): [True: 0, False: 0]
  ------------------
 6146|      0|            parser->m_eventPtr = entityTextPtr;
 6147|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6148|      0|          goto endEntityValue;
 6149|      0|        }
 6150|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6151:15): [True: 0, False: 0]
  ------------------
 6152|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6153|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6154|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6155|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6155:17): [True: 0, False: 0]
  ------------------
 6156|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6157|      0|                    entity->systemId, entity->publicId)) {
 6158|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6159|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6160|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6161|      0|              goto endEntityValue;
 6162|      0|            }
 6163|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6164|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6165|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6165:17): [True: 0, False: 0]
  ------------------
 6166|      0|              dtd->keepProcessing = dtd->standalone;
 6167|      0|          } else
 6168|      0|            dtd->keepProcessing = dtd->standalone;
 6169|      0|        } else {
 6170|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6171|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6172|      0|          result = storeEntityValue(
 6173|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6174|      0|              (const char *)(entity->textPtr + entity->textLen),
 6175|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6176|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6177|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6178|      0|          if (result)
  ------------------
  |  Branch (6178:15): [True: 0, False: 0]
  ------------------
 6179|      0|            goto endEntityValue;
 6180|      0|        }
 6181|      0|        break;
 6182|      0|      }
 6183|      3|#endif /* XML_DTD */
 6184|       |      /* In the internal subset, PE references are not legal
 6185|       |         within markup declarations, e.g entity values in this case. */
 6186|      3|      parser->m_eventPtr = entityTextPtr;
 6187|      3|      result = XML_ERROR_PARAM_ENTITY_REF;
 6188|      3|      goto endEntityValue;
 6189|  7.53k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.53k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 7.53k, False: 2.20M]
  ------------------
 6190|  7.53k|      result = XML_ERROR_NONE;
 6191|  7.53k|      goto endEntityValue;
 6192|  24.3k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  24.3k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 24.3k, False: 2.18M]
  ------------------
 6193|   505k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   505k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 481k, False: 1.72M]
  ------------------
 6194|   505k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 505k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   505k|      break;
 6199|   505k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.17k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 1.17k, False: 2.20M]
  ------------------
 6200|  1.17k|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|  1.68M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.68M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 1.68M, False: 521k]
  ------------------
 6203|  1.68M|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 104, False: 1.68M]
  |  Branch (6203:37): [True: 0, False: 104]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|  1.68M|      *(pool->ptr)++ = 0xA;
 6208|  1.68M|      break;
 6209|  7.12k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  7.12k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 7.12k, False: 2.20M]
  ------------------
 6210|  7.12k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  7.12k|      int i;
 6212|  7.12k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  7.12k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  7.12k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 5, False: 7.12k]
  ------------------
 6214|      5|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 5, False: 0]
  ------------------
 6215|      5|          parser->m_eventPtr = entityTextPtr;
 6216|      5|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      5|        goto endEntityValue;
 6218|      5|      }
 6219|  7.12k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  7.12k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6220|       |      /* The XmlEncode() functions can never return 0 here.  That
 6221|       |       * error return happens if the code point passed in is either
 6222|       |       * negative or greater than or equal to 0x110000.  The
 6223|       |       * XmlCharRefNumber() functions will all return a number
 6224|       |       * strictly less than 0x110000 or a negative value if an error
 6225|       |       * occurred.  The negative value is intercepted above, so
 6226|       |       * XmlEncode() is never passed a value it might return an
 6227|       |       * error for.
 6228|       |       */
 6229|  21.3k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 14.2k, False: 7.12k]
  ------------------
 6230|  14.2k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 10, False: 14.1k]
  |  Branch (6230:39): [True: 0, False: 10]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|  14.2k|        *(pool->ptr)++ = buf[i];
 6235|  14.2k|      }
 6236|  7.12k|    } break;
 6237|  7.12k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 43, False: 2.20M]
  ------------------
 6238|     43|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 43, False: 0]
  ------------------
 6239|     43|        parser->m_eventPtr = entityTextPtr;
 6240|     43|      result = XML_ERROR_INVALID_TOKEN;
 6241|     43|      goto endEntityValue;
 6242|     21|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 21, False: 2.20M]
  ------------------
 6243|     21|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 21, False: 0]
  ------------------
 6244|     21|        parser->m_eventPtr = next;
 6245|     21|      result = XML_ERROR_INVALID_TOKEN;
 6246|     21|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 2.20M]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|  2.20M|    }
 6261|  2.20M|    entityTextPtr = next;
 6262|  2.20M|  }
 6263|  7.60k|endEntityValue:
 6264|  7.60k|#ifdef XML_DTD
 6265|  7.60k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  7.60k|#endif /* XML_DTD */
 6267|  7.60k|  return result;
 6268|  7.60k|}
xmlparse.c:processInternalEntity:
 5717|   285k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|   285k|  const char *textStart, *textEnd;
 5719|   285k|  const char *next;
 5720|   285k|  enum XML_Error result;
 5721|   285k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|   285k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 284k, False: 1.55k]
  ------------------
 5724|   284k|    openEntity = parser->m_freeInternalEntities;
 5725|   284k|    parser->m_freeInternalEntities = openEntity->next;
 5726|   284k|  } else {
 5727|  1.55k|    openEntity
 5728|  1.55k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  1.55k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  1.55k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 1.55k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  1.55k|  }
 5732|   285k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   285k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|   285k|#ifdef XML_DTD
 5734|   285k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|   285k|#endif
 5736|   285k|  entity->processed = 0;
 5737|   285k|  openEntity->next = parser->m_openInternalEntities;
 5738|   285k|  parser->m_openInternalEntities = openEntity;
 5739|   285k|  openEntity->entity = entity;
 5740|   285k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|   285k|  openEntity->betweenDecl = betweenDecl;
 5742|   285k|  openEntity->internalEventPtr = NULL;
 5743|   285k|  openEntity->internalEventEndPtr = NULL;
 5744|   285k|  textStart = (const char *)entity->textPtr;
 5745|   285k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|   285k|  next = textStart;
 5748|       |
 5749|   285k|#ifdef XML_DTD
 5750|   285k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 285k]
  ------------------
 5751|      0|    int tok
 5752|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5753|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5754|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5755|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5756|      0|  } else
 5757|   285k|#endif /* XML_DTD */
 5758|   285k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|   285k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   285k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|   285k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|   285k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 284k, False: 740]
  ------------------
 5763|   284k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 284k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|   284k|    } else {
 5767|   284k|#ifdef XML_DTD
 5768|   284k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|   284k|#endif /* XML_DTD */
 5770|   284k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   284k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|   284k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|   284k|      openEntity->next = parser->m_freeInternalEntities;
 5774|   284k|      parser->m_freeInternalEntities = openEntity;
 5775|   284k|    }
 5776|   284k|  }
 5777|   285k|  return result;
 5778|   285k|}
xmlparse.c:entityTrackingOnOpen:
 7828|   690k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|   690k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|   690k|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|   690k|  rootParser->m_entity_stats.currentDepth++;
 7834|   690k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 2.11k, False: 688k]
  ------------------
 7835|   690k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  2.11k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  2.11k|  }
 7838|       |
 7839|   690k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|   690k|}
xmlparse.c:entityTrackingReportStats:
 7805|  1.38M|                          const char *action, int sourceLine) {
 7806|  1.38M|  assert(! rootParser->m_parentParser);
 7807|  1.38M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 1.38M, False: 0]
  ------------------
 7808|  1.38M|    return;
 7809|       |
 7810|       |#  if defined(XML_UNICODE)
 7811|       |  const char *const entityName = "[..]";
 7812|       |#  else
 7813|      0|  const char *const entityName = entity->name;
 7814|      0|#  endif
 7815|       |
 7816|      0|  fprintf(
 7817|      0|      stderr,
 7818|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7819|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7820|      0|      rootParser->m_entity_stats.currentDepth,
 7821|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7822|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7823|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7823:7): [True: 0, False: 0]
  ------------------
 7824|      0|      sourceLine);
 7825|      0|}
xmlparse.c:entityTrackingOnClose:
 7843|   689k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|   689k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|   689k|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|   689k|  rootParser->m_entity_stats.currentDepth--;
 7849|   689k|}
xmlparse.c:reportProcessingInstruction:
 6293|  16.8k|                            const char *start, const char *end) {
 6294|  16.8k|  const XML_Char *target;
 6295|  16.8k|  XML_Char *data;
 6296|  16.8k|  const char *tem;
 6297|  16.8k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 16.8k, False: 0]
  ------------------
 6298|  16.8k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 16.8k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  16.8k|    return 1;
 6301|  16.8k|  }
 6302|      0|  start += enc->minBytesPerChar * 2;
 6303|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6304|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6305|      0|  if (! target)
  ------------------
  |  Branch (6305:7): [True: 0, False: 0]
  ------------------
 6306|      0|    return 0;
 6307|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6308|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6309|      0|                         end - enc->minBytesPerChar * 2);
 6310|      0|  if (! data)
  ------------------
  |  Branch (6310:7): [True: 0, False: 0]
  ------------------
 6311|      0|    return 0;
 6312|      0|  normalizeLines(data);
 6313|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6314|      0|  poolClear(&parser->m_tempPool);
 6315|      0|  return 1;
 6316|      0|}
xmlparse.c:reportComment:
 6320|  2.62k|              const char *end) {
 6321|  2.62k|  XML_Char *data;
 6322|  2.62k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 2.62k, False: 0]
  ------------------
 6323|  2.62k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 2.62k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  2.62k|    return 1;
 6326|  2.62k|  }
 6327|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6328|      0|                         start + enc->minBytesPerChar * 4,
 6329|      0|                         end - enc->minBytesPerChar * 3);
 6330|      0|  if (! data)
  ------------------
  |  Branch (6330:7): [True: 0, False: 0]
  ------------------
 6331|      0|    return 0;
 6332|      0|  normalizeLines(data);
 6333|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6334|      0|  poolClear(&parser->m_tempPool);
 6335|      0|  return 1;
 6336|      0|}
xmlparse.c:getDebugLevel:
 8391|  38.5k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  38.5k|  const char *const valueOrNull = getenv(variableName);
 8393|  38.5k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 38.5k, False: 0]
  ------------------
 8394|  38.5k|    return defaultDebugLevel;
 8395|  38.5k|  }
 8396|      0|  const char *const value = valueOrNull;
 8397|       |
 8398|      0|  errno = 0;
 8399|      0|  char *afterValue = NULL;
 8400|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8401|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8401:7): [True: 0, False: 0]
  |  Branch (8401:23): [True: 0, False: 0]
  |  Branch (8401:48): [True: 0, False: 0]
  ------------------
 8402|      0|    errno = 0;
 8403|      0|    return defaultDebugLevel;
 8404|      0|  }
 8405|       |
 8406|      0|  return debugLevel;
 8407|      0|}
xmlparse.c:destroyBindings:
 1429|  2.52M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  2.52M|  for (;;) {
 1431|  2.52M|    BINDING *b = bindings;
 1432|  2.52M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 2.52M, False: 0]
  ------------------
 1433|  2.52M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  2.52M|}
xmlparse.c:startParsing:
  954|  19.2k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  19.2k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 19.2k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  19.2k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 19.2k]
  ------------------
  959|       |    /* implicit context only set for root parser, since child
  960|       |       parsers (i.e. external entity parsers) will inherit it
  961|       |    */
  962|      0|    return setContext(parser, implicitContext);
  963|      0|  }
  964|  19.2k|  return XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  19.2k|}
xmlparse.c:dtdDestroy:
 6789|  19.2k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  19.2k|  HASH_TABLE_ITER iter;
 6791|  19.2k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  42.2k|  for (;;) {
 6793|  42.2k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  42.2k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 19.2k, False: 22.9k]
  ------------------
 6795|  19.2k|      break;
 6796|  22.9k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 1.45k, False: 21.5k]
  ------------------
 6797|  1.45k|      ms->free_fcn(e->defaultAtts);
 6798|  22.9k|  }
 6799|  19.2k|  hashTableDestroy(&(p->generalEntities));
 6800|  19.2k|#ifdef XML_DTD
 6801|  19.2k|  hashTableDestroy(&(p->paramEntities));
 6802|  19.2k|#endif /* XML_DTD */
 6803|  19.2k|  hashTableDestroy(&(p->elementTypes));
 6804|  19.2k|  hashTableDestroy(&(p->attributeIds));
 6805|  19.2k|  hashTableDestroy(&(p->prefixes));
 6806|  19.2k|  poolDestroy(&(p->pool));
 6807|  19.2k|  poolDestroy(&(p->entityValuePool));
 6808|  19.2k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 19.2k, False: 0]
  ------------------
 6809|  19.2k|    ms->free_fcn(p->scaffIndex);
 6810|  19.2k|    ms->free_fcn(p->scaffold);
 6811|  19.2k|  }
 6812|  19.2k|  ms->free_fcn(p);
 6813|  19.2k|}
xmlparse.c:hashTableDestroy:
 7142|  96.3k|hashTableDestroy(HASH_TABLE *table) {
 7143|  96.3k|  size_t i;
 7144|  1.20M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 1.10M, False: 96.3k]
  ------------------
 7145|  1.10M|    table->mem->free_fcn(table->v[i]);
 7146|  96.3k|  table->mem->free_fcn(table->v);
 7147|  96.3k|}
xmlparse.c:poolClear:
 7185|  2.54M|poolClear(STRING_POOL *pool) {
 7186|  2.54M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 200k, False: 2.34M]
  ------------------
 7187|   200k|    pool->freeBlocks = pool->blocks;
 7188|  2.34M|  else {
 7189|  2.34M|    BLOCK *p = pool->blocks;
 7190|  2.34M|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 2.97k, False: 2.34M]
  ------------------
 7191|  2.97k|      BLOCK *tem = p->next;
 7192|  2.97k|      p->next = pool->freeBlocks;
 7193|  2.97k|      pool->freeBlocks = p;
 7194|  2.97k|      p = tem;
 7195|  2.97k|    }
 7196|  2.34M|  }
 7197|  2.54M|  pool->blocks = NULL;
 7198|  2.54M|  pool->start = NULL;
 7199|  2.54M|  pool->ptr = NULL;
 7200|  2.54M|  pool->end = NULL;
 7201|  2.54M|}
xmlparse.c:poolDestroy:
 7204|  77.1k|poolDestroy(STRING_POOL *pool) {
 7205|  77.1k|  BLOCK *p = pool->blocks;
 7206|  96.0k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 18.9k, False: 77.1k]
  ------------------
 7207|  18.9k|    BLOCK *tem = p->next;
 7208|  18.9k|    pool->mem->free_fcn(p);
 7209|  18.9k|    p = tem;
 7210|  18.9k|  }
 7211|  77.1k|  p = pool->freeBlocks;
 7212|  79.5k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 2.47k, False: 77.1k]
  ------------------
 7213|  2.47k|    BLOCK *tem = p->next;
 7214|  2.47k|    pool->mem->free_fcn(p);
 7215|  2.47k|    p = tem;
 7216|  2.47k|  }
 7217|  77.1k|}
xmlparse.c:poolCopyString:
 7237|  15.7k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|  2.96M|  do {
 7239|  2.96M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|  2.96M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 7.79k, False: 2.95M]
  |  |  |  Branch (603:35): [True: 0, False: 7.79k]
  |  |  ------------------
  |  |  604|  2.96M|       ? 0                                                                     \
  |  |  605|  2.96M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 2.96M]
  ------------------
 7240|      0|      return NULL;
 7241|  2.96M|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 2.94M, False: 15.7k]
  ------------------
 7242|  15.7k|  s = pool->start;
 7243|  15.7k|  poolFinish(pool);
  ------------------
  |  |  601|  15.7k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  15.7k|  return s;
 7245|  15.7k|}
xmlparse.c:copyString:
 7637|  19.2k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  19.2k|  size_t charsRequired = 0;
 7639|  19.2k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   134k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 115k, False: 19.2k]
  ------------------
 7643|   115k|    charsRequired++;
 7644|   115k|  }
 7645|       |  /* Include the terminator */
 7646|  19.2k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  19.2k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  19.2k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 19.2k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  19.2k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  19.2k|  return result;
 7655|  19.2k|}

XmlPrologStateInit:
 1237|  19.2k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.2k|  state->handler = prolog0;
 1239|  19.2k|#ifdef XML_DTD
 1240|  19.2k|  state->documentEntity = 1;
 1241|  19.2k|  state->includeLevel = 0;
 1242|  19.2k|  state->inEntityValue = 0;
 1243|  19.2k|#endif /* XML_DTD */
 1244|  19.2k|}
xmlrole.c:prolog0:
  142|  23.2k|        const ENCODING *enc) {
  143|  23.2k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 297, False: 22.9k]
  ------------------
  144|    537|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    537|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 537, False: 22.7k]
  ------------------
  145|    537|    state->handler = prolog1;
  146|    537|    return XML_ROLE_NONE;
  147|    297|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    297|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 297, False: 22.9k]
  ------------------
  148|    297|    state->handler = prolog1;
  149|    297|    return XML_ROLE_XML_DECL;
  150|    311|  case XML_TOK_PI:
  ------------------
  |  |   76|    311|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 311, False: 22.9k]
  ------------------
  151|    311|    state->handler = prolog1;
  152|    311|    return XML_ROLE_PI;
  153|     52|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     52|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 52, False: 23.2k]
  ------------------
  154|     52|    state->handler = prolog1;
  155|     52|    return XML_ROLE_COMMENT;
  156|  7.24k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  7.24k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 7.24k, False: 16.0k]
  ------------------
  157|  7.24k|    return XML_ROLE_NONE;
  158|  5.49k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.49k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.49k, False: 17.7k]
  ------------------
  159|  5.49k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.49k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 98, False: 5.39k]
  ------------------
  160|  5.49k|                              KW_DOCTYPE))
  161|     98|      break;
  162|  5.39k|    state->handler = doctype0;
  163|  5.39k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.05k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.05k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.05k, False: 14.2k]
  ------------------
  165|  9.05k|    state->handler = error;
  166|  9.05k|    return XML_ROLE_INSTANCE_START;
  167|  23.2k|  }
  168|    395|  return common(state, tok);
  169|  23.2k|}
xmlrole.c:prolog1:
  173|  5.53k|        const ENCODING *enc) {
  174|  5.53k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 10, False: 5.52k]
  ------------------
  175|    398|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    398|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 398, False: 5.13k]
  ------------------
  176|    398|    return XML_ROLE_NONE;
  177|  3.96k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.96k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.96k, False: 1.56k]
  ------------------
  178|  3.96k|    return XML_ROLE_PI;
  179|    792|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    792|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 792, False: 4.74k]
  ------------------
  180|    792|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 5.53k]
  ------------------
  182|       |    /* This case can never arise.  To reach this role function, the
  183|       |     * parse must have passed through prolog0 and therefore have had
  184|       |     * some form of input, even if only a space.  At that point, a
  185|       |     * byte order mark is no longer a valid character (though
  186|       |     * technically it should be interpreted as a non-breaking space),
  187|       |     * so will be rejected by the tokenizing stages.
  188|       |     */
  189|      0|    return XML_ROLE_NONE; /* LCOV_EXCL_LINE */
  190|    305|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    305|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 305, False: 5.22k]
  ------------------
  191|    305|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    305|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 301]
  ------------------
  192|    305|                              KW_DOCTYPE))
  193|      4|      break;
  194|    301|    state->handler = doctype0;
  195|    301|    return XML_ROLE_DOCTYPE_NONE;
  196|     60|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     60|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 60, False: 5.47k]
  ------------------
  197|     60|    state->handler = error;
  198|     60|    return XML_ROLE_INSTANCE_START;
  199|  5.53k|  }
  200|     14|  return common(state, tok);
  201|  5.53k|}
xmlrole.c:doctype0:
  225|  11.3k|         const ENCODING *enc) {
  226|  11.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.3k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 10, False: 11.3k]
  ------------------
  230|  5.69k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.69k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.69k, False: 5.68k]
  ------------------
  231|  5.69k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.67k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.67k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.67k, False: 5.70k]
  ------------------
  233|  5.67k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.67k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.3k]
  ------------------
  234|  5.67k|    state->handler = doctype1;
  235|  5.67k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.3k|  }
  237|     10|  return common(state, tok);
  238|  11.3k|}
xmlrole.c:doctype1:
  242|  6.93k|         const ENCODING *enc) {
  243|  6.93k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 4, False: 6.92k]
  ------------------
  244|  1.28k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.28k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.28k, False: 5.65k]
  ------------------
  245|  1.28k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.85k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.85k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.85k, False: 2.08k]
  ------------------
  247|  4.85k|    state->handler = internalSubset;
  248|  4.85k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     48|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     48|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 48, False: 6.88k]
  ------------------
  250|     48|    state->handler = prolog2;
  251|     48|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    746|  case XML_TOK_NAME:
  ------------------
  |  |   85|    746|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 746, False: 6.18k]
  ------------------
  253|    746|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    746|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13, False: 733]
  |  |  ------------------
  ------------------
  254|     13|      state->handler = doctype3;
  255|     13|      return XML_ROLE_DOCTYPE_NONE;
  256|     13|    }
  257|    733|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    733|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 711, False: 22]
  |  |  ------------------
  ------------------
  258|    711|      state->handler = doctype2;
  259|    711|      return XML_ROLE_DOCTYPE_NONE;
  260|    711|    }
  261|     22|    break;
  262|  6.93k|  }
  263|     26|  return common(state, tok);
  264|  6.93k|}
xmlrole.c:internalSubset:
  335|  57.1k|               const ENCODING *enc) {
  336|  57.1k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 79, False: 57.0k]
  ------------------
  337|  10.8k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.8k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 10.8k, False: 46.3k]
  ------------------
  338|  10.8k|    return XML_ROLE_NONE;
  339|  37.1k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  37.1k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 37.1k, False: 19.9k]
  ------------------
  340|  37.1k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  37.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.0k, False: 25.0k]
  |  |  ------------------
  ------------------
  341|  37.1k|                            KW_ENTITY)) {
  342|  12.0k|      state->handler = entity0;
  343|  12.0k|      return XML_ROLE_ENTITY_NONE;
  344|  12.0k|    }
  345|  25.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  25.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17.0k, False: 8.07k]
  |  |  ------------------
  ------------------
  346|  25.0k|                            KW_ATTLIST)) {
  347|  17.0k|      state->handler = attlist0;
  348|  17.0k|      return XML_ROLE_ATTLIST_NONE;
  349|  17.0k|    }
  350|  8.07k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  8.07k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 6.64k, False: 1.43k]
  |  |  ------------------
  ------------------
  351|  8.07k|                            KW_ELEMENT)) {
  352|  6.64k|      state->handler = element0;
  353|  6.64k|      return XML_ROLE_ELEMENT_NONE;
  354|  6.64k|    }
  355|  1.43k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.43k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.40k, False: 33]
  |  |  ------------------
  ------------------
  356|  1.43k|                            KW_NOTATION)) {
  357|  1.40k|      state->handler = notation0;
  358|  1.40k|      return XML_ROLE_NOTATION_NONE;
  359|  1.40k|    }
  360|     33|    break;
  361|  2.23k|  case XML_TOK_PI:
  ------------------
  |  |   76|  2.23k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 2.23k, False: 54.8k]
  ------------------
  362|  2.23k|    return XML_ROLE_PI;
  363|    212|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    212|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 212, False: 56.9k]
  ------------------
  364|    212|    return XML_ROLE_COMMENT;
  365|  4.56k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  4.56k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 4.56k, False: 52.5k]
  ------------------
  366|  4.56k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.08k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.08k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.08k, False: 55.0k]
  ------------------
  368|  2.08k|    state->handler = doctype5;
  369|  2.08k|    return XML_ROLE_DOCTYPE_NONE;
  370|      0|  case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (370:3): [True: 0, False: 57.1k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  57.1k|  }
  373|    112|  return common(state, tok);
  374|  57.1k|}
xmlrole.c:entity0:
  417|  24.0k|        const ENCODING *enc) {
  418|  24.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  24.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  24.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  24.0k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 17, False: 24.0k]
  ------------------
  422|  12.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.0k, False: 12.0k]
  ------------------
  423|  12.0k|    return XML_ROLE_ENTITY_NONE;
  424|  3.74k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  3.74k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 3.74k, False: 20.3k]
  ------------------
  425|  3.74k|    state->handler = entity1;
  426|  3.74k|    return XML_ROLE_ENTITY_NONE;
  427|  8.26k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.26k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 8.26k, False: 15.8k]
  ------------------
  428|  8.26k|    state->handler = entity2;
  429|  8.26k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  24.0k|  }
  431|     17|  return common(state, tok);
  432|  24.0k|}
xmlrole.c:entity1:
  436|  7.48k|        const ENCODING *enc) {
  437|  7.48k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.48k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  7.48k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.48k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  7.48k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.48k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  7.48k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 34, False: 7.44k]
  ------------------
  441|  3.74k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.74k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 3.74k, False: 3.73k]
  ------------------
  442|  3.74k|    return XML_ROLE_ENTITY_NONE;
  443|  3.70k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.70k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 3.70k, False: 3.78k]
  ------------------
  444|  3.70k|    state->handler = entity7;
  445|  3.70k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  7.48k|  }
  447|     34|  return common(state, tok);
  448|  7.48k|}
xmlrole.c:entity7:
  544|  7.36k|        const ENCODING *enc) {
  545|  7.36k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 15, False: 7.34k]
  ------------------
  546|  3.69k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.69k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 3.69k, False: 3.67k]
  ------------------
  547|  3.69k|    return XML_ROLE_ENTITY_NONE;
  548|  1.01k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.01k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.01k, False: 6.35k]
  ------------------
  549|  1.01k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.01k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 576, False: 438]
  |  |  ------------------
  ------------------
  550|    576|      state->handler = entity9;
  551|    576|      return XML_ROLE_ENTITY_NONE;
  552|    576|    }
  553|    438|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    438|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 434, False: 4]
  |  |  ------------------
  ------------------
  554|    434|      state->handler = entity8;
  555|    434|      return XML_ROLE_ENTITY_NONE;
  556|    434|    }
  557|      4|    break;
  558|  2.64k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.64k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.64k, False: 4.72k]
  ------------------
  559|  2.64k|    state->handler = declClose;
  560|  2.64k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.64k|    return XML_ROLE_ENTITY_VALUE;
  562|  7.36k|  }
  563|     19|  return common(state, tok);
  564|  7.36k|}
xmlrole.c:entity9:
  584|  1.99k|        const ENCODING *enc) {
  585|  1.99k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.99k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  1.99k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.99k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  1.99k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.99k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  1.99k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 5, False: 1.99k]
  ------------------
  589|  1.00k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.00k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.00k, False: 998]
  ------------------
  590|  1.00k|    return XML_ROLE_ENTITY_NONE;
  591|    993|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    993|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 993, False: 1.00k]
  ------------------
  592|    993|    state->handler = entity10;
  593|    993|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  1.99k|  }
  595|      5|  return common(state, tok);
  596|  1.99k|}
xmlrole.c:entity10:
  600|  1.55k|         const ENCODING *enc) {
  601|  1.55k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.55k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  1.55k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.55k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  1.55k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.55k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  1.55k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 1, False: 1.55k]
  ------------------
  605|    569|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    569|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 569, False: 989]
  ------------------
  606|    569|    return XML_ROLE_ENTITY_NONE;
  607|    988|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    988|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 988, False: 570]
  ------------------
  608|    988|    setTopLevel(state);
  ------------------
  |  |  116|    988|    ((state)->handler                                                          \
  |  |  117|    988|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 988, False: 0]
  |  |  ------------------
  ------------------
  609|    988|    return XML_ROLE_ENTITY_COMPLETE;
  610|  1.55k|  }
  611|      1|  return common(state, tok);
  612|  1.55k|}
xmlrole.c:entity8:
  568|    865|        const ENCODING *enc) {
  569|    865|  UNUSED_P(ptr);
  ------------------
  |  |  135|    865|#  define UNUSED_P(p) (void)p
  ------------------
  570|    865|  UNUSED_P(end);
  ------------------
  |  |  135|    865|#  define UNUSED_P(p) (void)p
  ------------------
  571|    865|  UNUSED_P(enc);
  ------------------
  |  |  135|    865|#  define UNUSED_P(p) (void)p
  ------------------
  572|    865|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 863]
  ------------------
  573|    433|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    433|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 433, False: 432]
  ------------------
  574|    433|    return XML_ROLE_ENTITY_NONE;
  575|    430|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    430|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 430, False: 435]
  ------------------
  576|    430|    state->handler = entity9;
  577|    430|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|    865|  }
  579|      2|  return common(state, tok);
  580|    865|}
xmlrole.c:declClose:
 1178|  18.0k|          const ENCODING *enc) {
 1179|  18.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  18.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  18.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  18.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  18.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  18.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  18.0k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 111, False: 17.9k]
  ------------------
 1183|  2.37k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.37k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 2.37k, False: 15.6k]
  ------------------
 1184|  2.37k|    return state->role_none;
 1185|  15.5k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  15.5k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 15.5k, False: 2.48k]
  ------------------
 1186|  15.5k|    setTopLevel(state);
  ------------------
  |  |  116|  15.5k|    ((state)->handler                                                          \
  |  |  117|  15.5k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 15.5k, False: 0]
  |  |  ------------------
  ------------------
 1187|  15.5k|    return state->role_none;
 1188|  18.0k|  }
 1189|    111|  return common(state, tok);
 1190|  18.0k|}
xmlrole.c:entity2:
  452|  16.4k|        const ENCODING *enc) {
  453|  16.4k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 6, False: 16.4k]
  ------------------
  454|  8.26k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.26k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 8.26k, False: 8.22k]
  ------------------
  455|  8.26k|    return XML_ROLE_ENTITY_NONE;
  456|  2.37k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.37k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 2.37k, False: 14.1k]
  ------------------
  457|  2.37k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.37k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 866, False: 1.51k]
  |  |  ------------------
  ------------------
  458|    866|      state->handler = entity4;
  459|    866|      return XML_ROLE_ENTITY_NONE;
  460|    866|    }
  461|  1.51k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.51k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.50k, False: 9]
  |  |  ------------------
  ------------------
  462|  1.50k|      state->handler = entity3;
  463|  1.50k|      return XML_ROLE_ENTITY_NONE;
  464|  1.50k|    }
  465|      9|    break;
  466|  5.84k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  5.84k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 5.84k, False: 10.6k]
  ------------------
  467|  5.84k|    state->handler = declClose;
  468|  5.84k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  5.84k|    return XML_ROLE_ENTITY_VALUE;
  470|  16.4k|  }
  471|     15|  return common(state, tok);
  472|  16.4k|}
xmlrole.c:entity4:
  492|  4.69k|        const ENCODING *enc) {
  493|  4.69k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.69k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  4.69k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.69k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  4.69k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.69k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  4.69k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 12, False: 4.67k]
  ------------------
  497|  2.35k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.35k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 2.35k, False: 2.34k]
  ------------------
  498|  2.35k|    return XML_ROLE_ENTITY_NONE;
  499|  2.32k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.32k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 2.32k, False: 2.36k]
  ------------------
  500|  2.32k|    state->handler = entity5;
  501|  2.32k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  4.69k|  }
  503|     12|  return common(state, tok);
  504|  4.69k|}
xmlrole.c:entity5:
  508|  3.69k|        const ENCODING *enc) {
  509|  3.69k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 3.69k]
  ------------------
  510|  1.37k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.37k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.37k, False: 2.32k]
  ------------------
  511|  1.37k|    return XML_ROLE_ENTITY_NONE;
  512|  1.60k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.60k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.60k, False: 2.09k]
  ------------------
  513|  1.60k|    setTopLevel(state);
  ------------------
  |  |  116|  1.60k|    ((state)->handler                                                          \
  |  |  117|  1.60k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.60k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.60k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    714|  case XML_TOK_NAME:
  ------------------
  |  |   85|    714|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 714, False: 2.98k]
  ------------------
  516|    714|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    714|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 711, False: 3]
  |  |  ------------------
  ------------------
  517|    711|      state->handler = entity6;
  518|    711|      return XML_ROLE_ENTITY_NONE;
  519|    711|    }
  520|      3|    break;
  521|  3.69k|  }
  522|      4|  return common(state, tok);
  523|  3.69k|}
xmlrole.c:entity6:
  527|  1.41k|        const ENCODING *enc) {
  528|  1.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.41k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 1, False: 1.41k]
  ------------------
  532|    711|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    711|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 711, False: 708]
  ------------------
  533|    711|    return XML_ROLE_ENTITY_NONE;
  534|    707|  case XML_TOK_NAME:
  ------------------
  |  |   85|    707|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 707, False: 712]
  ------------------
  535|    707|    state->handler = declClose;
  536|    707|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    707|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.41k|  }
  539|      1|  return common(state, tok);
  540|  1.41k|}
xmlrole.c:entity3:
  476|  2.99k|        const ENCODING *enc) {
  477|  2.99k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.99k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.99k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.99k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 3, False: 2.99k]
  ------------------
  481|  1.50k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.50k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.50k, False: 1.49k]
  ------------------
  482|  1.50k|    return XML_ROLE_ENTITY_NONE;
  483|  1.49k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.49k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.49k, False: 1.50k]
  ------------------
  484|  1.49k|    state->handler = entity4;
  485|  1.49k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.99k|  }
  487|      3|  return common(state, tok);
  488|  2.99k|}
xmlrole.c:attlist0:
  705|  33.9k|         const ENCODING *enc) {
  706|  33.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  33.9k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  33.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  33.9k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  33.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  33.9k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  33.9k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 11, False: 33.9k]
  ------------------
  710|  17.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  17.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 17.0k, False: 16.9k]
  ------------------
  711|  17.0k|    return XML_ROLE_ATTLIST_NONE;
  712|  16.9k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  16.9k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 16.9k, False: 17.0k]
  ------------------
  713|  16.9k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  16.9k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 33.9k]
  ------------------
  714|  16.9k|    state->handler = attlist1;
  715|  16.9k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  33.9k|  }
  717|     11|  return common(state, tok);
  718|  33.9k|}
xmlrole.c:attlist1:
  722|   114k|         const ENCODING *enc) {
  723|   114k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   114k|#  define UNUSED_P(p) (void)p
  ------------------
  724|   114k|  UNUSED_P(end);
  ------------------
  |  |  135|   114k|#  define UNUSED_P(p) (void)p
  ------------------
  725|   114k|  UNUSED_P(enc);
  ------------------
  |  |  135|   114k|#  define UNUSED_P(p) (void)p
  ------------------
  726|   114k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 38, False: 114k]
  ------------------
  727|  49.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  49.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 49.0k, False: 65.0k]
  ------------------
  728|  49.0k|    return XML_ROLE_ATTLIST_NONE;
  729|  16.2k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  16.2k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 16.2k, False: 97.8k]
  ------------------
  730|  16.2k|    setTopLevel(state);
  ------------------
  |  |  116|  16.2k|    ((state)->handler                                                          \
  |  |  117|  16.2k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 16.2k, False: 0]
  |  |  ------------------
  ------------------
  731|  16.2k|    return XML_ROLE_ATTLIST_NONE;
  732|  48.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  48.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 48.7k, False: 65.3k]
  ------------------
  733|  48.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  48.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 114k]
  ------------------
  734|  48.7k|    state->handler = attlist2;
  735|  48.7k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|   114k|  }
  737|     38|  return common(state, tok);
  738|   114k|}
xmlrole.c:attlist2:
  742|  97.4k|         const ENCODING *enc) {
  743|  97.4k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 17, False: 97.4k]
  ------------------
  744|  48.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  48.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 48.7k, False: 48.6k]
  ------------------
  745|  48.7k|    return XML_ROLE_ATTLIST_NONE;
  746|  18.4k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  18.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 18.4k, False: 78.9k]
  ------------------
  747|  18.4k|    static const char *const types[] = {
  748|  18.4k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  18.4k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  18.4k|    };
  751|  18.4k|    int i;
  752|  83.5k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 83.1k, False: 418]
  ------------------
  753|  83.1k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  83.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 18.0k, False: 65.0k]
  |  |  ------------------
  ------------------
  754|  18.0k|        state->handler = attlist8;
  755|  18.0k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  18.0k|      }
  757|  18.4k|  }
  758|    418|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    418|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 385, False: 33]
  |  |  ------------------
  ------------------
  759|    385|      state->handler = attlist5;
  760|    385|      return XML_ROLE_ATTLIST_NONE;
  761|    385|    }
  762|     33|    break;
  763|  30.2k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  30.2k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 30.2k, False: 67.2k]
  ------------------
  764|  30.2k|    state->handler = attlist3;
  765|  30.2k|    return XML_ROLE_ATTLIST_NONE;
  766|  97.4k|  }
  767|     50|  return common(state, tok);
  768|  97.4k|}
xmlrole.c:attlist8:
  861|  96.7k|         const ENCODING *enc) {
  862|  96.7k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 19, False: 96.7k]
  ------------------
  863|  48.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  48.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 48.4k, False: 48.3k]
  ------------------
  864|  48.4k|    return XML_ROLE_ATTLIST_NONE;
  865|  32.3k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  32.3k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 32.3k, False: 64.4k]
  ------------------
  866|  32.3k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  32.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 30.6k, False: 1.65k]
  |  |  ------------------
  ------------------
  867|  32.3k|                            KW_IMPLIED)) {
  868|  30.6k|      state->handler = attlist1;
  869|  30.6k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  30.6k|    }
  871|  1.65k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.65k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 860, False: 799]
  |  |  ------------------
  ------------------
  872|  1.65k|                            KW_REQUIRED)) {
  873|    860|      state->handler = attlist1;
  874|    860|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|    860|    }
  876|    799|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    799|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 788, False: 11]
  |  |  ------------------
  ------------------
  877|    799|                            KW_FIXED)) {
  878|    788|      state->handler = attlist9;
  879|    788|      return XML_ROLE_ATTLIST_NONE;
  880|    788|    }
  881|     11|    break;
  882|  15.9k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  15.9k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 15.9k, False: 80.7k]
  ------------------
  883|  15.9k|    state->handler = attlist1;
  884|  15.9k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  96.7k|  }
  886|     30|  return common(state, tok);
  887|  96.7k|}
xmlrole.c:attlist9:
  891|  1.56k|         const ENCODING *enc) {
  892|  1.56k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.56k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  1.56k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.56k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  1.56k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.56k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  1.56k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 12, False: 1.55k]
  ------------------
  896|    788|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    788|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 788, False: 775]
  ------------------
  897|    788|    return XML_ROLE_ATTLIST_NONE;
  898|    763|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    763|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 763, False: 800]
  ------------------
  899|    763|    state->handler = attlist1;
  900|    763|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  1.56k|  }
  902|     12|  return common(state, tok);
  903|  1.56k|}
xmlrole.c:attlist5:
  809|    767|         const ENCODING *enc) {
  810|    767|  UNUSED_P(ptr);
  ------------------
  |  |  135|    767|#  define UNUSED_P(p) (void)p
  ------------------
  811|    767|  UNUSED_P(end);
  ------------------
  |  |  135|    767|#  define UNUSED_P(p) (void)p
  ------------------
  812|    767|  UNUSED_P(enc);
  ------------------
  |  |  135|    767|#  define UNUSED_P(p) (void)p
  ------------------
  813|    767|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 766]
  ------------------
  814|    384|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    384|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 384, False: 383]
  ------------------
  815|    384|    return XML_ROLE_ATTLIST_NONE;
  816|    382|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    382|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 382, False: 385]
  ------------------
  817|    382|    state->handler = attlist6;
  818|    382|    return XML_ROLE_ATTLIST_NONE;
  819|    767|  }
  820|      1|  return common(state, tok);
  821|    767|}
xmlrole.c:attlist6:
  825|  1.82k|         const ENCODING *enc) {
  826|  1.82k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.82k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.82k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.82k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.82k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.82k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.82k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 7, False: 1.81k]
  ------------------
  830|    490|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    490|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 490, False: 1.33k]
  ------------------
  831|    490|    return XML_ROLE_ATTLIST_NONE;
  832|  1.32k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.32k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 1.32k, False: 497]
  ------------------
  833|  1.32k|    state->handler = attlist7;
  834|  1.32k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.82k|  }
  836|      7|  return common(state, tok);
  837|  1.82k|}
xmlrole.c:attlist7:
  841|  1.67k|         const ENCODING *enc) {
  842|  1.67k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.67k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.67k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.67k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 5, False: 1.67k]
  ------------------
  846|    357|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    357|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 357, False: 1.31k]
  ------------------
  847|    357|    return XML_ROLE_ATTLIST_NONE;
  848|    347|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    347|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 347, False: 1.32k]
  ------------------
  849|    347|    state->handler = attlist8;
  850|    347|    return XML_ROLE_ATTLIST_NONE;
  851|    967|  case XML_TOK_OR:
  ------------------
  |  |   88|    967|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 967, False: 709]
  ------------------
  852|    967|    state->handler = attlist6;
  853|    967|    return XML_ROLE_ATTLIST_NONE;
  854|  1.67k|  }
  855|      5|  return common(state, tok);
  856|  1.67k|}
xmlrole.c:attlist3:
  772|  36.1k|         const ENCODING *enc) {
  773|  36.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  36.1k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  36.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  36.1k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  36.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  36.1k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  36.1k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 7, False: 36.1k]
  ------------------
  777|  1.06k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.06k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 1.06k, False: 35.0k]
  ------------------
  778|  1.06k|    return XML_ROLE_ATTLIST_NONE;
  779|  3.63k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  3.63k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 3.63k, False: 32.5k]
  ------------------
  780|  35.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  35.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 31.4k, False: 4.70k]
  ------------------
  781|  35.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  35.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 36.1k]
  ------------------
  782|  35.0k|    state->handler = attlist4;
  783|  35.0k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  36.1k|  }
  785|      7|  return common(state, tok);
  786|  36.1k|}
xmlrole.c:attlist4:
  790|  36.3k|         const ENCODING *enc) {
  791|  36.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  36.3k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  36.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  36.3k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  36.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  36.3k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  36.3k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 9, False: 36.3k]
  ------------------
  795|  1.27k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.27k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 1.27k, False: 35.0k]
  ------------------
  796|  1.27k|    return XML_ROLE_ATTLIST_NONE;
  797|  30.0k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  30.0k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 30.0k, False: 6.26k]
  ------------------
  798|  30.0k|    state->handler = attlist8;
  799|  30.0k|    return XML_ROLE_ATTLIST_NONE;
  800|  4.97k|  case XML_TOK_OR:
  ------------------
  |  |   88|  4.97k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 4.97k, False: 31.3k]
  ------------------
  801|  4.97k|    state->handler = attlist3;
  802|  4.97k|    return XML_ROLE_ATTLIST_NONE;
  803|  36.3k|  }
  804|      9|  return common(state, tok);
  805|  36.3k|}
xmlrole.c:element0:
  907|  13.2k|         const ENCODING *enc) {
  908|  13.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  13.2k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  13.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  13.2k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  13.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  13.2k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  13.2k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 5, False: 13.2k]
  ------------------
  912|  6.64k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.64k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 6.64k, False: 6.63k]
  ------------------
  913|  6.64k|    return XML_ROLE_ELEMENT_NONE;
  914|  6.63k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.63k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 6.63k, False: 6.64k]
  ------------------
  915|  6.63k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.63k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 13.2k]
  ------------------
  916|  6.63k|    state->handler = element1;
  917|  6.63k|    return XML_ROLE_ELEMENT_NAME;
  918|  13.2k|  }
  919|      5|  return common(state, tok);
  920|  13.2k|}
xmlrole.c:element1:
  924|  13.2k|         const ENCODING *enc) {
  925|  13.2k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 6, False: 13.2k]
  ------------------
  926|  6.63k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.63k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 6.63k, False: 6.63k]
  ------------------
  927|  6.63k|    return XML_ROLE_ELEMENT_NONE;
  928|    454|  case XML_TOK_NAME:
  ------------------
  |  |   85|    454|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 454, False: 12.8k]
  ------------------
  929|    454|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    454|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 425, False: 29]
  |  |  ------------------
  ------------------
  930|    425|      state->handler = declClose;
  931|    425|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|    425|      return XML_ROLE_CONTENT_EMPTY;
  933|    425|    }
  934|     29|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     29|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 25, False: 4]
  |  |  ------------------
  ------------------
  935|     25|      state->handler = declClose;
  936|     25|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     25|      return XML_ROLE_CONTENT_ANY;
  938|     25|    }
  939|      4|    break;
  940|  6.17k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  6.17k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 6.17k, False: 7.09k]
  ------------------
  941|  6.17k|    state->handler = element2;
  942|  6.17k|    state->level = 1;
  943|  6.17k|    return XML_ROLE_GROUP_OPEN;
  944|  13.2k|  }
  945|     10|  return common(state, tok);
  946|  13.2k|}
xmlrole.c:element2:
  950|  6.98k|         const ENCODING *enc) {
  951|  6.98k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 1, False: 6.98k]
  ------------------
  952|    829|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    829|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 829, False: 6.15k]
  ------------------
  953|    829|    return XML_ROLE_ELEMENT_NONE;
  954|  2.61k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  2.61k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 2.61k, False: 4.37k]
  ------------------
  955|  2.61k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.61k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.60k, False: 10]
  |  |  ------------------
  ------------------
  956|  2.61k|                            KW_PCDATA)) {
  957|  2.60k|      state->handler = element3;
  958|  2.60k|      return XML_ROLE_CONTENT_PCDATA;
  959|  2.60k|    }
  960|     10|    break;
  961|    687|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    687|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 687, False: 6.30k]
  ------------------
  962|    687|    state->level = 2;
  963|    687|    state->handler = element6;
  964|    687|    return XML_ROLE_GROUP_OPEN;
  965|  1.72k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.72k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 1.72k, False: 5.26k]
  ------------------
  966|  1.72k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.72k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 6.98k]
  ------------------
  967|  1.72k|    state->handler = element7;
  968|  1.72k|    return XML_ROLE_CONTENT_ELEMENT;
  969|     31|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|     31|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 31, False: 6.95k]
  ------------------
  970|     31|    state->handler = element7;
  971|     31|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    662|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    662|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 662, False: 6.32k]
  ------------------
  973|    662|    state->handler = element7;
  974|    662|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    441|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    441|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 441, False: 6.54k]
  ------------------
  976|    441|    state->handler = element7;
  977|    441|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  6.98k|  }
  979|     11|  return common(state, tok);
  980|  6.98k|}
xmlrole.c:element3:
  984|  3.28k|         const ENCODING *enc) {
  985|  3.28k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.28k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  3.28k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.28k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  3.28k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.28k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  3.28k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 4, False: 3.28k]
  ------------------
  989|    688|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    688|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 688, False: 2.60k]
  ------------------
  990|    688|    return XML_ROLE_ELEMENT_NONE;
  991|  1.12k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.12k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 1.12k, False: 2.16k]
  ------------------
  992|  1.12k|    state->handler = declClose;
  993|  1.12k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|  1.12k|    return XML_ROLE_GROUP_CLOSE;
  995|    346|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    346|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 346, False: 2.94k]
  ------------------
  996|    346|    state->handler = declClose;
  997|    346|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    346|    return XML_ROLE_GROUP_CLOSE_REP;
  999|  1.12k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.12k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 1.12k, False: 2.16k]
  ------------------
 1000|  1.12k|    state->handler = element4;
 1001|  1.12k|    return XML_ROLE_ELEMENT_NONE;
 1002|  3.28k|  }
 1003|      4|  return common(state, tok);
 1004|  3.28k|}
xmlrole.c:element4:
 1008|  2.54k|         const ENCODING *enc) {
 1009|  2.54k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.54k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  2.54k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.54k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  2.54k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.54k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  2.54k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 15, False: 2.53k]
  ------------------
 1013|    402|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    402|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 402, False: 2.14k]
  ------------------
 1014|    402|    return XML_ROLE_ELEMENT_NONE;
 1015|  2.13k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.13k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 2.13k, False: 417]
  ------------------
 1016|  2.13k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  2.13k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 2.54k]
  ------------------
 1017|  2.13k|    state->handler = element5;
 1018|  2.13k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  2.54k|  }
 1020|     15|  return common(state, tok);
 1021|  2.54k|}
xmlrole.c:element5:
 1025|  2.61k|         const ENCODING *enc) {
 1026|  2.61k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.61k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  2.61k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.61k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  2.61k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.61k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  2.61k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 2, False: 2.61k]
  ------------------
 1030|    485|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    485|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 485, False: 2.12k]
  ------------------
 1031|    485|    return XML_ROLE_ELEMENT_NONE;
 1032|  1.07k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.07k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 1.07k, False: 1.53k]
  ------------------
 1033|  1.07k|    state->handler = declClose;
 1034|  1.07k|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|  1.07k|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|  1.05k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.05k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 1.05k, False: 1.56k]
  ------------------
 1037|  1.05k|    state->handler = element4;
 1038|  1.05k|    return XML_ROLE_ELEMENT_NONE;
 1039|  2.61k|  }
 1040|      2|  return common(state, tok);
 1041|  2.61k|}
xmlrole.c:element6:
 1045|  4.20M|         const ENCODING *enc) {
 1046|  4.20M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.20M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.20M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.20M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.20M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.20M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.20M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 52, False: 4.20M]
  ------------------
 1050|   106k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|   106k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 106k, False: 4.10M]
  ------------------
 1051|   106k|    return XML_ROLE_ELEMENT_NONE;
 1052|  3.85M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.85M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 3.85M, False: 352k]
  ------------------
 1053|  3.85M|    state->level += 1;
 1054|  3.85M|    return XML_ROLE_GROUP_OPEN;
 1055|   243k|  case XML_TOK_NAME:
  ------------------
  |  |   85|   243k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 243k, False: 3.96M]
  ------------------
 1056|   243k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|   243k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.20M]
  ------------------
 1057|   243k|    state->handler = element7;
 1058|   243k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  1.15k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  1.15k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 1.15k, False: 4.20M]
  ------------------
 1060|  1.15k|    state->handler = element7;
 1061|  1.15k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|  1.36k|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|  1.36k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 1.36k, False: 4.20M]
  ------------------
 1063|  1.36k|    state->handler = element7;
 1064|  1.36k|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|    994|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    994|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 994, False: 4.20M]
  ------------------
 1066|    994|    state->handler = element7;
 1067|    994|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.20M|  }
 1069|     52|  return common(state, tok);
 1070|  4.20M|}
xmlrole.c:element7:
 1074|   654k|         const ENCODING *enc) {
 1075|   654k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   654k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   654k|  UNUSED_P(end);
  ------------------
  |  |  135|   654k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   654k|  UNUSED_P(enc);
  ------------------
  |  |  135|   654k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   654k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 48, False: 654k]
  ------------------
 1079|  3.93k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.93k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 3.93k, False: 650k]
  ------------------
 1080|  3.93k|    return XML_ROLE_ELEMENT_NONE;
 1081|   245k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|   245k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 245k, False: 409k]
  ------------------
 1082|   245k|    state->level -= 1;
 1083|   245k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.74k, False: 243k]
  ------------------
 1084|  1.74k|      state->handler = declClose;
 1085|  1.74k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.74k|    }
 1087|   245k|    return XML_ROLE_GROUP_CLOSE;
 1088|  44.1k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  44.1k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 44.1k, False: 610k]
  ------------------
 1089|  44.1k|    state->level -= 1;
 1090|  44.1k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 629, False: 43.4k]
  ------------------
 1091|    629|      state->handler = declClose;
 1092|    629|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    629|    }
 1094|  44.1k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  33.4k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  33.4k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 33.4k, False: 621k]
  ------------------
 1096|  33.4k|    state->level -= 1;
 1097|  33.4k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 462, False: 32.9k]
  ------------------
 1098|    462|      state->handler = declClose;
 1099|    462|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    462|    }
 1101|  33.4k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  81.4k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  81.4k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 81.4k, False: 573k]
  ------------------
 1103|  81.4k|    state->level -= 1;
 1104|  81.4k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 295, False: 81.1k]
  ------------------
 1105|    295|      state->handler = declClose;
 1106|    295|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    295|    }
 1108|  81.4k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|   241k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|   241k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 241k, False: 412k]
  ------------------
 1110|   241k|    state->handler = element6;
 1111|   241k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  4.51k|  case XML_TOK_OR:
  ------------------
  |  |   88|  4.51k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 4.51k, False: 649k]
  ------------------
 1113|  4.51k|    state->handler = element6;
 1114|  4.51k|    return XML_ROLE_GROUP_CHOICE;
 1115|   654k|  }
 1116|     48|  return common(state, tok);
 1117|   654k|}
xmlrole.c:notation0:
  616|  2.78k|          const ENCODING *enc) {
  617|  2.78k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.78k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  2.78k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.78k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  2.78k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.78k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  2.78k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 3, False: 2.78k]
  ------------------
  621|  1.40k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.40k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.40k, False: 1.38k]
  ------------------
  622|  1.40k|    return XML_ROLE_NOTATION_NONE;
  623|  1.38k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.38k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.38k, False: 1.40k]
  ------------------
  624|  1.38k|    state->handler = notation1;
  625|  1.38k|    return XML_ROLE_NOTATION_NAME;
  626|  2.78k|  }
  627|      3|  return common(state, tok);
  628|  2.78k|}
xmlrole.c:notation1:
  632|  2.75k|          const ENCODING *enc) {
  633|  2.75k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 7, False: 2.74k]
  ------------------
  634|  1.38k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.38k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.38k, False: 1.37k]
  ------------------
  635|  1.38k|    return XML_ROLE_NOTATION_NONE;
  636|  1.36k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.36k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.36k, False: 1.38k]
  ------------------
  637|  1.36k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.36k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 133, False: 1.23k]
  |  |  ------------------
  ------------------
  638|    133|      state->handler = notation3;
  639|    133|      return XML_ROLE_NOTATION_NONE;
  640|    133|    }
  641|  1.23k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.23k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.23k, False: 4]
  |  |  ------------------
  ------------------
  642|  1.23k|      state->handler = notation2;
  643|  1.23k|      return XML_ROLE_NOTATION_NONE;
  644|  1.23k|    }
  645|      4|    break;
  646|  2.75k|  }
  647|     11|  return common(state, tok);
  648|  2.75k|}
xmlrole.c:notation3:
  668|    260|          const ENCODING *enc) {
  669|    260|  UNUSED_P(ptr);
  ------------------
  |  |  135|    260|#  define UNUSED_P(p) (void)p
  ------------------
  670|    260|  UNUSED_P(end);
  ------------------
  |  |  135|    260|#  define UNUSED_P(p) (void)p
  ------------------
  671|    260|  UNUSED_P(enc);
  ------------------
  |  |  135|    260|#  define UNUSED_P(p) (void)p
  ------------------
  672|    260|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 258]
  ------------------
  673|    132|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    132|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 132, False: 128]
  ------------------
  674|    132|    return XML_ROLE_NOTATION_NONE;
  675|    126|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    126|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 126, False: 134]
  ------------------
  676|    126|    state->handler = declClose;
  677|    126|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    126|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    260|  }
  680|      2|  return common(state, tok);
  681|    260|}
xmlrole.c:notation2:
  652|  2.45k|          const ENCODING *enc) {
  653|  2.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.45k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.45k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.45k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.45k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 2, False: 2.45k]
  ------------------
  657|  1.23k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.23k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.23k, False: 1.22k]
  ------------------
  658|  1.23k|    return XML_ROLE_NOTATION_NONE;
  659|  1.22k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.22k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.22k, False: 1.23k]
  ------------------
  660|  1.22k|    state->handler = notation4;
  661|  1.22k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.45k|  }
  663|      2|  return common(state, tok);
  664|  2.45k|}
xmlrole.c:notation4:
  685|  1.68k|          const ENCODING *enc) {
  686|  1.68k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.68k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  1.68k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.68k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  1.68k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.68k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  1.68k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 2, False: 1.68k]
  ------------------
  690|    472|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    472|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 472, False: 1.21k]
  ------------------
  691|    472|    return XML_ROLE_NOTATION_NONE;
  692|    447|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    447|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 447, False: 1.23k]
  ------------------
  693|    447|    state->handler = declClose;
  694|    447|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    447|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    763|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    763|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 763, False: 921]
  ------------------
  697|    763|    setTopLevel(state);
  ------------------
  |  |  116|    763|    ((state)->handler                                                          \
  |  |  117|    763|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 763, False: 0]
  |  |  ------------------
  ------------------
  698|    763|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  1.68k|  }
  700|      2|  return common(state, tok);
  701|  1.68k|}
xmlrole.c:doctype5:
  319|  2.13k|         const ENCODING *enc) {
  320|  2.13k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.13k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.13k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.13k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 5, False: 2.13k]
  ------------------
  324|     54|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     54|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 54, False: 2.08k]
  ------------------
  325|     54|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.07k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.07k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.07k, False: 59]
  ------------------
  327|  2.07k|    state->handler = prolog2;
  328|  2.07k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.13k|  }
  330|      5|  return common(state, tok);
  331|  2.13k|}
xmlrole.c:prolog2:
  205|  2.99k|        const ENCODING *enc) {
  206|  2.99k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  2.99k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  2.99k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.99k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  2.99k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 20, False: 2.97k]
  ------------------
  210|    406|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    406|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 406, False: 2.58k]
  ------------------
  211|    406|    return XML_ROLE_NONE;
  212|    296|  case XML_TOK_PI:
  ------------------
  |  |   76|    296|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 296, False: 2.69k]
  ------------------
  213|    296|    return XML_ROLE_PI;
  214|    199|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    199|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 199, False: 2.79k]
  ------------------
  215|    199|    return XML_ROLE_COMMENT;
  216|  2.07k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.07k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.07k, False: 921]
  ------------------
  217|  2.07k|    state->handler = error;
  218|  2.07k|    return XML_ROLE_INSTANCE_START;
  219|  2.99k|  }
  220|     20|  return common(state, tok);
  221|  2.99k|}
xmlrole.c:doctype3:
  284|    510|         const ENCODING *enc) {
  285|    510|  UNUSED_P(ptr);
  ------------------
  |  |  135|    510|#  define UNUSED_P(p) (void)p
  ------------------
  286|    510|  UNUSED_P(end);
  ------------------
  |  |  135|    510|#  define UNUSED_P(p) (void)p
  ------------------
  287|    510|  UNUSED_P(enc);
  ------------------
  |  |  135|    510|#  define UNUSED_P(p) (void)p
  ------------------
  288|    510|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 162, False: 348]
  ------------------
  289|    313|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    313|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 313, False: 197]
  ------------------
  290|    313|    return XML_ROLE_DOCTYPE_NONE;
  291|     35|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     35|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 35, False: 475]
  ------------------
  292|     35|    state->handler = doctype4;
  293|     35|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    510|  }
  295|    162|  return common(state, tok);
  296|    510|}
xmlrole.c:doctype4:
  300|     44|         const ENCODING *enc) {
  301|     44|  UNUSED_P(ptr);
  ------------------
  |  |  135|     44|#  define UNUSED_P(p) (void)p
  ------------------
  302|     44|  UNUSED_P(end);
  ------------------
  |  |  135|     44|#  define UNUSED_P(p) (void)p
  ------------------
  303|     44|  UNUSED_P(enc);
  ------------------
  |  |  135|     44|#  define UNUSED_P(p) (void)p
  ------------------
  304|     44|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 34]
  ------------------
  305|     23|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     23|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 23, False: 21]
  ------------------
  306|     23|    return XML_ROLE_DOCTYPE_NONE;
  307|      8|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|      8|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 8, False: 36]
  ------------------
  308|      8|    state->handler = internalSubset;
  309|      8|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|      3|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|      3|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 3, False: 41]
  ------------------
  311|      3|    state->handler = prolog2;
  312|      3|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     44|  }
  314|     10|  return common(state, tok);
  315|     44|}
xmlrole.c:doctype2:
  268|  1.41k|         const ENCODING *enc) {
  269|  1.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.41k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 10, False: 1.40k]
  ------------------
  273|    711|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    711|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 711, False: 704]
  ------------------
  274|    711|    return XML_ROLE_DOCTYPE_NONE;
  275|    694|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    694|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 694, False: 721]
  ------------------
  276|    694|    state->handler = doctype3;
  277|    694|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.41k|  }
  279|     10|  return common(state, tok);
  280|  1.41k|}
xmlrole.c:common:
 1225|  1.32k|common(PROLOG_STATE *state, int tok) {
 1226|  1.32k|#ifdef XML_DTD
 1227|  1.32k|  if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
  ------------------
  |  |   95|      0|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (1227:7): [True: 0, False: 1.32k]
  |  Branch (1227:34): [True: 0, False: 0]
  ------------------
 1228|      0|    return XML_ROLE_INNER_PARAM_ENTITY_REF;
 1229|       |#else
 1230|       |  UNUSED_P(tok);
 1231|       |#endif
 1232|  1.32k|  state->handler = error;
 1233|  1.32k|  return XML_ROLE_ERROR;
 1234|  1.32k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  38.1M|                                           const char **fromLimRef) {
  328|  38.1M|  const char *fromLim = *fromLimRef;
  329|  38.1M|  size_t walked = 0;
  330|  56.3M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 56.3M, False: 6.01k]
  ------------------
  331|  56.3M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  56.3M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 44.9k, False: 56.2M]
  ------------------
  333|  56.3M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|  44.9k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 44.4k, False: 413]
  ------------------
  335|  44.4k|        fromLim += 4 - 1;
  336|  44.4k|        break;
  337|  44.4k|      } else {
  338|    413|        walked = 0;
  339|    413|      }
  340|  56.2M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 1.58M, False: 54.7M]
  ------------------
  341|  56.2M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  1.58M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 1.58M, False: 1.14k]
  ------------------
  343|  1.58M|        fromLim += 3 - 1;
  344|  1.58M|        break;
  345|  1.58M|      } else {
  346|  1.14k|        walked = 0;
  347|  1.14k|      }
  348|  54.7M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 14.8M, False: 39.8M]
  ------------------
  349|  54.7M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  14.8M|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 14.8M, False: 252]
  ------------------
  351|  14.8M|        fromLim += 2 - 1;
  352|  14.8M|        break;
  353|  14.8M|      } else {
  354|    252|        walked = 0;
  355|    252|      }
  356|  39.8M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 21.6M, False: 18.1M]
  ------------------
  357|  39.8M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  21.6M|      break;
  359|  21.6M|    }
  360|  56.3M|  }
  361|  38.1M|  *fromLimRef = fromLim;
  362|  38.1M|}
XmlUtf8Encode:
 1255|  27.0k|XmlUtf8Encode(int c, char *buf) {
 1256|  27.0k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  27.0k|    min2 = 0x80,
 1259|  27.0k|    min3 = 0x800,
 1260|  27.0k|    min4 = 0x10000
 1261|  27.0k|  };
 1262|       |
 1263|  27.0k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 27.0k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  27.0k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 11.6k, False: 15.3k]
  ------------------
 1266|  11.6k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  11.6k|    return 1;
 1268|  11.6k|  }
 1269|  15.3k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 4.94k, False: 10.4k]
  ------------------
 1270|  4.94k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  4.94k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  4.94k|    return 2;
 1273|  4.94k|  }
 1274|  10.4k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 9.55k, False: 897]
  ------------------
 1275|  9.55k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  9.55k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  9.55k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  9.55k|    return 3;
 1279|  9.55k|  }
 1280|    897|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 897, False: 0]
  ------------------
 1281|    897|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|    897|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|    897|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|    897|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|    897|    return 4;
 1286|    897|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|    897|}
xmltok.c:checkCharRefNumber:
 1231|  36.2k|checkCharRefNumber(int result) {
 1232|  36.2k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 19.7k, False: 16.4k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 36.2k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 36.2k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 36.2k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 36.2k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 36.2k]
  ------------------
 1238|     27|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 12, False: 36.2k]
  ------------------
 1239|     30|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 36.2k]
  ------------------
 1240|     33|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 36.2k]
  ------------------
 1241|     33|    return -1;
 1242|  15.1k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 15.1k, False: 21.0k]
  ------------------
 1243|  15.1k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 123, False: 15.0k]
  ------------------
 1244|    123|      return -1;
 1245|  15.0k|    break;
 1246|  15.0k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.28k, False: 34.9k]
  ------------------
 1247|  1.28k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 1.28k]
  |  Branch (1247:29): [True: 8, False: 1.27k]
  ------------------
 1248|     11|      return -1;
 1249|  1.27k|    break;
 1250|  36.2k|  }
 1251|  36.0k|  return result;
 1252|  36.2k|}
xmltok.c:utf8_toUtf8:
  366|  38.1M|            char **toP, const char *toLim) {
  367|  38.1M|  bool input_incomplete = false;
  368|  38.1M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  38.1M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  38.1M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  38.1M|  UNUSED_P(enc);
  ------------------
  |  |  135|  38.1M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  38.1M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 13.5k, False: 38.1M]
  ------------------
  375|  13.5k|    fromLim = *fromP + bytesStorable;
  376|  13.5k|    output_exhausted = true;
  377|  13.5k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  38.1M|  {
  381|  38.1M|    const char *const fromLimBefore = fromLim;
  382|  38.1M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  38.1M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.81k, False: 38.1M]
  ------------------
  384|  1.81k|      input_incomplete = true;
  385|  1.81k|    }
  386|  38.1M|  }
  387|       |
  388|  38.1M|  {
  389|  38.1M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  38.1M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  38.1M|    *fromP += bytesToCopy;
  392|  38.1M|    *toP += bytesToCopy;
  393|  38.1M|  }
  394|       |
  395|  38.1M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 13.5k, False: 38.1M]
  ------------------
  396|  13.5k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  38.1M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 38.1M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  38.1M|  else
  400|  38.1M|    return XML_CONVERT_COMPLETED;
  401|  38.1M|}
xmltok.c:utf8_isName2:
  140|  4.36k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  4.36k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.36k|#  define UNUSED_P(p) (void)p
  ------------------
  142|  4.36k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  4.36k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  4.36k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  4.36k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  4.36k|}
xmltok.c:utf8_isName3:
  146|  1.30M|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  1.30M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.30M|#  define UNUSED_P(p) (void)p
  ------------------
  148|  1.30M|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  1.30M|  (namingBitmap                                                                \
  |  |   97|  1.30M|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  1.30M|         << 3)                                                                 \
  |  |   99|  1.30M|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  1.30M|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  1.30M|}
xmltok.c:isNever:
  133|     97|isNever(const ENCODING *enc, const char *p) {
  134|     97|  UNUSED_P(enc);
  ------------------
  |  |  135|     97|#  define UNUSED_P(p) (void)p
  ------------------
  135|     97|  UNUSED_P(p);
  ------------------
  |  |  135|     97|#  define UNUSED_P(p) (void)p
  ------------------
  136|     97|  return 0;
  137|     97|}
xmltok.c:utf8_isNmstrt2:
  154|  5.45k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|  5.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.45k|#  define UNUSED_P(p) (void)p
  ------------------
  156|  5.45k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|  5.45k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  5.45k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  5.45k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|  5.45k|}
xmltok.c:utf8_isNmstrt3:
  160|  5.54k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  5.54k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.54k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  5.54k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  5.54k|  (namingBitmap                                                                \
  |  |   97|  5.54k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  5.54k|         << 3)                                                                 \
  |  |   99|  5.54k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  5.54k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  5.54k|}
xmltok.c:utf8_isInvalid2:
  168|   813k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   813k|  UNUSED_P(enc);
  ------------------
  |  |  135|   813k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   813k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   813k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 29, False: 813k]
  |  |  |  Branch (113:19): [True: 92, False: 813k]
  |  |  |  Branch (113:43): [True: 82, False: 813k]
  |  |  ------------------
  ------------------
  171|   813k|}
xmltok.c:utf8_isInvalid3:
  174|  22.8M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  22.8M|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.8M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  22.8M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  22.8M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 66, False: 22.8M]
  |  |  ------------------
  |  |  117|  22.8M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 56, False: 22.8M]
  |  |  |  Branch (117:8): [True: 340k, False: 22.5M]
  |  |  |  Branch (117:24): [True: 6.01k, False: 334k]
  |  |  ------------------
  |  |  118|  22.8M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  22.8M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 39, False: 22.8M]
  |  |  |  Branch (119:8): [True: 1.61M, False: 21.2M]
  |  |  ------------------
  |  |  120|  22.8M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 11, False: 1.61M]
  |  |  |  Branch (120:31): [True: 7, False: 1.61M]
  |  |  ------------------
  |  |  121|  22.8M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 11, False: 21.2M]
  |  |  ------------------
  |  |  122|  21.2M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 10, False: 21.2M]
  |  |  |  Branch (122:22): [True: 158k, False: 21.1M]
  |  |  ------------------
  ------------------
  177|  22.8M|}
xmltok.c:utf8_isInvalid4:
  180|   121k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|   121k|  UNUSED_P(enc);
  ------------------
  |  |  135|   121k|#  define UNUSED_P(p) (void)p
  ------------------
  182|   121k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|   121k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 125, False: 120k]
  |  |  |  Branch (125:28): [True: 75, False: 120k]
  |  |  |  Branch (125:55): [True: 7, False: 120k]
  |  |  ------------------
  |  |  126|   121k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 20, False: 120k]
  |  |  ------------------
  |  |  127|   121k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 51, False: 120k]
  |  |  |  Branch (127:8): [True: 11.1k, False: 109k]
  |  |  ------------------
  |  |  128|   120k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 15, False: 11.0k]
  |  |  |  Branch (128:31): [True: 7, False: 11.0k]
  |  |  ------------------
  |  |  129|   120k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 4, False: 109k]
  |  |  ------------------
  |  |  130|   109k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 25, False: 109k]
  |  |  |  Branch (130:22): [True: 14.0k, False: 95.6k]
  |  |  ------------------
  ------------------
  183|   121k|}
xmltok.c:unicode_byte_type:
  595|   137M|unicode_byte_type(char hi, char lo) {
  596|   137M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 135M, False: 1.35M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   243k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 243k, False: 137M]
  ------------------
  599|   606k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 362k, False: 136M]
  ------------------
  600|   828k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 222k, False: 137M]
  ------------------
  601|  1.11M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 281k, False: 137M]
  ------------------
  602|  1.11M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     89|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 89, False: 137M]
  ------------------
  605|    176|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 87, False: 137M]
  ------------------
  606|    264|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 88, False: 137M]
  ------------------
  607|    353|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 89, False: 137M]
  ------------------
  608|    353|    return BT_TRAIL;
  609|   243k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 243k, False: 137M]
  ------------------
  610|   243k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 243k, False: 301]
  ------------------
  611|    164|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 164, False: 243k]
  ------------------
  612|    301|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 137, False: 243k]
  ------------------
  613|    301|      return BT_NONXML;
  614|   243k|    }
  615|   243k|    break;
  616|   137M|  }
  617|   136M|  return BT_NONASCII;
  618|   137M|}
xmltok.c:little2_toUtf8:
  623|   342k|      char **toP, const char *toLim) {                                         \
  624|   342k|    const char *from = *fromP;                                                 \
  625|   342k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   342k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   342k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  39.0M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 38.6M, False: 337k]
  ------------------
  628|  38.6M|      int plane;                                                               \
  629|  38.6M|      unsigned char lo2;                                                       \
  630|  38.6M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  38.6M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  38.6M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  38.6M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  38.6M|      switch (hi) {                                                            \
  633|   632k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 632k, False: 38.0M]
  ------------------
  634|   632k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 553k, False: 78.2k]
  ------------------
  635|   553k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 746, False: 553k]
  ------------------
  636|    746|            *fromP = from;                                                     \
  637|    746|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    746|          }                                                                    \
  639|   553k|          *(*toP)++ = lo;                                                      \
  640|   553k|          break;                                                               \
  641|   553k|        }                                                                      \
  642|   632k|        /* fall through */                                                     \
  643|   632k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 9.75k, False: 38.6M]
  ------------------
  644|  99.3k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 11.3k, False: 38.6M]
  ------------------
  645|   105k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 5.70k, False: 38.6M]
  ------------------
  646|   117k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 12.6k, False: 38.6M]
  ------------------
  647|   122k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 4.84k, False: 38.6M]
  ------------------
  648|   174k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 51.8k, False: 38.6M]
  ------------------
  649|   176k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.86k, False: 38.6M]
  ------------------
  650|   176k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 256, False: 175k]
  ------------------
  651|    256|          *fromP = from;                                                       \
  652|    256|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    256|        }                                                                      \
  654|   176k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   175k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   175k|        break;                                                                 \
  657|  37.6M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 37.6M, False: 1.01M]
  ------------------
  658|  37.6M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.43k, False: 37.6M]
  ------------------
  659|  3.43k|          *fromP = from;                                                       \
  660|  3.43k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.43k|        }                                                                      \
  662|  37.6M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  37.6M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  37.6M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  37.6M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  37.6M|        break;                                                                 \
  667|  37.6M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 83.7k, False: 38.6M]
  ------------------
  668|   175k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 91.7k, False: 38.6M]
  ------------------
  669|   234k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 58.8k, False: 38.6M]
  ------------------
  670|   283k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 48.8k, False: 38.6M]
  ------------------
  671|   283k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 430, False: 282k]
  ------------------
  672|    430|          *fromP = from;                                                       \
  673|    430|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    430|        }                                                                      \
  675|   283k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 282k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   282k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   282k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   282k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   282k|        from += 2;                                                             \
  683|   282k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   282k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   282k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   282k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   282k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   282k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   282k|        break;                                                                 \
  688|  38.6M|      }                                                                        \
  689|  38.6M|    }                                                                          \
  690|   342k|    *fromP = from;                                                             \
  691|   337k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 337k]
  ------------------
  692|   337k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   337k|    else                                                                       \
  694|   337k|      return XML_CONVERT_COMPLETED;                                            \
  695|   337k|  }
xmltok.c:getEncodingIndex:
 1502|  38.5k|getEncodingIndex(const char *name) {
 1503|  38.5k|  static const char *const encodingNames[] = {
 1504|  38.5k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  38.5k|  };
 1506|  38.5k|  int i;
 1507|  38.5k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.2k, False: 19.3k]
  ------------------
 1508|  19.2k|    return NO_ENC;
 1509|  77.3k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 77.3k, False: 34]
  ------------------
 1510|  77.3k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.2k, False: 58.0k]
  ------------------
 1511|  19.2k|      return i;
 1512|     34|  return UNKNOWN_ENC;
 1513|  19.3k|}
xmltok.c:streqci:
 1005|  77.3k|streqci(const char *s1, const char *s2) {
 1006|   289k|  for (;;) {
 1007|   289k|    char c1 = *s1++;
 1008|   289k|    char c2 = *s2++;
 1009|   289k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   289k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    204|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 204, False: 289k]
  |  Branch (1009:26): [True: 204, False: 0]
  ------------------
 1010|    204|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    204|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    204|#define ASCII_a 0x61
  ------------------
 1011|   289k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   289k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 289k]
  |  Branch (1011:26): [True: 0, False: 0]
  ------------------
 1012|       |      /* The following line will never get executed.  streqci() is
 1013|       |       * only called from two places, both of which guarantee to put
 1014|       |       * upper-case strings into s2.
 1015|       |       */
 1016|      0|      c2 += ASCII_A - ASCII_a; /* LCOV_EXCL_LINE */
  ------------------
  |  |   36|      0|#define ASCII_A 0x41
  ------------------
                    c2 += ASCII_A - ASCII_a; /* LCOV_EXCL_LINE */
  ------------------
  |  |   63|      0|#define ASCII_a 0x61
  ------------------
 1017|   289k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 58.0k, False: 231k]
  ------------------
 1018|  58.0k|      return 0;
 1019|   231k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.2k, False: 212k]
  ------------------
 1020|  19.2k|      break;
 1021|   231k|  }
 1022|  19.2k|  return 1;
 1023|  77.3k|}
xmltok.c:initScan:
 1531|  19.2k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.2k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.2k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.2k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.2k|  encPtr = enc->encPtr;
 1537|  19.2k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 19, False: 19.2k]
  ------------------
 1538|       |    /* only a single byte available for auto-detection */
 1539|       |#ifndef XML_DTD /* FIXME */
 1540|       |    /* a well-formed document entity must have more than one byte */
 1541|       |    if (state != XML_CONTENT_STATE)
 1542|       |      return XML_TOK_PARTIAL;
 1543|       |#endif
 1544|       |    /* so we're parsing an external text entity... */
 1545|       |    /* if UTF-16 was externally specified, then we need at least 2 bytes */
 1546|     19|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     19|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 19]
  |  |  ------------------
  ------------------
 1547|     19|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 19, False: 0]
  ------------------
 1548|     19|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 19]
  ------------------
 1549|     19|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 19]
  ------------------
 1550|     19|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     19|    }
 1552|      0|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 0, False: 0]
  ------------------
 1553|      0|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 0, False: 0]
  ------------------
 1554|      0|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 0, False: 0]
  ------------------
 1555|      0|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 0, False: 0]
  ------------------
 1556|      0|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 0, False: 0]
  |  Branch (1556:52): [True: 0, False: 0]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      0|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 0, False: 0]
  ------------------
 1560|      0|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 0, False: 0]
  ------------------
 1561|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|      0|    }
 1563|  19.2k|  } else {
 1564|  19.2k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|     13|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 13, False: 19.2k]
  ------------------
 1566|     13|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|     13|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1566:11): [True: 0, False: 13]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|     13|      *nextTokPtr = ptr + 2;
 1569|     13|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|     13|      return XML_TOK_BOM;
  ------------------
  |  |   79|     13|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.13k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.13k, False: 14.1k]
  ------------------
 1573|  5.13k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.13k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 5.13k]
  ------------------
 1574|  5.13k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  5.13k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 5.13k, False: 0]
  ------------------
 1575|  5.13k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|  5.13k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 5.13k]
  ------------------
 1576|      0|        break;
 1577|  5.13k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.13k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.13k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|    149|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 149, False: 19.1k]
  ------------------
 1580|    149|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|    149|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 0, False: 149]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|    149|      *nextTokPtr = ptr + 2;
 1583|    149|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|    149|      return XML_TOK_BOM;
  ------------------
  |  |   79|    149|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  7.09k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 7.09k, False: 12.1k]
  ------------------
 1586|       |      /* Maybe a UTF-8 BOM (EF BB BF) */
 1587|       |      /* If there's an explicitly specified (external) encoding
 1588|       |         of ISO-8859-1 or some flavour of UTF-16
 1589|       |         and this is an external text entity,
 1590|       |         don't look for the BOM,
 1591|       |         because it might be a legal data.
 1592|       |      */
 1593|  7.09k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  7.09k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 7.09k]
  ------------------
 1594|      0|        int e = INIT_ENC_INDEX(enc);
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1595|      0|        if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  |  Branch (1595:36): [True: 0, False: 0]
  |  Branch (1595:57): [True: 0, False: 0]
  ------------------
 1596|      0|            || e == UTF_16_ENC)
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|          break;
 1598|      0|      }
 1599|  7.09k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 7.09k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  7.09k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 7.08k, False: 14]
  ------------------
 1602|  7.08k|        *nextTokPtr = ptr + 3;
 1603|  7.08k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  7.08k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  7.08k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  7.08k|      }
 1606|     14|      break;
 1607|  6.86k|    default:
  ------------------
  |  Branch (1607:5): [True: 6.86k, False: 12.3k]
  ------------------
 1608|  6.86k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 5.84k, False: 1.01k]
  ------------------
 1609|       |        /* 0 isn't a legal data character. Furthermore a document
 1610|       |           entity can only start with ASCII characters.  So the only
 1611|       |           way this can fail to be big-endian UTF-16 if it it's an
 1612|       |           external parsed general entity that's labelled as
 1613|       |           UTF-16LE.
 1614|       |        */
 1615|  5.84k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  11.6k|#define XML_CONTENT_STATE 1
  ------------------
                      if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1615:13): [True: 0, False: 5.84k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  5.84k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  5.84k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.84k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  5.84k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 854, False: 162]
  ------------------
 1620|       |        /* We could recover here in the case:
 1621|       |            - parsing an external entity
 1622|       |            - second byte is 0
 1623|       |            - no externally specified encoding
 1624|       |            - no encoding declaration
 1625|       |           by assuming UTF-16LE.  But we don't, because this would mean when
 1626|       |           presented just with a single byte, we couldn't reliably determine
 1627|       |           whether we needed further bytes.
 1628|       |        */
 1629|    854|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    854|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 854]
  ------------------
 1630|      0|          break;
 1631|    854|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    854|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    854|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    854|      }
 1634|    162|      break;
 1635|  19.2k|    }
 1636|  19.2k|  }
 1637|    176|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    176|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    176|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    176|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.2k|}
xmltok.c:big2_toUtf8:
  623|   152k|      char **toP, const char *toLim) {                                         \
  624|   152k|    const char *from = *fromP;                                                 \
  625|   152k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   152k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   152k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  14.9M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 14.8M, False: 148k]
  ------------------
  628|  14.8M|      int plane;                                                               \
  629|  14.8M|      unsigned char lo2;                                                       \
  630|  14.8M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  14.8M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  14.8M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  14.8M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  14.8M|      switch (hi) {                                                            \
  633|   205k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 205k, False: 14.6M]
  ------------------
  634|   205k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 191k, False: 14.2k]
  ------------------
  635|   191k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 573, False: 190k]
  ------------------
  636|    573|            *fromP = from;                                                     \
  637|    573|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    573|          }                                                                    \
  639|   191k|          *(*toP)++ = lo;                                                      \
  640|   190k|          break;                                                               \
  641|   191k|        }                                                                      \
  642|   205k|        /* fall through */                                                     \
  643|   205k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.02k, False: 14.8M]
  ------------------
  644|  26.0k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 4.74k, False: 14.8M]
  ------------------
  645|  27.0k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 990, False: 14.8M]
  ------------------
  646|  51.7k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 24.6k, False: 14.8M]
  ------------------
  647|  52.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 648, False: 14.8M]
  ------------------
  648|  54.0k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 1.66k, False: 14.8M]
  ------------------
  649|  54.6k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 575, False: 14.8M]
  ------------------
  650|  54.6k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 606, False: 54.0k]
  ------------------
  651|    606|          *fromP = from;                                                       \
  652|    606|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    606|        }                                                                      \
  654|  54.6k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  54.0k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  54.0k|        break;                                                                 \
  657|  14.5M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 14.5M, False: 263k]
  ------------------
  658|  14.5M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.71k, False: 14.5M]
  ------------------
  659|  2.71k|          *fromP = from;                                                       \
  660|  2.71k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.71k|        }                                                                      \
  662|  14.5M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  14.5M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  14.5M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  14.5M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  14.5M|        break;                                                                 \
  667|  14.5M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 4.36k, False: 14.8M]
  ------------------
  668|  6.63k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 2.27k, False: 14.8M]
  ------------------
  669|  14.4k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 7.76k, False: 14.8M]
  ------------------
  670|  17.7k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 3.35k, False: 14.8M]
  ------------------
  671|  17.7k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 325, False: 17.4k]
  ------------------
  672|    325|          *fromP = from;                                                       \
  673|    325|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    325|        }                                                                      \
  675|  17.7k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 17.4k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  17.4k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  17.4k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  17.4k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  17.4k|        from += 2;                                                             \
  683|  17.4k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|  17.4k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|  17.4k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|  17.4k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|  17.4k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  17.4k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  17.4k|        break;                                                                 \
  688|  14.8M|      }                                                                        \
  689|  14.8M|    }                                                                          \
  690|   152k|    *fromP = from;                                                             \
  691|   148k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 148k]
  ------------------
  692|   148k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   148k|    else                                                                       \
  694|   148k|      return XML_CONVERT_COMPLETED;                                            \
  695|   148k|  }
xmltok.c:initUpdatePosition:
 1027|     20|                   POSITION *pos) {
 1028|     20|  UNUSED_P(enc);
  ------------------
  |  |  135|     20|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     20|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     20|}
xmltok.c:doParseXmlDecl:
 1155|    297|               const ENCODING **encoding, int *standalone) {
 1156|    297|  const char *val = NULL;
 1157|    297|  const char *name = NULL;
 1158|    297|  const char *nameEnd = NULL;
 1159|    297|  ptr += 5 * enc->minBytesPerChar;
 1160|    297|  end -= 2 * enc->minBytesPerChar;
 1161|    297|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 171, False: 126]
  ------------------
 1162|    297|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 14, False: 112]
  ------------------
 1163|    185|    *badPtr = ptr;
 1164|    185|    return 0;
 1165|    185|  }
 1166|    112|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    112|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 3, False: 109]
  ------------------
 1167|      3|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 3, False: 0]
  ------------------
 1168|      3|      *badPtr = name;
 1169|      3|      return 0;
 1170|      3|    }
 1171|    109|  } else {
 1172|    109|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 109, False: 0]
  ------------------
 1173|    109|      *versionPtr = val;
 1174|    109|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 109, False: 0]
  ------------------
 1175|    109|      *versionEndPtr = ptr;
 1176|    109|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 19, False: 90]
  ------------------
 1177|     19|      *badPtr = ptr;
 1178|     19|      return 0;
 1179|     19|    }
 1180|     90|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 5, False: 85]
  ------------------
 1181|      5|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 5]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      5|      return 1;
 1187|      5|    }
 1188|     90|  }
 1189|     85|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     85|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 41, False: 44]
  |  |  ------------------
  ------------------
 1190|     41|    int c = toAscii(enc, val, end);
 1191|     41|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     41|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     12|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     29|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     27|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 12, False: 29]
  |  Branch (1191:28): [True: 12, False: 0]
  |  Branch (1191:48): [True: 27, False: 2]
  |  Branch (1191:64): [True: 26, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     38|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 38, False: 0]
  ------------------
 1196|     38|      *encodingName = val;
 1197|     38|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 38, False: 0]
  ------------------
 1198|     38|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     38|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 8, False: 30]
  ------------------
 1200|      8|      *badPtr = ptr;
 1201|      8|      return 0;
 1202|      8|    }
 1203|     30|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 29, False: 1]
  ------------------
 1204|     29|      return 1;
 1205|     30|  }
 1206|     45|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     90|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 4, False: 41]
  ------------------
 1207|     45|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 41]
  ------------------
 1208|      4|    *badPtr = name;
 1209|      4|    return 0;
 1210|      4|  }
 1211|     41|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     41|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 28, False: 13]
  |  |  ------------------
  ------------------
 1212|     28|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 28, False: 0]
  ------------------
 1213|     28|      *standalone = 1;
 1214|     28|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     13|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12, False: 1]
  |  |  ------------------
  ------------------
 1215|     12|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 12, False: 0]
  ------------------
 1216|     12|      *standalone = 0;
 1217|     12|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    242|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 202, False: 40]
  ------------------
 1222|    202|    ptr += enc->minBytesPerChar;
 1223|     40|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 7, False: 33]
  ------------------
 1224|      7|    *badPtr = ptr;
 1225|      7|    return 0;
 1226|      7|  }
 1227|     33|  return 1;
 1228|     40|}
xmltok.c:parsePseudoAttribute:
 1061|    444|                     const char **valPtr, const char **nextTokPtr) {
 1062|    444|  int c;
 1063|    444|  char open;
 1064|    444|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 35, False: 409]
  ------------------
 1065|     35|    *namePtr = NULL;
 1066|     35|    return 1;
 1067|     35|  }
 1068|    409|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 5, False: 404]
  ------------------
 1069|      5|    *nextTokPtr = ptr;
 1070|      5|    return 0;
 1071|      5|  }
 1072|    874|  do {
 1073|    874|    ptr += enc->minBytesPerChar;
 1074|    874|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 470, False: 404]
  ------------------
 1075|    404|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 13, False: 391]
  ------------------
 1076|     13|    *namePtr = NULL;
 1077|     13|    return 1;
 1078|     13|  }
 1079|    391|  *namePtr = ptr;
 1080|  2.28k|  for (;;) {
 1081|  2.28k|    c = toAscii(enc, ptr, end);
 1082|  2.28k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 44, False: 2.24k]
  ------------------
 1083|     44|      *nextTokPtr = ptr;
 1084|     44|      return 0;
 1085|     44|    }
 1086|  2.24k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.24k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 309, False: 1.93k]
  ------------------
 1087|    309|      *nameEndPtr = ptr;
 1088|    309|      break;
 1089|    309|    }
 1090|  1.93k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 38, False: 1.89k]
  ------------------
 1091|     38|      *nameEndPtr = ptr;
 1092|    649|      do {
 1093|    649|        ptr += enc->minBytesPerChar;
 1094|    649|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 611, False: 38]
  ------------------
 1095|     38|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     38|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 28, False: 10]
  ------------------
 1096|     28|        *nextTokPtr = ptr;
 1097|     28|        return 0;
 1098|     28|      }
 1099|     10|      break;
 1100|     38|    }
 1101|  1.89k|    ptr += enc->minBytesPerChar;
 1102|  1.89k|  }
 1103|    319|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 6, False: 313]
  ------------------
 1104|      6|    *nextTokPtr = ptr;
 1105|      6|    return 0;
 1106|      6|  }
 1107|    313|  ptr += enc->minBytesPerChar;
 1108|    313|  c = toAscii(enc, ptr, end);
 1109|    572|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 259, False: 313]
  ------------------
 1110|    259|    ptr += enc->minBytesPerChar;
 1111|    259|    c = toAscii(enc, ptr, end);
 1112|    259|  }
 1113|    313|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    626|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     97|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 97, False: 216]
  |  Branch (1113:26): [True: 30, False: 67]
  ------------------
 1114|     30|    *nextTokPtr = ptr;
 1115|     30|    return 0;
 1116|     30|  }
 1117|    283|  open = (char)c;
 1118|    283|  ptr += enc->minBytesPerChar;
 1119|    283|  *valPtr = ptr;
 1120|  1.99k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  1.99k|    c = toAscii(enc, ptr, end);
 1122|  1.99k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 198, False: 1.79k]
  ------------------
 1123|    198|      break;
 1124|  1.79k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  1.79k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    476|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.31k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    473|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 476, False: 1.31k]
  |  Branch (1124:28): [True: 475, False: 1]
  |  Branch (1124:48): [True: 473, False: 846]
  |  Branch (1124:64): [True: 241, False: 232]
  ------------------
 1125|  1.79k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.07k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    581|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.52k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 581, False: 497]
  |  Branch (1125:31): [True: 345, False: 236]
  |  Branch (1125:48): [True: 520, False: 213]
  ------------------
 1126|  1.79k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.31k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    314|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 314, False: 206]
  |  Branch (1126:32): [True: 85, False: 229]
  ------------------
 1127|     85|      *nextTokPtr = ptr;
 1128|     85|      return 0;
 1129|     85|    }
 1130|  1.79k|  }
 1131|    198|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    198|  return 1;
 1133|    283|}
xmltok.c:toAscii:
 1033|  7.06k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.06k|  char buf[1];
 1035|  7.06k|  char *p = buf;
 1036|  7.06k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.06k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.06k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 218, False: 6.84k]
  ------------------
 1038|    218|    return -1;
 1039|  6.84k|  else
 1040|  6.84k|    return buf[0];
 1041|  7.06k|}
xmltok.c:isSpace:
 1044|  4.67k|isSpace(int c) {
 1045|  4.67k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 2.69k, False: 1.98k]
  ------------------
 1046|    773|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 773, False: 3.90k]
  ------------------
 1047|    946|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 173, False: 4.50k]
  ------------------
 1048|  1.48k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 536, False: 4.14k]
  ------------------
 1049|  1.98k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 502, False: 4.17k]
  ------------------
 1050|  1.98k|    return 1;
 1051|  4.67k|  }
 1052|  2.69k|  return 0;
 1053|  4.67k|}

xmltok.c:normal_prologTok:
 1018|  5.33M|                  const char **nextTokPtr) {
 1019|  5.33M|  int tok;
 1020|  5.33M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 948, False: 5.33M]
  ------------------
 1021|    948|    return XML_TOK_NONE;
  ------------------
  |  |   51|    948|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.33M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.33M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  5.33M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.66k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.66k, False: 5.33M]
  ------------------
 1033|  4.66k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.66k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.66k|#  define MINBPC(enc) 1
  ------------------
 1034|  16.0k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 16.0k, False: 5.32M]
  ------------------
 1035|  16.0k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  16.0k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  16.0k|#  define MINBPC(enc) 1
  ------------------
 1036|  36.9k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 36.9k, False: 5.30M]
  ------------------
 1037|  36.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  36.9k|#  define MINBPC(enc) 1
  ------------------
 1038|  36.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  36.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  36.9k|    {                                                                          \
  |  |  |  |  135|  36.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  36.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  36.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 22, False: 36.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     22|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     22|      }                                                                        \
  |  |  |  |  138|  36.9k|    }
  |  |  ------------------
  ------------------
 1039|  36.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  36.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  36.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 10, False: 36.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  30.2k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 30.2k, False: 6.61k]
  ------------------
 1041|  30.2k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  30.2k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  30.2k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.89k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.89k, False: 34.0k]
  ------------------
 1043|  2.89k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.89k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.89k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.48k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.48k, False: 34.4k]
  ------------------
 1045|  3.62k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.14k, False: 35.7k]
  ------------------
 1046|  3.62k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 36.9k]
  ------------------
 1047|  3.66k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 39, False: 36.8k]
  ------------------
 1048|  3.71k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 45, False: 36.8k]
  ------------------
 1049|  3.71k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 36.8k]
  ------------------
 1050|  3.71k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.71k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.71k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.71k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  36.9k|    }
 1053|     10|    *nextTokPtr = ptr;
 1054|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
 1055|  36.9k|  }
 1056|  91.6k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 91.6k, False: 5.24M]
  ------------------
 1057|  91.6k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  91.6k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 147, False: 91.5k]
  ------------------
 1058|    147|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    147|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    147|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    147|    }
 1062|       |    /* fall through */
 1063|   271k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 179k, False: 5.15M]
  ------------------
 1064|   297k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 26.5k, False: 5.31M]
  ------------------
 1065|   303k|    for (;;) {
 1066|   303k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   303k|#  define MINBPC(enc) 1
  ------------------
 1067|   303k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   303k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   303k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   303k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 395, False: 303k]
  ------------------
 1068|    395|        break;
 1069|   303k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   303k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   303k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  1.85k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.85k, False: 301k]
  ------------------
 1071|  3.02k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.16k, False: 301k]
  ------------------
 1072|  3.02k|        break;
 1073|  2.63k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 2.63k, False: 300k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  2.63k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  2.63k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 2.62k, False: 11]
  ------------------
 1076|  2.62k|          break;
 1077|       |        /* fall through */
 1078|   297k|      default:
  ------------------
  |  Branch (1078:7): [True: 297k, False: 5.65k]
  ------------------
 1079|   297k|        *nextTokPtr = ptr;
 1080|   297k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   297k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   303k|      }
 1082|   303k|    }
 1083|    395|    *nextTokPtr = ptr;
 1084|    395|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    395|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  4.45k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 4.45k, False: 5.33M]
  ------------------
 1086|  4.45k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.45k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.45k|#  define MINBPC(enc) 1
  ------------------
 1087|   236k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 236k, False: 5.10M]
  ------------------
 1088|   236k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   236k|#  define MINBPC(enc) 1
  ------------------
 1089|   236k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|   236k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.64k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.64k, False: 5.33M]
  ------------------
 1091|  2.64k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.64k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.64k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.64k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    956|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 956, False: 5.33M]
  ------------------
 1094|    956|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    956|#  define MINBPC(enc) 1
  ------------------
 1095|    956|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    956|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    956|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    956|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 954]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    954|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|    954|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 19, False: 935]
  |  |  ------------------
  ------------------
 1098|     19|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     19|    {                                                                          \
  |  |  135|     19|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     19|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     19|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 17]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     19|    }
  ------------------
 1099|     17|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     17|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 16]
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     17|    }
 1104|    951|    *nextTokPtr = ptr;
 1105|    951|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    951|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.88M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.88M, False: 1.45M]
  ------------------
 1107|  3.88M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.88M|#  define MINBPC(enc) 1
  ------------------
 1108|  3.88M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.88M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|   428k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 428k, False: 4.90M]
  ------------------
 1110|   428k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   428k|#  define MINBPC(enc) 1
  ------------------
 1111|   428k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   428k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   428k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   428k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 24, False: 428k]
  ------------------
 1112|     24|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     24|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|   428k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   428k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   428k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 12, False: 428k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  44.1k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 44.1k, False: 383k]
  ------------------
 1115|  44.1k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  44.1k|#  define MINBPC(enc) 1
  ------------------
 1116|  44.1k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  44.1k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  33.0k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 33.0k, False: 395k]
  ------------------
 1118|  33.0k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  33.0k|#  define MINBPC(enc) 1
  ------------------
 1119|  33.0k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  33.0k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  81.0k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 81.0k, False: 347k]
  ------------------
 1121|  81.0k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  81.0k|#  define MINBPC(enc) 1
  ------------------
 1122|  81.0k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  81.0k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  7.98k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 7.98k, False: 420k]
  ------------------
 1124|  8.80k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 816, False: 427k]
  ------------------
 1125|  30.9k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 22.1k, False: 406k]
  ------------------
 1126|  31.9k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.03k, False: 427k]
  ------------------
 1127|   268k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 236k, False: 191k]
  ------------------
 1128|   268k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 226, False: 427k]
  ------------------
 1129|   269k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.37k, False: 426k]
  ------------------
 1130|   269k|      *nextTokPtr = ptr;
 1131|   269k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|   269k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|   428k|    }
 1133|     12|    *nextTokPtr = ptr;
 1134|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1135|  7.74k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 7.74k, False: 5.33M]
  ------------------
 1136|  7.74k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.74k|#  define MINBPC(enc) 1
  ------------------
 1137|  7.74k|    return XML_TOK_OR;
  ------------------
  |  |   88|  7.74k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  26.0k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 26.0k, False: 5.31M]
  ------------------
 1139|  26.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  26.0k|#  define MINBPC(enc) 1
  ------------------
 1140|  26.0k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  26.0k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  30.9k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 30.9k, False: 5.30M]
  ------------------
 1142|  30.9k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  30.9k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  30.9k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  2.15k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      4|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 640, False: 5.33M]
  |  |  ------------------
  |  | 1145|    640|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 1, False: 639]
  |  |  ------------------
  |  | 1146|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    639|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    639|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    639|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 7, False: 632]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      7|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      7|    }                                                                          \
  |  | 1151|    639|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    632|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    632|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 393, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    393|      ptr += n;                                                                \
  |  | 1153|    393|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    393|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    393|      break;                                                                   \
  |  | 1155|    393|    }                                                                          \
  |  | 1156|    632|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    239|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    239|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 235, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    235|      ptr += n;                                                                \
  |  | 1158|    235|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    235|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    235|      break;                                                                   \
  |  | 1160|    235|    }                                                                          \
  |  | 1161|    239|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      4|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  2.23k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     21|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 662, False: 5.33M]
  |  |  ------------------
  |  | 1145|    662|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 6, False: 656]
  |  |  ------------------
  |  | 1146|     21|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    656|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    656|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    656|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 42, False: 614]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     42|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     42|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     42|    }                                                                          \
  |  | 1151|    656|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    614|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    614|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 312, False: 302]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    312|      ptr += n;                                                                \
  |  | 1153|    312|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    312|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    312|      break;                                                                   \
  |  | 1155|    312|    }                                                                          \
  |  | 1156|    614|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    302|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    302|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 281, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    281|      ptr += n;                                                                \
  |  | 1158|    281|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    281|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    281|      break;                                                                   \
  |  | 1160|    281|    }                                                                          \
  |  | 1161|    302|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     21|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    138|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 55, False: 5.33M]
  |  |  ------------------
  |  | 1145|     55|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 53]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     53|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     53|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     53|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 38, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     38|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     38|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     38|    }                                                                          \
  |  | 1151|     53|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     15|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     15|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     15|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     15|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|   311k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 311k, False: 5.02M]
  ------------------
 1168|   360k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 49.5k, False: 5.28M]
  ------------------
 1169|   360k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   360k|#define XML_TOK_NAME 18
  ------------------
 1170|   360k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   360k|#  define MINBPC(enc) 1
  ------------------
 1171|   360k|    break;
 1172|  1.03k|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 1.03k, False: 5.33M]
  ------------------
 1173|  1.32k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 294, False: 5.33M]
  ------------------
 1174|  1.75k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 433, False: 5.33M]
  ------------------
 1175|  1.75k|#  ifdef XML_NS
 1176|  1.75k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.33M]
  ------------------
 1177|  1.75k|#  endif
 1178|  1.75k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.75k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.75k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.75k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.75k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.33M]
  ------------------
 1182|      0|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (287:41): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1183|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1184|      0|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
 1185|      0|      break;
 1186|      0|    }
 1187|      0|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (286:39): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1188|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1189|      0|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|      0|      break;
 1191|      0|    }
 1192|       |    /* fall through */
 1193|     52|  default:
  ------------------
  |  Branch (1193:3): [True: 52, False: 5.33M]
  ------------------
 1194|     52|    *nextTokPtr = ptr;
 1195|     52|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     52|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.33M|  }
 1197|  2.92M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.92M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.92M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.92M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  8.28M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.55M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.92M]
  |  |  ------------------
  |  |   82|  2.55M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.55M|    /* fall through */                                                         \
  |  |   87|  2.55M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 642k, False: 2.28M]
  |  |  ------------------
  |  |   88|  2.53M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.88M, False: 1.03M]
  |  |  ------------------
  |  |   89|  2.55M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 21.9k, False: 2.90M]
  |  |  ------------------
  |  |   90|  2.55M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 413, False: 2.92M]
  |  |  ------------------
  |  |   91|  2.55M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 5.44k, False: 2.91M]
  |  |  ------------------
  |  |   92|  2.55M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.55M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.55M|    break;                                                                     \
  |  |   94|  2.55M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    373|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 397, False: 2.92M]
  |  |  |  |  ------------------
  |  |  |  |   71|    397|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 395]
  |  |  |  |  ------------------
  |  |  |  |   72|    373|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    395|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    790|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    395|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 379]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    379|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    379|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 373]
  |  |  |  |  ------------------
  |  |  |  |   74|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     22|    }                                                                          \
  |  |  |  |   77|    395|    ptr += n;                                                                  \
  |  |  |  |   78|    373|    break;
  |  |  ------------------
  |  |   95|    576|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    570|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 576, False: 2.92M]
  |  |  |  |  ------------------
  |  |  |  |   71|    576|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 572]
  |  |  |  |  ------------------
  |  |  |  |   72|    570|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    572|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.14k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    572|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 571]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    571|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    571|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 570]
  |  |  |  |  ------------------
  |  |  |  |   74|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      2|    }                                                                          \
  |  |  |  |   77|    572|    ptr += n;                                                                  \
  |  |  |  |   78|    570|    break;
  |  |  ------------------
  |  |   96|    570|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 2.92M]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     36|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     18|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  6.88k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 6.88k, False: 2.91M]
  ------------------
 1201|   275k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 268k, False: 2.65M]
  ------------------
 1202|   275k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 286, False: 2.92M]
  ------------------
 1203|   279k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 4.18k, False: 2.91M]
  ------------------
 1204|   282k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.52k, False: 2.92M]
  ------------------
 1205|   282k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 5, False: 2.92M]
  ------------------
 1206|   314k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 31.9k, False: 2.89M]
  ------------------
 1207|   353k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 38.7k, False: 2.88M]
  ------------------
 1208|   361k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 8.18k, False: 2.91M]
  ------------------
 1209|   361k|      *nextTokPtr = ptr;
 1210|   361k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.92M]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      0|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    783|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 783, False: 2.92M]
  ------------------
 1232|    783|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    783|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 782]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    782|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    782|#  define MINBPC(enc) 1
  ------------------
 1237|    782|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    782|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    870|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 870, False: 2.92M]
  ------------------
 1239|    870|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    870|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 869]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    869|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    869|#  define MINBPC(enc) 1
  ------------------
 1244|    869|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    869|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    242|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 242, False: 2.92M]
  ------------------
 1246|    242|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    242|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 241]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    241|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    241|#  define MINBPC(enc) 1
  ------------------
 1251|    241|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    241|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     50|    default:
  ------------------
  |  Branch (1252:5): [True: 50, False: 2.92M]
  ------------------
 1253|     50|      *nextTokPtr = ptr;
 1254|     50|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     50|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.92M|    }
 1256|  2.92M|  }
 1257|    206|  return -tok;
 1258|   363k|}
xmltok.c:normal_scanLit:
  984|  20.7k|                const char **nextTokPtr) {
  985|  10.3M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  10.3M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  10.3M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.3M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  10.3M|    switch (t) {
  988|   302k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|   148k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   148k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 148k, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|   148k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |   51|   148k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   148k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   148k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   148k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 148k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|   148k|    ptr += n;                                                                  \
  |  |  |  |   57|   148k|    break;
  |  |  ------------------
  |  |   61|   148k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.79k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.79k, False: 10.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.79k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.79k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.79k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.79k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.79k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.79k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  1.79k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.79k|    break;
  |  |  ------------------
  |  |   62|  1.79k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    408|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 421, False: 10.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|    421|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 419]
  |  |  |  |  ------------------
  |  |  |  |   51|    408|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    419|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    419|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    419|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 408]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|    419|    ptr += n;                                                                  \
  |  |  |  |   57|    408|    break;
  |  |  ------------------
  |  |   63|    408|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 10.3M]
  |  |  ------------------
  |  |   64|     15|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 6, False: 10.3M]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 10.3M]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|   287k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 287k, False: 10.0M]
  ------------------
  990|   303k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 16.7k, False: 10.2M]
  ------------------
  991|   303k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   303k|#  define MINBPC(enc) 1
  ------------------
  992|   303k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 283k, False: 20.5k]
  ------------------
  993|   283k|        break;
  994|  20.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  20.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  20.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  20.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 5, False: 20.5k]
  ------------------
  995|      5|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      5|#define XML_TOK_LITERAL 27
  ------------------
  996|  20.5k|      *nextTokPtr = ptr;
  997|  20.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  20.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  20.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  3.70k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 3.70k, False: 16.8k]
  ------------------
  999|  8.06k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 4.35k, False: 16.2k]
  ------------------
 1000|  8.82k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 761, False: 19.8k]
  ------------------
 1001|  20.4k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 11.6k, False: 8.94k]
  ------------------
 1002|  20.4k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 9, False: 20.5k]
  ------------------
 1003|  20.5k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 102, False: 20.4k]
  ------------------
 1004|  20.5k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  20.5k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      9|      default:
  ------------------
  |  Branch (1005:7): [True: 9, False: 20.5k]
  ------------------
 1006|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1007|  20.5k|      }
 1008|  9.85M|    default:
  ------------------
  |  Branch (1008:5): [True: 9.85M, False: 455k]
  ------------------
 1009|  9.85M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.85M|#  define MINBPC(enc) 1
  ------------------
 1010|  9.85M|      break;
 1011|  10.3M|    }
 1012|  10.3M|  }
 1013|     82|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     82|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  20.7k|}
xmltok.c:normal_scanDecl:
  183|  30.2k|                 const char **nextTokPtr) {
  184|  30.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  30.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  30.2k|    {                                                                          \
  |  |  |  |  135|  30.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  30.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  30.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 30.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  30.2k|    }
  |  |  ------------------
  ------------------
  185|  30.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  30.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  30.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|  1.08k|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 1.08k, False: 29.1k]
  ------------------
  187|  1.08k|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.08k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.08k|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 30.2k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    495|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 495, False: 29.7k]
  ------------------
  192|  29.1k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 28.6k, False: 1.59k]
  ------------------
  193|  29.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  29.1k|#  define MINBPC(enc) 1
  ------------------
  194|  29.1k|    break;
  195|      6|  default:
  ------------------
  |  Branch (195:3): [True: 6, False: 30.2k]
  ------------------
  196|      6|    *nextTokPtr = ptr;
  197|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  198|  30.2k|  }
  199|   197k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   197k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   197k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   197k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     10|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 10, False: 197k]
  ------------------
  202|     10|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     10|    {                                                                          \
  |  |  135|     10|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     10|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     10|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 8]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     10|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      8|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      8|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      8|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 3, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 7]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 7]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 2, False: 6]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 7]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|      8|      }
  212|       |      /* fall through */
  213|  14.1k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 14.1k, False: 183k]
  ------------------
  214|  21.7k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 7.62k, False: 190k]
  ------------------
  215|  29.1k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 7.34k, False: 190k]
  ------------------
  216|  29.1k|      *nextTokPtr = ptr;
  217|  29.1k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  29.1k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   153k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 153k, False: 44.0k]
  ------------------
  219|   168k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 14.8k, False: 182k]
  ------------------
  220|   168k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   168k|#  define MINBPC(enc) 1
  ------------------
  221|   168k|      break;
  222|     20|    default:
  ------------------
  |  Branch (222:5): [True: 20, False: 197k]
  ------------------
  223|     20|      *nextTokPtr = ptr;
  224|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  225|   197k|    }
  226|   197k|  }
  227|     33|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  29.1k|}
xmltok.c:normal_scanComment:
  146|  1.64k|                    const char **nextTokPtr) {
  147|  1.64k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.64k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.64k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.63k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.63k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.63k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 35, False: 1.60k]
  ------------------
  149|     35|      *nextTokPtr = ptr;
  150|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  151|     35|    }
  152|  1.60k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.60k|#  define MINBPC(enc) 1
  ------------------
  153|  3.88M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  3.88M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.88M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.88M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  7.74M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.03k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.02k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.03k, False: 3.88M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.03k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.02k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.02k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.02k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.02k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|  2.02k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.02k|    break;
  |  |  ------------------
  |  |   61|  3.86M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.86M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.86M, False: 15.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.86M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 3.86M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.86M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.86M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.86M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.86M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.86M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  3.86M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.86M|    break;
  |  |  ------------------
  |  |   62|  3.86M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.09k, False: 3.88M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.09k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.09k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.09k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.09k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  2.09k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.08k|    break;
  |  |  ------------------
  |  |   63|  2.08k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 3.88M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 6, False: 3.88M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 3.88M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.08k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.08k, False: 3.88M]
  ------------------
  157|  2.08k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.08k|#  define MINBPC(enc) 1
  ------------------
  158|  2.08k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.08k|    {                                                                          \
  |  |  |  |  135|  2.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.08k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.08k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.08k|    }
  |  |  ------------------
  ------------------
  159|  2.08k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.08k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.47k, False: 611]
  |  |  ------------------
  ------------------
  160|  1.47k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.47k|#  define MINBPC(enc) 1
  ------------------
  161|  1.47k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.47k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.47k|    {                                                                          \
  |  |  |  |  135|  1.47k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.47k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.47k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.47k|    }
  |  |  ------------------
  ------------------
  162|  1.47k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.47k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 22, False: 1.45k]
  ------------------
  163|     22|            *nextTokPtr = ptr;
  164|     22|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  165|     22|          }
  166|  1.45k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.45k|#  define MINBPC(enc) 1
  ------------------
  167|  1.45k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.45k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.47k|        }
  169|    611|        break;
  170|  9.39k|      default:
  ------------------
  |  Branch (170:7): [True: 9.39k, False: 3.87M]
  ------------------
  171|  9.39k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.39k|#  define MINBPC(enc) 1
  ------------------
  172|  9.39k|        break;
  173|  3.88M|      }
  174|  3.88M|    }
  175|  1.60k|  }
  176|     95|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     95|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.64k|}
xmltok.c:normal_scanPi:
  277|  6.39k|               const char **nextTokPtr) {
  278|  6.39k|  int tok;
  279|  6.39k|  const char *target = ptr;
  280|  6.39k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.39k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.39k|    {                                                                          \
  |  |  |  |  135|  6.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.39k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 6.38k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  6.39k|    }
  |  |  ------------------
  ------------------
  281|  6.38k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.38k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  6.84k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.40k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.38k]
  |  |  ------------------
  |  |  111|  5.40k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  5.40k|    /* fall through */                                                         \
  |  |  116|  5.40k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.88k, False: 1.49k]
  |  |  ------------------
  |  |  117|  5.40k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 511, False: 5.87k]
  |  |  ------------------
  |  |  118|  5.40k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.40k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.40k|    break;                                                                     \
  |  |  120|  5.40k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    453|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 456, False: 5.92k]
  |  |  |  |  ------------------
  |  |  |  |  100|    456|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 455]
  |  |  |  |  ------------------
  |  |  |  |  101|    453|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    455|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    910|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    455|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 454]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    454|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    454|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 453]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    455|    ptr += n;                                                                  \
  |  |  |  |  107|    453|    break;
  |  |  ------------------
  |  |  121|    517|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    498|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 517, False: 5.86k]
  |  |  |  |  ------------------
  |  |  |  |  100|    517|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 515]
  |  |  |  |  ------------------
  |  |  |  |  101|    498|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    515|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.03k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    515|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 511]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    511|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    511|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 13, False: 498]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|    515|    ptr += n;                                                                  \
  |  |  |  |  107|    498|    break;
  |  |  ------------------
  |  |  122|    498|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 6.37k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      4|  default:
  ------------------
  |  Branch (283:3): [True: 4, False: 6.38k]
  ------------------
  284|      4|    *nextTokPtr = ptr;
  285|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  286|  6.38k|  }
  287|   785k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   785k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   785k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   785k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  2.78M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   769k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 785k]
  |  |  ------------------
  |  |   82|   769k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|   769k|    /* fall through */                                                         \
  |  |   87|   769k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 457k, False: 328k]
  |  |  ------------------
  |  |   88|   768k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 310k, False: 474k]
  |  |  ------------------
  |  |   89|   768k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 649, False: 784k]
  |  |  ------------------
  |  |   90|   768k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 235, False: 785k]
  |  |  ------------------
  |  |   91|   769k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 431, False: 784k]
  |  |  ------------------
  |  |   92|   769k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   769k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   769k|    break;                                                                     \
  |  |   94|   769k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    465|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 481, False: 784k]
  |  |  |  |  ------------------
  |  |  |  |   71|    481|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 479]
  |  |  |  |  ------------------
  |  |  |  |   72|    465|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    479|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    958|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    479|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 469]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    469|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    469|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 465]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    479|    ptr += n;                                                                  \
  |  |  |  |   78|    465|    break;
  |  |  ------------------
  |  |   95|  9.31k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  9.28k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9.31k, False: 776k]
  |  |  |  |  ------------------
  |  |  |  |   71|  9.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 9.31k]
  |  |  |  |  ------------------
  |  |  |  |   72|  9.28k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  9.31k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  18.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.31k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 9.30k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  9.30k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.30k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 27, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |   74|     30|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     30|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     30|    }                                                                          \
  |  |  |  |   77|  9.31k|    ptr += n;                                                                  \
  |  |  |  |   78|  9.28k|    break;
  |  |  ------------------
  |  |   96|  9.28k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 26, False: 785k]
  |  |  |  |  ------------------
  |  |  |  |   71|     26|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 24]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     24|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     48|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     24|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     12|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 12, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     24|    }                                                                          \
  |  |  |  |   77|     24|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    915|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 915, False: 784k]
  ------------------
  291|  1.46k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 550, False: 784k]
  ------------------
  292|  3.32k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.86k, False: 783k]
  ------------------
  293|  3.32k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.32k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 3, False: 3.32k]
  ------------------
  294|      3|        *nextTokPtr = ptr;
  295|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  296|      3|      }
  297|  3.32k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.32k|#  define MINBPC(enc) 1
  ------------------
  298|  3.59M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  3.59M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.59M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.59M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  7.04M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.11k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.11k, False: 3.58M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.11k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 5.11k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.11k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.11k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 5.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  5.11k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.11k|    break;
  |  |  ------------------
  |  |   61|  3.50M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.50M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.50M, False: 87.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.50M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.50M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.50M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.50M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.50M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.50M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.50M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  3.50M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.50M|    break;
  |  |  ------------------
  |  |   62|  3.50M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  13.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 13.7k, False: 3.57M]
  |  |  |  |  ------------------
  |  |  |  |   50|  13.7k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 13.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  13.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  13.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  13.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 13.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  13.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  13.7k|    break;
  |  |  ------------------
  |  |   63|  13.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 3.59M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 4, False: 3.59M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 3.59M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.40k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.40k, False: 3.58M]
  ------------------
  302|  5.40k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.40k|#  define MINBPC(enc) 1
  ------------------
  303|  5.40k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.40k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.40k|    {                                                                          \
  |  |  |  |  135|  5.40k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.40k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 5.40k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  5.40k|    }
  |  |  ------------------
  ------------------
  304|  5.40k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.40k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.18k, False: 2.21k]
  |  |  ------------------
  ------------------
  305|  3.18k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.18k|#  define MINBPC(enc) 1
  ------------------
  306|  3.18k|            return tok;
  307|  3.18k|          }
  308|  2.21k|          break;
  309|  62.7k|        default:
  ------------------
  |  Branch (309:9): [True: 62.7k, False: 3.53M]
  ------------------
  310|  62.7k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  62.7k|#  define MINBPC(enc) 1
  ------------------
  311|  62.7k|          break;
  312|  3.59M|        }
  313|  3.59M|      }
  314|    105|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    105|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.87k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.87k, False: 782k]
  ------------------
  316|  2.87k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.87k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.87k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.87k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.87k|#  define MINBPC(enc) 1
  ------------------
  321|  2.87k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.87k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.87k|    {                                                                          \
  |  |  |  |  135|  2.87k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.87k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.87k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 28, False: 2.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|     28|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     28|      }                                                                        \
  |  |  |  |  138|  2.87k|    }
  |  |  ------------------
  ------------------
  322|  2.84k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.84k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.82k, False: 15]
  |  |  ------------------
  ------------------
  323|  2.82k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.82k|#  define MINBPC(enc) 1
  ------------------
  324|  2.82k|        return tok;
  325|  2.82k|      }
  326|       |      /* fall through */
  327|     23|    default:
  ------------------
  |  Branch (327:5): [True: 8, False: 785k]
  ------------------
  328|     23|      *nextTokPtr = ptr;
  329|     23|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  330|   785k|    }
  331|   785k|  }
  332|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.35k|}
xmltok.c:normal_checkPiTarget:
  232|  6.19k|                      int *tokPtr) {
  233|  6.19k|  int upper = 0;
  234|  6.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.19k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  6.19k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  6.19k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  6.19k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  6.19k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 3.57k, False: 2.62k]
  ------------------
  237|  3.57k|    return 1;
  238|  2.62k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.62k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    998|  case ASCII_x:
  ------------------
  |  |   86|    998|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 998, False: 1.62k]
  ------------------
  240|    998|    break;
  241|    870|  case ASCII_X:
  ------------------
  |  |   59|    870|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 870, False: 1.75k]
  ------------------
  242|    870|    upper = 1;
  243|    870|    break;
  244|    756|  default:
  ------------------
  |  Branch (244:3): [True: 756, False: 1.86k]
  ------------------
  245|    756|    return 1;
  246|  2.62k|  }
  247|  1.86k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.86k|#  define MINBPC(enc) 1
  ------------------
  248|  1.86k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.86k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    655|  case ASCII_m:
  ------------------
  |  |   75|    655|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 655, False: 1.21k]
  ------------------
  250|    655|    break;
  251|    669|  case ASCII_M:
  ------------------
  |  |   48|    669|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 669, False: 1.19k]
  ------------------
  252|    669|    upper = 1;
  253|    669|    break;
  254|    544|  default:
  ------------------
  |  Branch (254:3): [True: 544, False: 1.32k]
  ------------------
  255|    544|    return 1;
  256|  1.86k|  }
  257|  1.32k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.32k|#  define MINBPC(enc) 1
  ------------------
  258|  1.32k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.32k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    243|  case ASCII_l:
  ------------------
  |  |   74|    243|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 243, False: 1.08k]
  ------------------
  260|    243|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.32k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.07k|  default:
  ------------------
  |  Branch (264:3): [True: 1.07k, False: 245]
  ------------------
  265|  1.07k|    return 1;
  266|  1.32k|  }
  267|    245|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 241]
  ------------------
  268|      4|    return 0;
  269|    241|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    241|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    241|  return 1;
  271|    245|}
xmltok.c:normal_scanPercent:
  924|  4.45k|                    const char **nextTokPtr) {
  925|  4.45k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.45k|    {                                                                          \
  |  |  |  |  135|  4.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.45k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 4.44k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  4.45k|    }
  |  |  ------------------
  ------------------
  926|  4.44k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.44k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.44k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.32k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.04k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |  111|  2.04k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  2.04k|    /* fall through */                                                         \
  |  |  116|  2.04k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 706, False: 3.73k]
  |  |  ------------------
  |  |  117|  2.04k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.33k, False: 3.10k]
  |  |  ------------------
  |  |  118|  2.04k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.04k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.04k|    break;                                                                     \
  |  |  120|  2.04k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     76|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 95, False: 4.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|     95|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 94]
  |  |  |  |  ------------------
  |  |  |  |  101|     76|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     94|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    188|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     94|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 79]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     79|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     79|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 76]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     94|    ptr += n;                                                                  \
  |  |  |  |  107|     76|    break;
  |  |  ------------------
  |  |  121|    204|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    200|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 204, False: 4.24k]
  |  |  |  |  ------------------
  |  |  |  |  100|    204|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 203]
  |  |  |  |  ------------------
  |  |  |  |  101|    200|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    203|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    406|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    203|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 202]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    202|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    202|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 200]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    203|    ptr += n;                                                                  \
  |  |  |  |  107|    200|    break;
  |  |  ------------------
  |  |  122|    200|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    694|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 694, False: 3.75k]
  ------------------
  929|  1.64k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 954, False: 3.49k]
  ------------------
  930|  2.08k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 434, False: 4.01k]
  ------------------
  931|  2.08k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 4.44k]
  ------------------
  932|  2.08k|    *nextTokPtr = ptr;
  933|  2.08k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.08k|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 4.44k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  4.44k|  }
  938|  5.87k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  5.87k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.87k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.87k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  8.94k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.98k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 5.87k]
  |  |  ------------------
  |  |   82|  2.98k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.98k|    /* fall through */                                                         \
  |  |   87|  2.98k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 629, False: 5.24k]
  |  |  ------------------
  |  |   88|  1.94k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.31k, False: 4.55k]
  |  |  ------------------
  |  |   89|  2.24k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 300, False: 5.57k]
  |  |  ------------------
  |  |   90|  2.72k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 481, False: 5.38k]
  |  |  ------------------
  |  |   91|  2.98k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 259, False: 5.61k]
  |  |  ------------------
  |  |   92|  2.98k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.98k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.98k|    break;                                                                     \
  |  |   94|  2.98k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    340|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 358, False: 5.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|    358|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 356]
  |  |  |  |  ------------------
  |  |  |  |   72|    340|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    356|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    712|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    356|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 345]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    345|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    345|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 340]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|    356|    ptr += n;                                                                  \
  |  |  |  |   78|    340|    break;
  |  |  ------------------
  |  |   95|    340|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    315|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 326, False: 5.54k]
  |  |  |  |  ------------------
  |  |  |  |   71|    326|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 324]
  |  |  |  |  ------------------
  |  |  |  |   72|    315|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    324|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    648|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    324|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 319]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    319|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    319|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 315]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|    324|    ptr += n;                                                                  \
  |  |  |  |   78|    315|    break;
  |  |  ------------------
  |  |   96|    315|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  2.17k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 2.17k, False: 3.69k]
  ------------------
  942|  2.17k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.17k|#  define MINBPC(enc) 1
  ------------------
  943|  2.17k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  2.17k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|      8|    default:
  ------------------
  |  Branch (944:5): [True: 8, False: 5.86k]
  ------------------
  945|      8|      *nextTokPtr = ptr;
  946|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  947|  5.87k|    }
  948|  5.87k|  }
  949|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.31k|}
xmltok.c:normal_scanPoundName:
  954|  30.9k|                      const char **nextTokPtr) {
  955|  30.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  30.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  30.9k|    {                                                                          \
  |  |  |  |  135|  30.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  30.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  30.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  30.9k|    }
  |  |  ------------------
  ------------------
  956|  30.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  30.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  30.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  30.5k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  30.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 30.9k]
  |  |  ------------------
  |  |  111|  30.8k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  30.8k|    /* fall through */                                                         \
  |  |  116|  30.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 30.5k, False: 407]
  |  |  ------------------
  |  |  117|  30.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 354, False: 30.5k]
  |  |  ------------------
  |  |  118|  30.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  30.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  30.8k|    break;                                                                     \
  |  |  120|  30.8k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      8|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  121|     12|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      3|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      3|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      3|  default:
  ------------------
  |  Branch (958:3): [True: 3, False: 30.9k]
  ------------------
  959|      3|    *nextTokPtr = ptr;
  960|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  961|  30.9k|  }
  962|   215k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   215k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   215k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   215k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   670k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   184k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 215k]
  |  |  ------------------
  |  |   82|   184k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|   184k|    /* fall through */                                                         \
  |  |   87|   184k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 118k, False: 97.5k]
  |  |  ------------------
  |  |   88|   183k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 65.2k, False: 150k]
  |  |  ------------------
  |  |   89|   183k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 274, False: 215k]
  |  |  ------------------
  |  |   90|   184k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 331, False: 215k]
  |  |  ------------------
  |  |   91|   184k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 418, False: 215k]
  |  |  ------------------
  |  |   92|   184k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   184k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   184k|    break;                                                                     \
  |  |   94|   184k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    240|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 259, False: 215k]
  |  |  |  |  ------------------
  |  |  |  |   71|    259|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 256]
  |  |  |  |  ------------------
  |  |  |  |   72|    240|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    256|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    512|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    256|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    243|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    243|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 240]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|    256|    ptr += n;                                                                  \
  |  |  |  |   78|    240|    break;
  |  |  ------------------
  |  |   95|    240|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    207|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 231, False: 215k]
  |  |  |  |  ------------------
  |  |  |  |   71|    231|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 228]
  |  |  |  |  ------------------
  |  |  |  |   72|    207|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    228|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    456|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    228|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 214]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    214|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    214|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 207]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|    228|    ptr += n;                                                                  \
  |  |  |  |   78|    207|    break;
  |  |  ------------------
  |  |   96|    207|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 27, False: 215k]
  |  |  |  |  ------------------
  |  |  |  |   71|     27|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 25]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     25|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     50|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     25|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 24, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|     25|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  21.8k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 21.8k, False: 193k]
  ------------------
  966|  29.0k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 7.24k, False: 208k]
  ------------------
  967|  29.4k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 423, False: 215k]
  ------------------
  968|  29.9k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 532, False: 215k]
  ------------------
  969|  30.4k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 406, False: 215k]
  ------------------
  970|  30.4k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 215k]
  ------------------
  971|  30.7k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 304, False: 215k]
  ------------------
  972|  30.7k|      *nextTokPtr = ptr;
  973|  30.7k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  30.7k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     16|    default:
  ------------------
  |  Branch (974:5): [True: 16, False: 215k]
  ------------------
  975|     16|      *nextTokPtr = ptr;
  976|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  977|   215k|    }
  978|   215k|  }
  979|     69|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     69|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  30.8k|}
xmltok.c:normal_contentTok:
  824|   197M|                   const char **nextTokPtr) {
  825|   197M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 285k, False: 197M]
  ------------------
  826|   285k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   285k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|   197M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   197M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|      0|    size_t n = end - ptr;
  829|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (829:9): [True: 0, False: 0]
  ------------------
  830|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  831|      0|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 0, False: 0]
  ------------------
  832|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|      0|      end = ptr + n;
  834|      0|    }
  835|      0|  }
  836|   197M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   197M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   197M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.50M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.50M, False: 194M]
  ------------------
  838|  2.50M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.50M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.50M|#  define MINBPC(enc) 1
  ------------------
  839|   342k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 342k, False: 196M]
  ------------------
  840|   342k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   342k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   342k|#  define MINBPC(enc) 1
  ------------------
  841|  16.8k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 16.8k, False: 197M]
  ------------------
  842|  16.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.8k|#  define MINBPC(enc) 1
  ------------------
  843|  16.8k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  16.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  16.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  16.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 25, False: 16.8k]
  ------------------
  844|     25|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     25|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  16.8k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  16.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 11.8k, False: 5.05k]
  ------------------
  846|  11.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.8k|#  define MINBPC(enc) 1
  ------------------
  847|  16.8k|    *nextTokPtr = ptr;
  848|  16.8k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|   177M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 177M, False: 19.3M]
  ------------------
  850|   177M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   177M|#  define MINBPC(enc) 1
  ------------------
  851|   177M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   177M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  7.23k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 7.23k, False: 197M]
  ------------------
  853|  7.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.23k|#  define MINBPC(enc) 1
  ------------------
  854|  7.23k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.23k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  7.23k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 316, False: 6.91k]
  ------------------
  855|    316|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    316|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  6.91k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  6.91k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 2.26k, False: 4.65k]
  ------------------
  857|  2.26k|      break;
  858|  4.65k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.65k|#  define MINBPC(enc) 1
  ------------------
  859|  4.65k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.65k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  4.65k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 211, False: 4.44k]
  ------------------
  860|    211|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    211|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  4.44k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.44k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 4.44k, False: 1]
  ------------------
  862|  4.44k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  4.44k|#  define MINBPC(enc) 1
  ------------------
  863|  4.44k|      break;
  864|  4.44k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  38.5k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.66k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.64k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.66k, False: 197M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.66k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 10, False: 2.65k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.64k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.65k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.65k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.65k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 2.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     15|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     15|    }                                                                          \
  |  |  |  |   56|  2.65k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.64k|    break;
  |  |  ------------------
  |  |   61|  11.5k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.5k, False: 197M]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 11.5k]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.5k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  11.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 19, False: 11.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     19|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     19|    }                                                                          \
  |  |  |  |   56|  11.5k|    ptr += n;                                                                  \
  |  |  |  |   57|  11.5k|    break;
  |  |  ------------------
  |  |   62|  11.5k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.96k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.99k, False: 197M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.99k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 7, False: 4.98k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.96k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.98k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.98k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.98k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 23, False: 4.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     23|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     23|    }                                                                          \
  |  |  |  |   56|  4.98k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.96k|    break;
  |  |  ------------------
  |  |   63|  4.96k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 52, False: 197M]
  |  |  ------------------
  |  |   64|     70|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 18, False: 197M]
  |  |  ------------------
  |  |   65|     90|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 20, False: 197M]
  |  |  ------------------
  |  |   66|     90|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     90|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     90|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  16.4M|  default:
  ------------------
  |  Branch (868:3): [True: 16.4M, False: 180M]
  ------------------
  869|  16.4M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.4M|#  define MINBPC(enc) 1
  ------------------
  870|  16.4M|    break;
  871|   197M|  }
  872|   442M|  while (HAS_CHAR(enc, ptr, end)) {
  873|   442M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   442M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   442M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|   625k|      LEAD_CASE(2)
  ------------------
  |  |  875|   625k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 625k, False: 442M]
  |  |  ------------------
  |  |  876|   625k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|   625k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   625k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 11, False: 625k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 7, False: 625k]
  |  |  ------------------
  |  |  877|     18|      *nextTokPtr = ptr;                                                       \
  |  |  878|     18|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     18|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     18|    }                                                                          \
  |  |  880|   625k|    ptr += n;                                                                  \
  |  |  881|   625k|    break;
  ------------------
  883|  6.84M|      LEAD_CASE(3)
  ------------------
  |  |  875|  6.84M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 6.84M, False: 435M]
  |  |  ------------------
  |  |  876|  6.84M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  6.84M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  6.84M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 13, False: 6.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 1, False: 6.84M]
  |  |  ------------------
  |  |  877|     14|      *nextTokPtr = ptr;                                                       \
  |  |  878|     14|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     14|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     14|    }                                                                          \
  |  |  880|  6.84M|    ptr += n;                                                                  \
  |  |  881|  6.84M|    break;
  ------------------
  884|  28.2k|      LEAD_CASE(4)
  ------------------
  |  |  875|  28.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 28.2k, False: 442M]
  |  |  ------------------
  |  |  876|  28.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  28.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  28.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 17, False: 28.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 28.2k]
  |  |  ------------------
  |  |  877|     19|      *nextTokPtr = ptr;                                                       \
  |  |  878|     19|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     19|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     19|    }                                                                          \
  |  |  880|  28.2k|    ptr += n;                                                                  \
  |  |  881|  28.2k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   333k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 333k, False: 442M]
  ------------------
  887|   333k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   333k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   333k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 333k, False: 264]
  |  |  ------------------
  ------------------
  888|   333k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|   333k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 327k, False: 6.12k]
  ------------------
  889|   327k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   327k|#  define MINBPC(enc) 1
  ------------------
  890|   327k|          break;
  891|   327k|        }
  892|  6.12k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  6.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  6.12k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 5.91k, False: 210]
  |  |  ------------------
  ------------------
  893|  5.91k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  5.91k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 5.90k, False: 6]
  ------------------
  894|  5.90k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.90k|#  define MINBPC(enc) 1
  ------------------
  895|  5.90k|            break;
  896|  5.90k|          }
  897|      6|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      6|#  define MINBPC(enc) 1
  ------------------
  898|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  899|  5.91k|        }
  900|  6.12k|      }
  901|       |      /* fall through */
  902|  75.3k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 74.8k, False: 442M]
  ------------------
  903|   281k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 205k, False: 442M]
  ------------------
  904|   281k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 41, False: 442M]
  ------------------
  905|   281k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 6, False: 442M]
  ------------------
  906|   281k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 10, False: 442M]
  ------------------
  907|   283k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 2.59k, False: 442M]
  ------------------
  908|  16.2M|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 15.9M, False: 426M]
  ------------------
  909|  16.2M|      *nextTokPtr = ptr;
  910|  16.2M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   418M|    default:
  ------------------
  |  Branch (911:5): [True: 418M, False: 24.0M]
  ------------------
  912|   418M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   418M|#  define MINBPC(enc) 1
  ------------------
  913|   418M|      break;
  914|   442M|    }
  915|   442M|  }
  916|   273k|  *nextTokPtr = ptr;
  917|   273k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   273k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  16.4M|}
xmltok.c:normal_scanLt:
  726|  2.50M|               const char **nextTokPtr) {
  727|  2.50M|#  ifdef XML_NS
  728|  2.50M|  int hadColon;
  729|  2.50M|#  endif
  730|  2.50M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.50M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.50M|    {                                                                          \
  |  |  |  |  135|  2.50M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.50M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.50M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 26, False: 2.50M]
  |  |  |  |  ------------------
  |  |  |  |  136|     26|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     26|      }                                                                        \
  |  |  |  |  138|  2.50M|    }
  |  |  ------------------
  ------------------
  731|  2.50M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.50M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.50M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|   235k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.49M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.50M]
  |  |  ------------------
  |  |  111|  2.49M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  2.49M|    /* fall through */                                                         \
  |  |  116|  2.49M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 228k, False: 2.27M]
  |  |  ------------------
  |  |  117|  2.49M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.26M, False: 245k]
  |  |  ------------------
  |  |  118|  2.49M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.49M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.49M|    break;                                                                     \
  |  |  120|  2.49M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.57k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.58k, False: 2.50M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.58k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.57k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.58k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.16k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.58k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.57k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.57k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.57k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|  1.58k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.57k|    break;
  |  |  ------------------
  |  |  121|  1.87k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.84k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.87k, False: 2.50M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.87k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.84k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.87k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.74k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.87k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.86k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.86k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 22, False: 1.84k]
  |  |  |  |  ------------------
  |  |  |  |  103|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     26|    }                                                                          \
  |  |  |  |  106|  1.87k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.84k|    break;
  |  |  ------------------
  |  |  122|  1.84k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6, False: 2.50M]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      8|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.97k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.97k, False: 2.50M]
  ------------------
  734|  1.97k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.97k|#  define MINBPC(enc) 1
  ------------------
  735|  1.97k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.97k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.97k|    {                                                                          \
  |  |  |  |  135|  1.97k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.97k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.97k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.97k|    }
  |  |  ------------------
  ------------------
  736|  1.97k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.97k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 24, False: 1.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    559|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 559, False: 1.41k]
  ------------------
  738|    559|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    559|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    559|#  define MINBPC(enc) 1
  ------------------
  739|  1.39k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.39k, False: 583]
  ------------------
  740|  1.39k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.39k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.39k|#  define MINBPC(enc) 1
  ------------------
  741|  1.97k|    }
  742|     24|    *nextTokPtr = ptr;
  743|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  744|  3.50k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.50k, False: 2.50M]
  ------------------
  745|  3.50k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.50k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.50k|#  define MINBPC(enc) 1
  ------------------
  746|  7.57k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 7.57k, False: 2.49M]
  ------------------
  747|  7.57k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.57k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.57k|#  define MINBPC(enc) 1
  ------------------
  748|     46|  default:
  ------------------
  |  Branch (748:3): [True: 46, False: 2.50M]
  ------------------
  749|     46|    *nextTokPtr = ptr;
  750|     46|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     46|#define XML_TOK_INVALID 0
  ------------------
  751|  2.50M|  }
  752|  2.49M|#  ifdef XML_NS
  753|  2.49M|  hadColon = 0;
  754|  2.49M|#  endif
  755|       |  /* we have a start-tag */
  756|  3.29M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  3.29M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.29M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.29M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|  2.79M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   797k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.29M]
  |  |  ------------------
  |  |   82|   797k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|   797k|    /* fall through */                                                         \
  |  |   87|   797k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 459k, False: 2.83M]
  |  |  ------------------
  |  |   88|   755k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 296k, False: 2.99M]
  |  |  ------------------
  |  |   89|   782k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 26.7k, False: 3.26M]
  |  |  ------------------
  |  |   90|   787k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 5.41k, False: 3.28M]
  |  |  ------------------
  |  |   91|   797k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 9.89k, False: 3.28M]
  |  |  ------------------
  |  |   92|   797k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   797k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   797k|    break;                                                                     \
  |  |   94|   797k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    616|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 630, False: 3.29M]
  |  |  |  |  ------------------
  |  |  |  |   71|    630|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 629]
  |  |  |  |  ------------------
  |  |  |  |   72|    616|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    629|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.25k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    629|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 621]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    621|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    621|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 616]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    629|    ptr += n;                                                                  \
  |  |  |  |   78|    616|    break;
  |  |  ------------------
  |  |   95|  3.42k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  3.40k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 3.42k, False: 3.29M]
  |  |  |  |  ------------------
  |  |  |  |   71|  3.42k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 3.42k]
  |  |  |  |  ------------------
  |  |  |  |   72|  3.40k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  3.42k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.85k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.42k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 3.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  3.42k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.42k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 20, False: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|  3.42k|    ptr += n;                                                                  \
  |  |  |  |   78|  3.40k|    break;
  |  |  ------------------
  |  |   96|  3.40k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 3.29M]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     18|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      2|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 3.29M]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  10.6k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 10.6k, False: 3.28M]
  ------------------
  777|  11.0k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 354, False: 3.29M]
  ------------------
  778|  35.5k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 24.4k, False: 3.27M]
  ------------------
  779|  35.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  35.5k|#  define MINBPC(enc) 1
  ------------------
  780|   197k|      while (HAS_CHAR(enc, ptr, end)) {
  781|   197k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   197k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   197k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  11.6k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 197k]
  |  |  ------------------
  |  |  111|  11.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  11.3k|    /* fall through */                                                         \
  |  |  116|  11.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 9.68k, False: 187k]
  |  |  ------------------
  |  |  117|  11.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.61k, False: 195k]
  |  |  ------------------
  |  |  118|  11.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  11.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  11.3k|    break;                                                                     \
  |  |  120|  11.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    605|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 615, False: 196k]
  |  |  |  |  ------------------
  |  |  |  |  100|    615|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 614]
  |  |  |  |  ------------------
  |  |  |  |  101|    605|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    614|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.22k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    614|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 607]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    607|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    607|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 605]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    614|    ptr += n;                                                                  \
  |  |  |  |  107|    605|    break;
  |  |  ------------------
  |  |  121|    605|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    346|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 361, False: 196k]
  |  |  |  |  ------------------
  |  |  |  |  100|    361|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 359]
  |  |  |  |  ------------------
  |  |  |  |  101|    346|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    359|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    718|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    359|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 355]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    355|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    355|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 9, False: 346]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|    359|    ptr += n;                                                                  \
  |  |  |  |  107|    346|    break;
  |  |  ------------------
  |  |  122|    346|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 197k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      4|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  21.9k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 21.9k, False: 175k]
  ------------------
  784|  21.9k|          goto gt;
  785|  1.16k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 1.16k, False: 196k]
  ------------------
  786|  1.16k|          goto sol;
  787|  16.7k|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 16.7k, False: 180k]
  ------------------
  788|  17.3k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 608, False: 196k]
  ------------------
  789|   161k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 144k, False: 52.8k]
  ------------------
  790|   161k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   161k|#  define MINBPC(enc) 1
  ------------------
  791|   161k|          continue;
  792|     13|        default:
  ------------------
  |  Branch (792:9): [True: 13, False: 197k]
  ------------------
  793|     13|          *nextTokPtr = ptr;
  794|     13|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  795|   197k|        }
  796|  12.2k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  12.2k|#define PREFIX(ident) normal_##ident
  ------------------
  797|   197k|      }
  798|     37|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  35.5k|    }
  800|  2.45M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.45M, False: 843k]
  ------------------
  801|  2.47M|    gt:
  802|  2.47M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.47M|#  define MINBPC(enc) 1
  ------------------
  803|  2.47M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.47M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  6.17k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 6.17k, False: 3.28M]
  ------------------
  805|  7.33k|    sol:
  806|  7.33k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.33k|#  define MINBPC(enc) 1
  ------------------
  807|  7.33k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.33k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.33k|    {                                                                          \
  |  |  |  |  135|  7.33k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.33k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 7.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  7.33k|    }
  |  |  ------------------
  ------------------
  808|  7.32k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.32k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 16, False: 7.31k]
  ------------------
  809|     16|        *nextTokPtr = ptr;
  810|     16|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  811|     16|      }
  812|  7.31k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.31k|#  define MINBPC(enc) 1
  ------------------
  813|  7.31k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  7.31k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     28|    default:
  ------------------
  |  Branch (814:5): [True: 28, False: 3.29M]
  ------------------
  815|     28|      *nextTokPtr = ptr;
  816|     28|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  817|  3.29M|    }
  818|  3.29M|  }
  819|     96|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     96|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.49M|}
xmltok.c:normal_scanCdataSection:
  337|  1.39k|                         const char **nextTokPtr) {
  338|  1.39k|  static const char CDATA_LSQB[]
  339|  1.39k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.39k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.39k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.39k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.39k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.39k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.39k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.39k|  int i;
  341|  1.39k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.39k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.39k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.39k|    {                                                                          \
  |  |  135|  1.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.39k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.39k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.39k|    }
  ------------------
  344|  9.67k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  8.27k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 8.29k, False: 1.37k]
  ------------------
  345|  8.29k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  8.29k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 16, False: 8.27k]
  ------------------
  346|     16|      *nextTokPtr = ptr;
  347|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  348|     16|    }
  349|  8.29k|  }
  350|  1.37k|  *nextTokPtr = ptr;
  351|  1.37k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.37k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.39k|}
xmltok.c:normal_scanEndTag:
  432|  7.57k|                   const char **nextTokPtr) {
  433|  7.57k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.57k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.57k|    {                                                                          \
  |  |  |  |  135|  7.57k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.57k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 7.57k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  7.57k|    }
  |  |  ------------------
  ------------------
  434|  7.57k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.57k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  4.34k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.88k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 7.57k]
  |  |  ------------------
  |  |  111|  6.88k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  6.88k|    /* fall through */                                                         \
  |  |  116|  6.88k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.96k, False: 4.61k]
  |  |  ------------------
  |  |  117|  6.88k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.91k, False: 3.66k]
  |  |  ------------------
  |  |  118|  6.88k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  6.88k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  6.88k|    break;                                                                     \
  |  |  120|  6.88k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    380|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 391, False: 7.18k]
  |  |  |  |  ------------------
  |  |  |  |  100|    391|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 390]
  |  |  |  |  ------------------
  |  |  |  |  101|    380|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    390|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    780|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    390|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 383]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    383|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    383|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 380]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|    390|    ptr += n;                                                                  \
  |  |  |  |  107|    380|    break;
  |  |  ------------------
  |  |  121|    380|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    288|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 296, False: 7.28k]
  |  |  |  |  ------------------
  |  |  |  |  100|    296|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 295]
  |  |  |  |  ------------------
  |  |  |  |  101|    288|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    295|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    590|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    295|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 292]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    292|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    292|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 288]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    295|    ptr += n;                                                                  \
  |  |  |  |  107|    288|    break;
  |  |  ------------------
  |  |  122|    288|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 7.57k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      8|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      4|  default:
  ------------------
  |  Branch (436:3): [True: 4, False: 7.57k]
  ------------------
  437|      4|    *nextTokPtr = ptr;
  438|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  439|  7.57k|  }
  440|  1.30M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.30M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.30M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  2.59M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.30M]
  |  |  ------------------
  |  |   82|  2.16k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.16k|    /* fall through */                                                         \
  |  |   87|  2.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.08k, False: 1.30M]
  |  |  ------------------
  |  |   88|  1.38k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 307, False: 1.30M]
  |  |  ------------------
  |  |   89|  1.71k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 322, False: 1.30M]
  |  |  ------------------
  |  |   90|  1.90k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 1.30M]
  |  |  ------------------
  |  |   91|  2.16k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 259, False: 1.30M]
  |  |  ------------------
  |  |   92|  2.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.16k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.16k|    break;                                                                     \
  |  |   94|  2.16k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    558|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 564, False: 1.30M]
  |  |  |  |  ------------------
  |  |  |  |   71|    564|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 563]
  |  |  |  |  ------------------
  |  |  |  |   72|    558|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    563|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.12k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    563|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 561]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    561|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    561|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 558]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|    563|    ptr += n;                                                                  \
  |  |  |  |   78|    558|    break;
  |  |  ------------------
  |  |   95|  1.29M|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.29M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.29M, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.29M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.29M]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.29M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.29M|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.58M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.29M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.29M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.29M|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.29M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 31, False: 1.29M]
  |  |  |  |  ------------------
  |  |  |  |   74|     33|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     33|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     33|    }                                                                          \
  |  |  |  |   77|  1.29M|    ptr += n;                                                                  \
  |  |  |  |   78|  1.29M|    break;
  |  |  ------------------
  |  |   96|  1.29M|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 1.30M]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     13|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    724|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 724, False: 1.30M]
  ------------------
  444|  1.62k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 896, False: 1.30M]
  ------------------
  445|  2.31k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 695, False: 1.30M]
  ------------------
  446|  3.72k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.31k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
  447|  3.72k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.72k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.72k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    210|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 210, False: 3.51k]
  ------------------
  449|  1.11k|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 904, False: 2.81k]
  ------------------
  450|  1.43k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 325, False: 3.39k]
  ------------------
  451|  1.43k|          break;
  452|  2.27k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 2.27k, False: 1.44k]
  ------------------
  453|  2.27k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.27k|#  define MINBPC(enc) 1
  ------------------
  454|  2.27k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.27k|#define XML_TOK_END_TAG 5
  ------------------
  455|      9|        default:
  ------------------
  |  Branch (455:9): [True: 9, False: 3.71k]
  ------------------
  456|      9|          *nextTokPtr = ptr;
  457|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  458|  3.72k|        }
  459|  3.72k|      }
  460|     34|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.30M]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|  5.09k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 5.09k, False: 1.29M]
  ------------------
  469|  5.09k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.09k|#  define MINBPC(enc) 1
  ------------------
  470|  5.09k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  5.09k|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 1.30M]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  1.30M|    }
  475|  1.30M|  }
  476|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  7.55k|}
xmltok.c:normal_scanAtts:
  573|  12.2k|                 const char **nextTokPtr) {
  574|  12.2k|#  ifdef XML_NS
  575|  12.2k|  int hadColon = 0;
  576|  12.2k|#  endif
  577|  2.81M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  2.81M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.81M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.81M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  1.39M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   800k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.81M]
  |  |  ------------------
  |  |   82|   800k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|   800k|    /* fall through */                                                         \
  |  |   87|   800k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 320k, False: 2.49M]
  |  |  ------------------
  |  |   88|   324k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.14k, False: 2.81M]
  |  |  ------------------
  |  |   89|   369k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 45.1k, False: 2.77M]
  |  |  ------------------
  |  |   90|   371k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.73k, False: 2.81M]
  |  |  ------------------
  |  |   91|   800k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 429k, False: 2.38M]
  |  |  ------------------
  |  |   92|   800k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   800k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   800k|    break;                                                                     \
  |  |   94|   800k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.18k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.19k, False: 2.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.19k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.19k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.18k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.19k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.38k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.19k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 1.18k]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|  1.19k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.18k|    break;
  |  |  ------------------
  |  |   95|  1.47k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.43k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.47k, False: 2.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.47k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.43k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.47k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.95k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.47k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 35, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |   74|     40|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     40|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     40|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     40|    }                                                                          \
  |  |  |  |   77|  1.47k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.43k|    break;
  |  |  ------------------
  |  |   96|  1.43k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 29, False: 2.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|     29|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 28]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     28|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     56|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     28|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 17, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     11|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     28|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     28|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     28|    }                                                                          \
  |  |  |  |   77|     28|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 2.81M]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|  2.19k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 2.19k, False: 2.81M]
  ------------------
  598|  4.04k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 1.85k, False: 2.81M]
  ------------------
  599|  4.59k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 544, False: 2.81M]
  ------------------
  600|  5.67k|      for (;;) {
  601|  5.67k|        int t;
  602|       |
  603|  5.67k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.67k|#  define MINBPC(enc) 1
  ------------------
  604|  5.67k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.67k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.67k|    {                                                                          \
  |  |  |  |  135|  5.67k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.67k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 5.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  5.67k|    }
  |  |  ------------------
  ------------------
  605|  5.63k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  5.63k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  5.63k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 4.54k, False: 1.09k]
  ------------------
  607|  4.54k|          break;
  608|  1.09k|        switch (t) {
  609|    240|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 240, False: 853]
  ------------------
  610|    468|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 228, False: 865]
  ------------------
  611|  1.08k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 619, False: 474]
  ------------------
  612|  1.08k|          break;
  613|      6|        default:
  ------------------
  |  Branch (613:9): [True: 6, False: 1.08k]
  ------------------
  614|      6|          *nextTokPtr = ptr;
  615|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  616|  1.09k|        }
  617|  1.09k|      }
  618|       |      /* fall through */
  619|  2.01M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 2.01M, False: 807k]
  ------------------
  620|  2.01M|      int open;
  621|  2.01M|#  ifdef XML_NS
  622|  2.01M|      hadColon = 0;
  623|  2.01M|#  endif
  624|  2.01M|      for (;;) {
  625|  2.01M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.01M|#  define MINBPC(enc) 1
  ------------------
  626|  2.01M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.01M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.01M|    {                                                                          \
  |  |  |  |  135|  2.01M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.01M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.01M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 2.01M]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  2.01M|    }
  |  |  ------------------
  ------------------
  627|  2.01M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.01M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.01M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  2.01M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 65.6k, False: 1.94M]
  |  Branch (628:32): [True: 1.94M, False: 822]
  ------------------
  629|  2.01M|          break;
  630|    822|        switch (open) {
  631|    302|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 302, False: 520]
  ------------------
  632|    525|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 223, False: 599]
  ------------------
  633|    807|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 282, False: 540]
  ------------------
  634|    807|          break;
  635|     15|        default:
  ------------------
  |  Branch (635:9): [True: 15, False: 807]
  ------------------
  636|     15|          *nextTokPtr = ptr;
  637|     15|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  638|    822|        }
  639|    822|      }
  640|  2.01M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.01M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  8.70M|      for (;;) {
  643|  8.70M|        int t;
  644|  8.70M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.70M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.70M|    {                                                                          \
  |  |  |  |  135|  8.70M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.70M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  8.70M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 53, False: 8.70M]
  |  |  |  |  ------------------
  |  |  |  |  136|     53|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     53|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     53|      }                                                                        \
  |  |  |  |  138|  8.70M|    }
  |  |  ------------------
  ------------------
  645|  8.70M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  8.70M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.70M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  8.70M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 2.01M, False: 6.69M]
  ------------------
  647|  2.01M|          break;
  648|  6.69M|        switch (t) {
  649|  4.37M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.37k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.36k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.37k, False: 6.69M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.37k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.37k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.36k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.37k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.37k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.37k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  2.37k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.36k|    break;
  |  |  ------------------
  |  |   61|  2.18M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.18M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.18M, False: 4.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.18M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.18M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.18M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.18M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.18M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.18M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.18M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  2.18M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.18M|    break;
  |  |  ------------------
  |  |   62|  2.18M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.09k, False: 6.69M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.09k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 4.09k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.09k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.09k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.09k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 4.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  4.09k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.08k|    break;
  |  |  ------------------
  |  |   63|  4.08k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 4, False: 6.69M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 6.69M]
  |  |  ------------------
  |  |   65|      8|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 6.69M]
  |  |  ------------------
  |  |   66|      8|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      8|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  54.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 54.9k, False: 6.63M]
  ------------------
  651|  54.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  54.9k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  54.9k|#  define MINBPC(enc) 1
  ------------------
  652|  54.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 24, False: 54.9k]
  ------------------
  653|     24|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 22, False: 2]
  ------------------
  654|     22|              *nextTokPtr = ptr;
  655|     24|            return tok;
  656|     24|          }
  657|  54.9k|          break;
  658|  54.9k|        }
  659|  54.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 27, False: 6.69M]
  ------------------
  660|     27|          *nextTokPtr = ptr;
  661|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  662|  4.45M|        default:
  ------------------
  |  Branch (662:9): [True: 4.45M, False: 2.24M]
  ------------------
  663|  4.45M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.45M|#  define MINBPC(enc) 1
  ------------------
  664|  4.45M|          break;
  665|  6.69M|        }
  666|  6.69M|      }
  667|  2.01M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.01M|#  define MINBPC(enc) 1
  ------------------
  668|  2.01M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.01M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.01M|    {                                                                          \
  |  |  |  |  135|  2.01M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.01M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.01M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.01M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.01M|    }
  |  |  ------------------
  ------------------
  669|  2.01M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.01M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.01M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  1.04M|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 1.04M, False: 967k]
  ------------------
  671|  2.00M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 957k, False: 1.05M]
  ------------------
  672|  2.00M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 2.34k, False: 2.01M]
  ------------------
  673|  2.00M|        break;
  674|  3.14k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 3.14k, False: 2.01M]
  ------------------
  675|  3.14k|        goto sol;
  676|  4.11k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 4.11k, False: 2.01M]
  ------------------
  677|  4.11k|        goto gt;
  678|     33|      default:
  ------------------
  |  Branch (678:7): [True: 33, False: 2.01M]
  ------------------
  679|     33|        *nextTokPtr = ptr;
  680|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  681|  2.01M|      }
  682|       |      /* ptr points to closing quote */
  683|  2.46M|      for (;;) {
  684|  2.46M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.46M|#  define MINBPC(enc) 1
  ------------------
  685|  2.46M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.46M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.46M|    {                                                                          \
  |  |  |  |  135|  2.46M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.46M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.46M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 2.46M]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|  2.46M|    }
  |  |  ------------------
  ------------------
  686|  2.46M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.46M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.46M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  1.99M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.99M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.46M]
  |  |  ------------------
  |  |  111|  1.99M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  1.99M|    /* fall through */                                                         \
  |  |  116|  1.99M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.99M, False: 467k]
  |  |  ------------------
  |  |  117|  1.99M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 6.02k, False: 2.45M]
  |  |  ------------------
  |  |  118|  1.99M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.99M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.99M|    break;                                                                     \
  |  |  120|  1.99M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.43k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.43k, False: 2.45M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.43k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.43k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.43k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.87k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.43k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.43k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.43k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  1.43k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.43k|    break;
  |  |  ------------------
  |  |  121|  1.43k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.38k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.39k, False: 2.45M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.39k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.39k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.38k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.39k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.78k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.38k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.38k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 1.38k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  1.39k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.38k|    break;
  |  |  ------------------
  |  |  122|  1.38k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 2.46M]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     32|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      5|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|   445k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 445k, False: 2.01M]
  ------------------
  689|   452k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 7.62k, False: 2.45M]
  ------------------
  690|   454k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 1.41k, False: 2.45M]
  ------------------
  691|   454k|          continue;
  692|    472|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 472, False: 2.46M]
  ------------------
  693|  4.58k|        gt:
  694|  4.58k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.58k|#  define MINBPC(enc) 1
  ------------------
  695|  4.58k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.58k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  3.98k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 3.98k, False: 2.45M]
  ------------------
  697|  7.12k|        sol:
  698|  7.12k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.12k|#  define MINBPC(enc) 1
  ------------------
  699|  7.12k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.12k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.12k|    {                                                                          \
  |  |  |  |  135|  7.12k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.12k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 7.12k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  7.12k|    }
  |  |  ------------------
  ------------------
  700|  7.12k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.12k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 11, False: 7.11k]
  ------------------
  701|     11|            *nextTokPtr = ptr;
  702|     11|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  703|     11|          }
  704|  7.11k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.11k|#  define MINBPC(enc) 1
  ------------------
  705|  7.11k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  7.11k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      7|        default:
  ------------------
  |  Branch (706:9): [True: 7, False: 2.46M]
  ------------------
  707|      7|          *nextTokPtr = ptr;
  708|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  709|  2.46M|        }
  710|  2.00M|        break;
  711|  2.46M|      }
  712|  2.00M|      break;
  713|  2.00M|    }
  714|  2.00M|    default:
  ------------------
  |  Branch (714:5): [True: 32, False: 2.81M]
  ------------------
  715|     32|      *nextTokPtr = ptr;
  716|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  717|  2.81M|    }
  718|  2.81M|  }
  719|     93|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     93|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  12.2k|}
xmltok.c:normal_scanRef:
  545|   713k|                const char **nextTokPtr) {
  546|   713k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   713k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   713k|    {                                                                          \
  |  |  |  |  135|   713k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   713k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   713k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 47, False: 713k]
  |  |  |  |  ------------------
  |  |  |  |  136|     47|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     47|      }                                                                        \
  |  |  |  |  138|   713k|    }
  |  |  ------------------
  ------------------
  547|   713k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   713k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   713k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|   657k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   665k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 713k]
  |  |  ------------------
  |  |  111|   665k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|   665k|    /* fall through */                                                         \
  |  |  116|   665k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 655k, False: 57.4k]
  |  |  ------------------
  |  |  117|   665k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 9.31k, False: 704k]
  |  |  ------------------
  |  |  118|   665k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   665k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   665k|    break;                                                                     \
  |  |  120|   665k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    278|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 285, False: 713k]
  |  |  |  |  ------------------
  |  |  |  |  100|    285|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 284]
  |  |  |  |  ------------------
  |  |  |  |  101|    278|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    284|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    568|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    284|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 280]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    280|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    280|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 278]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|    284|    ptr += n;                                                                  \
  |  |  |  |  107|    278|    break;
  |  |  ------------------
  |  |  121|    307|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    301|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 307, False: 713k]
  |  |  |  |  ------------------
  |  |  |  |  100|    307|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 304]
  |  |  |  |  ------------------
  |  |  |  |  101|    301|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    304|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    608|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    304|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 302]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    302|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    302|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 301]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    304|    ptr += n;                                                                  \
  |  |  |  |  107|    301|    break;
  |  |  ------------------
  |  |  122|    301|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 713k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     18|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|      9|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  47.5k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 47.5k, False: 665k]
  ------------------
  550|  47.5k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  47.5k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  47.5k|#  define MINBPC(enc) 1
  ------------------
  551|     23|  default:
  ------------------
  |  Branch (551:3): [True: 23, False: 713k]
  ------------------
  552|     23|    *nextTokPtr = ptr;
  553|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  554|   713k|  }
  555|   759k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   759k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   759k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   759k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|   307k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  92.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 759k]
  |  |  ------------------
  |  |   82|  92.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  92.7k|    /* fall through */                                                         \
  |  |   87|  92.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 31.0k, False: 728k]
  |  |  ------------------
  |  |   88|  90.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 59.8k, False: 699k]
  |  |  ------------------
  |  |   89|  91.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 829, False: 758k]
  |  |  ------------------
  |  |   90|  92.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 548, False: 758k]
  |  |  ------------------
  |  |   91|  92.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 407, False: 758k]
  |  |  ------------------
  |  |   92|  92.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  92.7k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  92.7k|    break;                                                                     \
  |  |   94|  92.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    320|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 330, False: 758k]
  |  |  |  |  ------------------
  |  |  |  |   71|    330|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 327]
  |  |  |  |  ------------------
  |  |  |  |   72|    320|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    327|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    654|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    327|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 321]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    321|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    321|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 320]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    327|    ptr += n;                                                                  \
  |  |  |  |   78|    320|    break;
  |  |  ------------------
  |  |   95|    364|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    355|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 364, False: 758k]
  |  |  |  |  ------------------
  |  |  |  |   71|    364|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 363]
  |  |  |  |  ------------------
  |  |  |  |   72|    355|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    363|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    726|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    363|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 358]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    358|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    358|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 355]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    363|    ptr += n;                                                                  \
  |  |  |  |   78|    355|    break;
  |  |  ------------------
  |  |   96|    355|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 29, False: 759k]
  |  |  |  |  ------------------
  |  |  |  |   71|     29|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 27]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     27|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     54|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     27|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 24, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     27|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     27|    }                                                                          \
  |  |  |  |   77|     27|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   665k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 665k, False: 93.4k]
  ------------------
  559|   665k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   665k|#  define MINBPC(enc) 1
  ------------------
  560|   665k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   665k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     15|    default:
  ------------------
  |  Branch (561:5): [True: 15, False: 759k]
  ------------------
  562|     15|      *nextTokPtr = ptr;
  563|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  564|   759k|    }
  565|   759k|  }
  566|     49|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   665k|}
xmltok.c:normal_scanCharRef:
  514|  47.5k|                    const char **nextTokPtr) {
  515|  47.5k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  47.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  47.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  47.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 47.5k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  47.5k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  47.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 31.9k, False: 15.5k]
  |  |  ------------------
  ------------------
  517|  31.9k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  31.9k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  31.9k|#  define MINBPC(enc) 1
  ------------------
  518|  15.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  15.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  15.5k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 15.5k, False: 21]
  ------------------
  520|  15.5k|      break;
  521|     21|    default:
  ------------------
  |  Branch (521:5): [True: 21, False: 15.5k]
  ------------------
  522|     21|      *nextTokPtr = ptr;
  523|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  524|  15.5k|    }
  525|  22.2k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  15.5k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  6.67k|#  define MINBPC(enc) 1
  ------------------
  526|  22.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  22.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  6.67k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 6.67k, False: 15.5k]
  ------------------
  528|  6.67k|        break;
  529|  15.5k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 15.5k, False: 6.68k]
  ------------------
  530|  15.5k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  15.5k|#  define MINBPC(enc) 1
  ------------------
  531|  15.5k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  15.5k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     10|      default:
  ------------------
  |  Branch (532:7): [True: 10, False: 22.2k]
  ------------------
  533|     10|        *nextTokPtr = ptr;
  534|     10|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  535|  22.2k|      }
  536|  22.2k|    }
  537|  15.5k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  47.5k|}
xmltok.c:normal_scanHexCharRef:
  483|  31.9k|                       const char **nextTokPtr) {
  484|  31.9k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  31.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  31.9k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 31.9k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  31.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  31.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  31.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  28.2k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 28.2k, False: 3.75k]
  ------------------
  487|  31.9k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.74k, False: 28.2k]
  ------------------
  488|  31.9k|      break;
  489|      6|    default:
  ------------------
  |  Branch (489:5): [True: 6, False: 31.9k]
  ------------------
  490|      6|      *nextTokPtr = ptr;
  491|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  492|  31.9k|    }
  493|   100k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  31.9k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  68.4k|#  define MINBPC(enc) 1
  ------------------
  494|   100k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   100k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   100k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  8.10k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 8.10k, False: 92.2k]
  ------------------
  496|  68.4k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 60.3k, False: 40.0k]
  ------------------
  497|  68.4k|        break;
  498|  31.9k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 31.9k, False: 68.4k]
  ------------------
  499|  31.9k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  31.9k|#  define MINBPC(enc) 1
  ------------------
  500|  31.9k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  31.9k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     12|      default:
  ------------------
  |  Branch (501:7): [True: 12, False: 100k]
  ------------------
  502|     12|        *nextTokPtr = ptr;
  503|     12|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  504|   100k|      }
  505|   100k|    }
  506|  31.9k|  }
  507|     13|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  31.9k|}
xmltok.c:normal_cdataSectionTok:
  356|  61.1k|                        const char **nextTokPtr) {
  357|  61.1k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 145, False: 61.0k]
  ------------------
  358|    145|    return XML_TOK_NONE;
  ------------------
  |  |   51|    145|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  61.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  61.0k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|      0|    size_t n = end - ptr;
  361|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (361:9): [True: 0, False: 0]
  ------------------
  362|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  363|      0|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 0, False: 0]
  ------------------
  364|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|      0|      end = ptr + n;
  366|      0|    }
  367|      0|  }
  368|  61.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  61.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  61.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  19.6k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 19.6k, False: 41.3k]
  ------------------
  370|  19.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.6k|#  define MINBPC(enc) 1
  ------------------
  371|  19.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  19.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  19.6k|    {                                                                          \
  |  |  |  |  135|  19.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  19.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  19.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  19.6k|    }
  |  |  ------------------
  ------------------
  372|  19.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  19.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 9.69k, False: 9.92k]
  ------------------
  373|  9.69k|      break;
  374|  9.92k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.92k|#  define MINBPC(enc) 1
  ------------------
  375|  9.92k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.92k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.92k|    {                                                                          \
  |  |  |  |  135|  9.92k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.92k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  9.92k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 9.91k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  9.92k|    }
  |  |  ------------------
  ------------------
  376|  9.91k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  9.91k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 8.76k, False: 1.14k]
  ------------------
  377|  8.76k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  8.76k|#  define MINBPC(enc) 1
  ------------------
  378|  8.76k|      break;
  379|  8.76k|    }
  380|  1.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.14k|#  define MINBPC(enc) 1
  ------------------
  381|  1.14k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.14k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  3.36k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 3.36k, False: 57.6k]
  ------------------
  383|  3.36k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.36k|#  define MINBPC(enc) 1
  ------------------
  384|  3.36k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.36k|    {                                                                          \
  |  |  |  |  135|  3.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.36k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 3.35k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  3.36k|    }
  |  |  ------------------
  ------------------
  385|  3.35k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  3.35k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.46k, False: 1.88k]
  ------------------
  386|  1.46k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.46k|#  define MINBPC(enc) 1
  ------------------
  387|  3.35k|    *nextTokPtr = ptr;
  388|  3.35k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.35k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  21.0k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 21.0k, False: 39.9k]
  ------------------
  390|  21.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  21.0k|#  define MINBPC(enc) 1
  ------------------
  391|  21.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  21.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  29.0k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.04k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.02k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.04k, False: 58.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.04k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 2.03k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.02k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.03k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.03k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.03k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 2.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     10|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     10|    }                                                                          \
  |  |  |  |   56|  2.03k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.02k|    break;
  |  |  ------------------
  |  |   61|  6.20k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.19k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.20k, False: 54.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.20k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 6.19k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.19k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.19k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.19k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 6.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  6.19k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.19k|    break;
  |  |  ------------------
  |  |   62|  6.25k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.25k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.25k, False: 54.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.25k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 6.25k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.25k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.25k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.25k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.25k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 6.25k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  6.25k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.25k|    break;
  |  |  ------------------
  |  |   63|  6.25k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 60.9k]
  |  |  ------------------
  |  |   64|     17|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 5, False: 60.9k]
  |  |  ------------------
  |  |   65|     27|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 60.9k]
  |  |  ------------------
  |  |   66|     27|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     27|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  2.46k|  default:
  ------------------
  |  Branch (393:3): [True: 2.46k, False: 58.5k]
  ------------------
  394|  2.46k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.46k|#  define MINBPC(enc) 1
  ------------------
  395|  2.46k|    break;
  396|  61.0k|  }
  397|  5.30M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  5.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.30M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.30M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|  15.6k|      LEAD_CASE(2)
  ------------------
  |  |  400|  15.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 15.6k, False: 5.29M]
  |  |  ------------------
  |  |  401|  15.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  15.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  15.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 15.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 3, False: 15.5k]
  |  |  ------------------
  |  |  402|      9|      *nextTokPtr = ptr;                                                       \
  |  |  403|      9|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      9|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      9|    }                                                                          \
  |  |  405|  15.5k|    ptr += n;                                                                  \
  |  |  406|  15.5k|    break;
  ------------------
  408|  5.14M|      LEAD_CASE(3)
  ------------------
  |  |  400|  5.14M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 5.14M, False: 157k]
  |  |  ------------------
  |  |  401|  5.14M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  5.14M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.14M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 4, False: 5.14M]
  |  |  ------------------
  |  |  402|      9|      *nextTokPtr = ptr;                                                       \
  |  |  403|      9|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      9|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      9|    }                                                                          \
  |  |  405|  5.14M|    ptr += n;                                                                  \
  |  |  406|  5.14M|    break;
  ------------------
  409|  60.8k|      LEAD_CASE(4)
  ------------------
  |  |  400|  60.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 60.8k, False: 5.24M]
  |  |  ------------------
  |  |  401|  60.8k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  60.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  60.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 60.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 60.8k]
  |  |  ------------------
  |  |  402|      5|      *nextTokPtr = ptr;                                                       \
  |  |  403|      5|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      5|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      5|    }                                                                          \
  |  |  405|  60.8k|    ptr += n;                                                                  \
  |  |  406|  60.8k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|      8|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 8, False: 5.30M]
  ------------------
  412|     12|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 4, False: 5.30M]
  ------------------
  413|     20|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 8, False: 5.30M]
  ------------------
  414|    608|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 588, False: 5.30M]
  ------------------
  415|  17.9k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 17.3k, False: 5.28M]
  ------------------
  416|  35.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 17.2k, False: 5.28M]
  ------------------
  417|  35.2k|      *nextTokPtr = ptr;
  418|  35.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  35.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  45.8k|    default:
  ------------------
  |  Branch (419:5): [True: 45.8k, False: 5.25M]
  ------------------
  420|  45.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  45.8k|#  define MINBPC(enc) 1
  ------------------
  421|  45.8k|      break;
  422|  5.30M|    }
  423|  5.30M|  }
  424|    114|  *nextTokPtr = ptr;
  425|    114|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    114|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  35.3k|}
xmltok.c:normal_attributeValueTok:
 1262|   205M|                          const char **nextTokPtr) {
 1263|   205M|  const char *start;
 1264|   205M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 427k, False: 205M]
  ------------------
 1265|   427k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   427k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   205M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   205M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   205M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   205M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 205M]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|   205M|  start = ptr;
 1275|  1.28G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.28G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.28G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.28G|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|  15.7M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  15.7M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 15.7M, False: 1.27G]
  |  |  ------------------
  |  | 1279|  15.7M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  15.7M|    break;
  ------------------
 1282|   854M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   854M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 854M, False: 433M]
  |  |  ------------------
  |  | 1279|   854M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   854M|    break;
  ------------------
 1283|   452k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   452k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 452k, False: 1.28G]
  |  |  ------------------
  |  | 1279|   452k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   452k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   372k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 372k, False: 1.28G]
  ------------------
 1286|   372k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 295k, False: 76.1k]
  ------------------
 1287|   295k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   295k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   295k|#  define MINBPC(enc) 1
  ------------------
 1288|  76.1k|      *nextTokPtr = ptr;
 1289|  76.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  76.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      6|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 6, False: 1.28G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      6|      *nextTokPtr = ptr;
 1293|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1294|   160M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 160M, False: 1.12G]
  ------------------
 1295|   160M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 140M, False: 19.9M]
  ------------------
 1296|   140M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   140M|#  define MINBPC(enc) 1
  ------------------
 1297|   140M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   140M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|   140M|      }
 1299|  19.9M|      *nextTokPtr = ptr;
 1300|  19.9M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  19.9M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  1.10M|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 1.10M, False: 1.28G]
  ------------------
 1302|  1.10M|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 1.05M, False: 44.6k]
  ------------------
 1303|  1.05M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.05M|#  define MINBPC(enc) 1
  ------------------
 1304|  1.05M|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.05M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.05M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.05M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 1.56k, False: 1.05M]
  ------------------
 1305|  1.56k|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|  1.56k|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  1.05M|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.05M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.05M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 909k, False: 147k]
  ------------------
 1307|   909k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   909k|#  define MINBPC(enc) 1
  ------------------
 1308|  1.05M|        *nextTokPtr = ptr;
 1309|  1.05M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.05M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  1.05M|      }
 1311|  44.6k|      *nextTokPtr = ptr;
 1312|  44.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  44.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  43.1M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 43.1M, False: 1.24G]
  ------------------
 1314|  43.1M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 29.0M, False: 14.0M]
  ------------------
 1315|  29.0M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  29.0M|#  define MINBPC(enc) 1
  ------------------
 1316|  29.0M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  29.0M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  29.0M|      }
 1318|  14.0M|      *nextTokPtr = ptr;
 1319|  14.0M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.0M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   211M|    default:
  ------------------
  |  Branch (1320:5): [True: 211M, False: 1.07G]
  ------------------
 1321|   211M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   211M|#  define MINBPC(enc) 1
  ------------------
 1322|   211M|      break;
 1323|  1.28G|    }
 1324|  1.28G|  }
 1325|   413k|  *nextTokPtr = ptr;
 1326|   413k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   413k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   205M|}
xmltok.c:normal_entityValueTok:
 1331|  1.95M|                       const char **nextTokPtr) {
 1332|  1.95M|  const char *start;
 1333|  1.95M|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 3.84k, False: 1.95M]
  ------------------
 1334|  3.84k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.84k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  1.95M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.95M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.95M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.95M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 1.95M]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  1.95M|  start = ptr;
 1344|  10.2M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  10.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|   148k|      LEAD_CASE(2)
  ------------------
  |  | 1347|   148k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 148k, False: 10.0M]
  |  |  ------------------
  |  | 1348|   148k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   148k|    break;
  ------------------
 1351|    986|      LEAD_CASE(3)
  ------------------
  |  | 1347|    986|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 986, False: 10.2M]
  |  |  ------------------
  |  | 1348|    986|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    986|    break;
  ------------------
 1352|    372|      LEAD_CASE(4)
  ------------------
  |  | 1347|    372|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 372, False: 10.2M]
  |  |  ------------------
  |  | 1348|    372|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    372|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  25.8k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 25.8k, False: 10.1M]
  ------------------
 1355|  25.8k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 20.0k, False: 5.76k]
  ------------------
 1356|  20.0k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  20.0k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  20.0k|#  define MINBPC(enc) 1
  ------------------
 1357|  5.76k|      *nextTokPtr = ptr;
 1358|  5.76k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.76k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 10.2M]
  ------------------
 1360|      7|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 2]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      5|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      5|#  define MINBPC(enc) 1
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 3]
  ------------------
 1363|      5|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  1.35M|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 1.35M, False: 8.86M]
  ------------------
 1367|  1.35M|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 1.15M, False: 202k]
  ------------------
 1368|  1.15M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.15M|#  define MINBPC(enc) 1
  ------------------
 1369|  1.15M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.15M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  1.15M|      }
 1371|   202k|      *nextTokPtr = ptr;
 1372|   202k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   202k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   570k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 570k, False: 9.64M]
  ------------------
 1374|   570k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 409k, False: 160k]
  ------------------
 1375|   409k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   409k|#  define MINBPC(enc) 1
  ------------------
 1376|   409k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   409k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   409k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   409k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 208, False: 409k]
  ------------------
 1377|    208|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    208|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   409k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   409k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   409k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 51.0k, False: 358k]
  ------------------
 1379|  51.0k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  51.0k|#  define MINBPC(enc) 1
  ------------------
 1380|   409k|        *nextTokPtr = ptr;
 1381|   409k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   409k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   409k|      }
 1383|   160k|      *nextTokPtr = ptr;
 1384|   160k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   160k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  8.11M|    default:
  ------------------
  |  Branch (1385:5): [True: 8.11M, False: 2.10M]
  ------------------
 1386|  8.11M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.11M|#  define MINBPC(enc) 1
  ------------------
 1387|  8.11M|      break;
 1388|  10.2M|    }
 1389|  10.2M|  }
 1390|  1.68k|  *nextTokPtr = ptr;
 1391|  1.68k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.68k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  1.95M|}
xmltok.c:normal_nameMatchesAscii:
 1715|   151k|                         const char *end1, const char *ptr2) {
 1716|   151k|  UNUSED_P(enc);
  ------------------
  |  |  135|   151k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   713k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   561k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 638k, False: 74.7k]
  ------------------
 1718|   638k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   638k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 37, False: 638k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     37|      return 0; /* LCOV_EXCL_LINE */
 1725|     37|    }
 1726|   638k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   638k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 77.1k, False: 561k]
  ------------------
 1727|  77.1k|      return 0;
 1728|   638k|  }
 1729|  74.7k|  return ptr1 == end1;
 1730|   151k|}
xmltok.c:normal_nameLength:
 1733|  2.51M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.51M|  const char *start = ptr;
 1735|  6.74M|  for (;;) {
 1736|  6.74M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.74M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.74M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|  4.01k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  4.01k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 4.01k, False: 6.74M]
  |  |  ------------------
  |  | 1739|  4.01k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  4.01k|    break;
  ------------------
 1742|   887k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   887k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 887k, False: 5.85M]
  |  |  ------------------
  |  | 1739|   887k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   887k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 6.74M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 0, False: 6.74M]
  ------------------
 1746|   710k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 710k, False: 6.03M]
  ------------------
 1747|   710k|#  ifdef XML_NS
 1748|   710k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 6.74M]
  ------------------
 1749|   710k|#  endif
 1750|  3.27M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 2.56M, False: 4.18M]
  ------------------
 1751|  3.32M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 45.1k, False: 6.70M]
  ------------------
 1752|  3.32M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 6.73k, False: 6.74M]
  ------------------
 1753|  3.33M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 10.1k, False: 6.73M]
  ------------------
 1754|  3.33M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.33M|#  define MINBPC(enc) 1
  ------------------
 1755|  3.33M|      break;
 1756|  2.51M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.51M, False: 4.22M]
  ------------------
 1757|  2.51M|      return (int)(ptr - start);
 1758|  6.74M|    }
 1759|  6.74M|  }
 1760|  2.51M|}
xmltok.c:normal_getAtts:
 1510|  2.49M|                ATTRIBUTE *atts) {
 1511|  2.49M|  enum { other, inName, inValue } state = inName;
 1512|  2.49M|  int nAtts = 0;
 1513|  2.49M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  35.1M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.49M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  32.6M|#  define MINBPC(enc) 1
  ------------------
 1517|  35.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  35.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  35.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|  8.29k|      LEAD_CASE(2)
  ------------------
  |  | 1527|  8.29k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 8.29k, False: 35.1M]
  |  |  ------------------
  |  | 1528|  8.29k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  8.29k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 2.98k, False: 5.30k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  2.98k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 1.89k, False: 1.09k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  1.89k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  1.89k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  1.89k|      }                                                                        \
  |  |  |  | 1524|  2.98k|      state = inName;                                                          \
  |  |  |  | 1525|  2.98k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  8.29k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  8.29k|    break;
  ------------------
 1531|  1.82M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  1.82M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.82M, False: 33.3M]
  |  |  ------------------
  |  | 1528|  1.82M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.82M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 2.40k, False: 1.82M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  2.40k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 1.65k, False: 748]
  |  |  |  |  ------------------
  |  |  |  | 1521|  1.65k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  1.65k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  1.65k|      }                                                                        \
  |  |  |  | 1524|  2.40k|      state = inName;                                                          \
  |  |  |  | 1525|  2.40k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.82M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.82M|    break;
  ------------------
 1532|  3.16k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  3.16k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 3.16k, False: 35.1M]
  |  |  ------------------
  |  | 1528|  3.16k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  3.16k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 3.16k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  3.16k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  3.16k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 35.1M]
  ------------------
 1535|  5.78M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 5.78M, False: 29.3M]
  ------------------
 1536|  8.52M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 2.74M, False: 32.3M]
  ------------------
 1537|  8.52M|      START_NAME
  ------------------
  |  | 1519|  8.52M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 3.98M, False: 4.54M]
  |  |  ------------------
  |  | 1520|  3.98M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 2.00M, False: 1.98M]
  |  |  ------------------
  |  | 1521|  2.00M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  2.00M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  2.00M|      }                                                                        \
  |  | 1524|  3.98M|      state = inName;                                                          \
  |  | 1525|  3.98M|    }
  ------------------
 1538|  8.52M|      break;
 1539|      0|#  undef START_NAME
 1540|   255k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 255k, False: 34.8M]
  ------------------
 1541|   255k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 114k, False: 141k]
  ------------------
 1542|   114k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 65.0k, False: 49.1k]
  ------------------
 1543|  65.0k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  65.0k|#  define MINBPC(enc) 1
  ------------------
 1544|   114k|        state = inValue;
 1545|   114k|        open = BT_QUOT;
 1546|   141k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 114k, False: 27.2k]
  ------------------
 1547|   114k|        state = other;
 1548|   114k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 65.0k, False: 49.1k]
  ------------------
 1549|  65.0k|          atts[nAtts].valueEnd = ptr;
 1550|   114k|        nAtts++;
 1551|   114k|      }
 1552|   255k|      break;
 1553|  7.76M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 7.76M, False: 27.3M]
  ------------------
 1554|  7.76M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 3.87M, False: 3.88M]
  ------------------
 1555|  3.87M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 1.94M, False: 1.93M]
  ------------------
 1556|  1.94M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.94M|#  define MINBPC(enc) 1
  ------------------
 1557|  3.87M|        state = inValue;
 1558|  3.87M|        open = BT_APOS;
 1559|  3.88M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 3.87M, False: 11.1k]
  ------------------
 1560|  3.87M|        state = other;
 1561|  3.87M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 1.94M, False: 1.93M]
  ------------------
 1562|  1.94M|          atts[nAtts].valueEnd = ptr;
 1563|  3.87M|        nAtts++;
 1564|  3.87M|      }
 1565|  7.76M|      break;
 1566|  60.0k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 60.0k, False: 35.0M]
  ------------------
 1567|  60.0k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 54.7k, False: 5.34k]
  ------------------
 1568|  54.7k|        atts[nAtts].normalized = 0;
 1569|  60.0k|      break;
 1570|  3.06M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 3.06M, False: 32.0M]
  ------------------
 1571|  3.06M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 12.4k, False: 3.04M]
  ------------------
 1572|  12.4k|        state = other;
 1573|  3.04M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 72.6k, False: 2.97M]
  |  Branch (1573:36): [True: 48.8k, False: 23.8k]
  |  Branch (1573:55): [True: 26.4k, False: 22.4k]
  ------------------
 1574|  3.04M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 3.33k, False: 23.1k]
  ------------------
 1575|  26.4k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  23.1k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  49.5k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 21.7k, False: 1.39k]
  ------------------
 1576|  26.4k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  1.39k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  27.8k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 406, False: 984]
  ------------------
 1577|  26.4k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    984|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    984|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 394, False: 590]
  ------------------
 1578|  25.8k|        atts[nAtts].normalized = 0;
 1579|  3.06M|      break;
 1580|  2.93M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 2.93M, False: 32.1M]
  ------------------
 1581|  4.15M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 1.22M, False: 33.9M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  4.15M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 28.4k, False: 4.12M]
  ------------------
 1585|  28.4k|        state = other;
 1586|  4.12M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 2.05M, False: 2.06M]
  |  Branch (1586:36): [True: 2.05M, False: 1.89k]
  ------------------
 1587|  2.05M|        atts[nAtts].normalized = 0;
 1588|  4.15M|      break;
 1589|  2.49M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.49M, False: 32.6M]
  ------------------
 1590|  2.51M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 23.6k, False: 35.1M]
  ------------------
 1591|  2.51M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.49M, False: 23.4k]
  ------------------
 1592|  2.49M|        return nAtts;
 1593|  23.4k|      break;
 1594|  6.95M|    default:
  ------------------
  |  Branch (1594:5): [True: 6.95M, False: 28.1M]
  ------------------
 1595|  6.95M|      break;
 1596|  35.1M|    }
 1597|  35.1M|  }
 1598|       |  /* not reached */
 1599|  2.49M|}
xmltok.c:normal_charRefNumber:
 1602|  23.9k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  23.9k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  23.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  23.9k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  23.9k|#  define MINBPC(enc) 1
  ------------------
 1607|  23.9k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  23.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 15.6k, False: 8.34k]
  |  |  ------------------
  ------------------
 1608|  70.7k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  15.6k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  70.7k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 55.1k, False: 15.6k]
  ------------------
 1609|  55.1k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  55.1k|#  define MINBPC(enc) 1
  ------------------
 1610|  55.1k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  55.1k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  55.1k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 55.1k]
  ------------------
 1612|  1.91k|      case ASCII_0:
  ------------------
  |  |   90|  1.91k|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 1.91k, False: 53.2k]
  ------------------
 1613|  5.60k|      case ASCII_1:
  ------------------
  |  |   91|  5.60k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 3.69k, False: 51.4k]
  ------------------
 1614|  6.78k|      case ASCII_2:
  ------------------
  |  |   92|  6.78k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.18k, False: 53.9k]
  ------------------
 1615|  14.1k|      case ASCII_3:
  ------------------
  |  |   93|  14.1k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 7.38k, False: 47.7k]
  ------------------
 1616|  14.5k|      case ASCII_4:
  ------------------
  |  |   94|  14.5k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 423, False: 54.7k]
  ------------------
 1617|  15.1k|      case ASCII_5:
  ------------------
  |  |   95|  15.1k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 593, False: 54.5k]
  ------------------
 1618|  15.6k|      case ASCII_6:
  ------------------
  |  |   96|  15.6k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 492, False: 54.6k]
  ------------------
 1619|  16.1k|      case ASCII_7:
  ------------------
  |  |   97|  16.1k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 491, False: 54.6k]
  ------------------
 1620|  17.1k|      case ASCII_8:
  ------------------
  |  |   98|  17.1k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 977, False: 54.1k]
  ------------------
 1621|  20.2k|      case ASCII_9:
  ------------------
  |  |   99|  20.2k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 3.11k, False: 52.0k]
  ------------------
 1622|  20.2k|        result <<= 4;
 1623|  20.2k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  20.2k|#define ASCII_0 0x30
  ------------------
 1624|  20.2k|        break;
 1625|    298|      case ASCII_A:
  ------------------
  |  |   36|    298|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 298, False: 54.8k]
  ------------------
 1626|  11.0k|      case ASCII_B:
  ------------------
  |  |   37|  11.0k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 10.7k, False: 44.4k]
  ------------------
 1627|  11.3k|      case ASCII_C:
  ------------------
  |  |   38|  11.3k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 301, False: 54.8k]
  ------------------
 1628|  17.6k|      case ASCII_D:
  ------------------
  |  |   39|  17.6k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 6.30k, False: 48.8k]
  ------------------
 1629|  18.7k|      case ASCII_E:
  ------------------
  |  |   40|  18.7k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 1.10k, False: 54.0k]
  ------------------
 1630|  19.5k|      case ASCII_F:
  ------------------
  |  |   41|  19.5k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 783, False: 54.3k]
  ------------------
 1631|  19.5k|        result <<= 4;
 1632|  19.5k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  19.5k|#define ASCII_A 0x41
  ------------------
 1633|  19.5k|        break;
 1634|    442|      case ASCII_a:
  ------------------
  |  |   63|    442|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 442, False: 54.7k]
  ------------------
 1635|  10.9k|      case ASCII_b:
  ------------------
  |  |   64|  10.9k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 10.5k, False: 44.6k]
  ------------------
 1636|  11.5k|      case ASCII_c:
  ------------------
  |  |   65|  11.5k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 608, False: 54.5k]
  ------------------
 1637|  12.1k|      case ASCII_d:
  ------------------
  |  |   66|  12.1k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 615, False: 54.5k]
  ------------------
 1638|  14.2k|      case ASCII_e:
  ------------------
  |  |   67|  14.2k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 2.04k, False: 53.1k]
  ------------------
 1639|  15.3k|      case ASCII_f:
  ------------------
  |  |   68|  15.3k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.16k, False: 53.9k]
  ------------------
 1640|  15.3k|        result <<= 4;
 1641|  15.3k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  15.3k|#define ASCII_a 0x61
  ------------------
 1642|  15.3k|        break;
 1643|  55.1k|      }
 1644|  55.1k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 26, False: 55.1k]
  ------------------
 1645|     26|        return -1;
 1646|  55.1k|    }
 1647|  15.6k|  } else {
 1648|  20.5k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  20.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  12.2k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 12.2k, False: 8.34k]
  ------------------
 1649|  12.2k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  12.2k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  12.2k|      result *= 10;
 1651|  12.2k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  12.2k|#define ASCII_0 0x30
  ------------------
 1652|  12.2k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 7, False: 12.2k]
  ------------------
 1653|      7|        return -1;
 1654|  12.2k|    }
 1655|  8.34k|  }
 1656|  23.9k|  return checkCharRefNumber(result);
 1657|  23.9k|}
xmltok.c:normal_predefinedEntityName:
 1661|   621k|                             const char *end) {
 1662|   621k|  UNUSED_P(enc);
  ------------------
  |  |  135|   621k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   621k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|   621k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 598k, False: 22.4k]
  ------------------
 1664|  15.9k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 15.9k, False: 605k]
  ------------------
 1665|  15.9k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  15.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.05k, False: 14.8k]
  |  |  ------------------
  ------------------
 1666|  1.05k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.05k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 285, False: 772]
  |  |  ------------------
  ------------------
 1667|    326|      case ASCII_l:
  ------------------
  |  |   74|    326|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 326, False: 731]
  ------------------
 1668|    326|        return ASCII_LT;
  ------------------
  |  |  111|    326|#define ASCII_LT 0x3C
  ------------------
 1669|    446|      case ASCII_g:
  ------------------
  |  |   69|    446|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 446, False: 611]
  ------------------
 1670|    446|        return ASCII_GT;
  ------------------
  |  |  113|    446|#define ASCII_GT 0x3E
  ------------------
 1671|  1.05k|      }
 1672|  1.05k|    }
 1673|  15.1k|    break;
 1674|  15.1k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.62k, False: 619k]
  ------------------
 1675|  1.62k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.62k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 833, False: 790]
  |  |  ------------------
  ------------------
 1676|    833|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    833|#  define MINBPC(enc) 1
  ------------------
 1677|    833|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    833|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 611, False: 222]
  |  |  ------------------
  ------------------
 1678|    611|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    611|#  define MINBPC(enc) 1
  ------------------
 1679|    611|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    611|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 402, False: 209]
  |  |  ------------------
  ------------------
 1680|    402|          return ASCII_AMP;
  ------------------
  |  |  105|    402|#define ASCII_AMP 0x26
  ------------------
 1681|    611|      }
 1682|    833|    }
 1683|  1.22k|    break;
 1684|  4.88k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 4.88k, False: 616k]
  ------------------
 1685|  4.88k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  4.88k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 812, False: 4.07k]
  |  |  ------------------
  ------------------
 1686|  1.00k|    case ASCII_q:
  ------------------
  |  |   79|  1.00k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.00k, False: 3.88k]
  ------------------
 1687|  1.00k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.00k|#  define MINBPC(enc) 1
  ------------------
 1688|  1.00k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  1.00k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 661, False: 343]
  |  |  ------------------
  ------------------
 1689|    661|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    661|#  define MINBPC(enc) 1
  ------------------
 1690|    661|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    661|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 411, False: 250]
  |  |  ------------------
  ------------------
 1691|    411|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    411|#  define MINBPC(enc) 1
  ------------------
 1692|    411|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    411|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 201, False: 210]
  |  |  ------------------
  ------------------
 1693|    201|            return ASCII_QUOT;
  ------------------
  |  |  104|    201|#define ASCII_QUOT 0x22
  ------------------
 1694|    411|        }
 1695|    661|      }
 1696|    803|      break;
 1697|  3.06k|    case ASCII_a:
  ------------------
  |  |   63|  3.06k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 3.06k, False: 1.81k]
  ------------------
 1698|  3.06k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.06k|#  define MINBPC(enc) 1
  ------------------
 1699|  3.06k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  3.06k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.85k, False: 212]
  |  |  ------------------
  ------------------
 1700|  2.85k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.85k|#  define MINBPC(enc) 1
  ------------------
 1701|  2.85k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  2.85k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.53k, False: 324]
  |  |  ------------------
  ------------------
 1702|  2.53k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.53k|#  define MINBPC(enc) 1
  ------------------
 1703|  2.53k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|  2.53k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 362, False: 2.17k]
  |  |  ------------------
  ------------------
 1704|    362|            return ASCII_APOS;
  ------------------
  |  |  106|    362|#define ASCII_APOS 0x27
  ------------------
 1705|  2.53k|        }
 1706|  2.85k|      }
 1707|  2.70k|      break;
 1708|  4.88k|    }
 1709|   621k|  }
 1710|   619k|  return 0;
 1711|   621k|}
xmltok.c:normal_updatePosition:
 1779|  4.27k|                       POSITION *pos) {
 1780|  2.82M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  2.82M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.82M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.82M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|  1.57k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.57k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.57k, False: 2.82M]
  |  |  ------------------
  |  | 1784|  1.57k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.57k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.57k|    break;
  ------------------
 1788|  5.92k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  5.92k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 5.92k, False: 2.82M]
  |  |  ------------------
  |  | 1784|  5.92k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  5.92k|    pos->columnNumber++;                                                       \
  |  | 1786|  5.92k|    break;
  ------------------
 1789|    511|      LEAD_CASE(4)
  ------------------
  |  | 1783|    511|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 511, False: 2.82M]
  |  |  ------------------
  |  | 1784|    511|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    511|    pos->columnNumber++;                                                       \
  |  | 1786|    511|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  97.3k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 97.3k, False: 2.72M]
  ------------------
 1792|  97.3k|      pos->columnNumber = 0;
 1793|  97.3k|      pos->lineNumber++;
 1794|  97.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  97.3k|#  define MINBPC(enc) 1
  ------------------
 1795|  97.3k|      break;
 1796|   595k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 595k, False: 2.23M]
  ------------------
 1797|   595k|      pos->lineNumber++;
 1798|   595k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   595k|#  define MINBPC(enc) 1
  ------------------
 1799|   595k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   595k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.19M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   595k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 595k, False: 90]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   595k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   595k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 515k, False: 79.4k]
  ------------------
 1800|   515k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   515k|#  define MINBPC(enc) 1
  ------------------
 1801|   595k|      pos->columnNumber = 0;
 1802|   595k|      break;
 1803|  2.12M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.12M, False: 700k]
  ------------------
 1804|  2.12M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.12M|#  define MINBPC(enc) 1
  ------------------
 1805|  2.12M|      pos->columnNumber++;
 1806|  2.12M|      break;
 1807|  2.82M|    }
 1808|  2.82M|  }
 1809|  4.27k|}
xmltok.c:normal_isPublicId:
 1450|  1.28k|                   const char **badPtr) {
 1451|  1.28k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.28k|#  define MINBPC(enc) 1
  ------------------
 1452|  1.28k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  1.28k|#  define MINBPC(enc) 1
  ------------------
 1453|  11.6k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  11.6k|#  define MINBPC(enc) 1
  ------------------
 1454|  11.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|    321|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 321, False: 11.3k]
  ------------------
 1456|  1.10k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 785, False: 10.8k]
  ------------------
 1457|  1.30k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 202, False: 11.4k]
  ------------------
 1458|  1.78k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 477, False: 11.1k]
  ------------------
 1459|  2.03k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 247, False: 11.4k]
  ------------------
 1460|  2.25k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 221, False: 11.4k]
  ------------------
 1461|  2.47k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 221, False: 11.4k]
  ------------------
 1462|  2.69k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 216, False: 11.4k]
  ------------------
 1463|  2.89k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 209, False: 11.4k]
  ------------------
 1464|  3.13k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 231, False: 11.4k]
  ------------------
 1465|  3.33k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 204, False: 11.4k]
  ------------------
 1466|  3.84k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 515, False: 11.1k]
  ------------------
 1467|  4.40k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 551, False: 11.1k]
  ------------------
 1468|  4.60k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 207, False: 11.4k]
  ------------------
 1469|  4.85k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 245, False: 11.4k]
  ------------------
 1470|  5.49k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 644, False: 11.0k]
  ------------------
 1471|  6.65k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 1.15k, False: 10.5k]
  ------------------
 1472|  6.85k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 201, False: 11.4k]
  ------------------
 1473|  6.85k|#  ifdef XML_NS
 1474|  6.85k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 11.6k]
  ------------------
 1475|  6.85k|#  endif
 1476|  6.85k|      break;
 1477|    340|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 340, False: 11.3k]
  ------------------
 1478|    340|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    340|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3, False: 337]
  |  |  ------------------
  ------------------
 1479|      3|        *badPtr = ptr;
 1480|      3|        return 0;
 1481|      3|      }
 1482|    337|      break;
 1483|    892|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 892, False: 10.7k]
  ------------------
 1484|  3.73k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.84k, False: 8.82k]
  ------------------
 1485|  3.73k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  3.73k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 3.73k, False: 0]
  ------------------
 1486|  3.73k|        break;
 1487|       |      /* fall through */
 1488|    734|    default:
  ------------------
  |  Branch (1488:5): [True: 734, False: 10.9k]
  ------------------
 1489|    734|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    734|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    214|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 214, False: 520]
  ------------------
 1491|    725|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 511, False: 223]
  ------------------
 1492|    725|        break;
 1493|      9|      default:
  ------------------
  |  Branch (1493:7): [True: 9, False: 725]
  ------------------
 1494|      9|        *badPtr = ptr;
 1495|      9|        return 0;
 1496|    734|      }
 1497|    725|      break;
 1498|  11.6k|    }
 1499|  11.6k|  }
 1500|  1.26k|  return 1;
 1501|  1.28k|}
xmltok.c:little2_prologTok:
 1018|  98.7k|                  const char **nextTokPtr) {
 1019|  98.7k|  int tok;
 1020|  98.7k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 299, False: 98.4k]
  ------------------
 1021|    299|    return XML_TOK_NONE;
  ------------------
  |  |   51|    299|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  98.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  98.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  98.4k|    size_t n = end - ptr;
 1024|  98.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  98.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 47.1k, False: 51.3k]
  ------------------
 1025|  47.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  47.1k|#  define MINBPC(enc) 2
  ------------------
 1026|  47.1k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 38, False: 47.0k]
  ------------------
 1027|     38|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  47.0k|      end = ptr + n;
 1029|  47.0k|    }
 1030|  98.4k|  }
 1031|  98.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  98.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  98.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  95.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 95.5k, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.25k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.25k, False: 97.2k]
  ------------------
 1033|  1.25k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.25k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.25k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.63k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.63k, False: 93.8k]
  ------------------
 1035|  4.63k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.63k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.63k|#  define MINBPC(enc) 2
  ------------------
 1036|  13.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 13.8k, False: 84.5k]
  ------------------
 1037|  13.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.8k|#  define MINBPC(enc) 2
  ------------------
 1038|  13.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.8k|    {                                                                          \
  |  |  |  |  135|  13.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  13.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 13.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  13.8k|    }
  |  |  ------------------
  ------------------
 1039|  13.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 11, False: 13.8k]
  |  |  |  |  |  Branch (737:4): [True: 12.4k, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.34k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.34k, False: 6.55k]
  ------------------
 1041|  7.34k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.34k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.34k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.69k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.69k, False: 11.2k]
  ------------------
 1043|  2.69k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.69k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.69k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.26k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.26k, False: 12.6k]
  ------------------
 1045|  2.38k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.12k, False: 12.7k]
  ------------------
 1046|  3.82k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.43k, False: 12.4k]
  ------------------
 1047|  3.82k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 13.8k]
  ------------------
 1048|  3.82k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 13.8k]
  ------------------
 1049|  3.84k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 21, False: 13.8k]
  ------------------
 1050|  3.84k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.84k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.84k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.84k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  13.8k|    }
 1053|     11|    *nextTokPtr = ptr;
 1054|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1055|  13.8k|  }
 1056|  4.55k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.55k, False: 93.8k]
  ------------------
 1057|  4.55k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.55k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 64, False: 4.49k]
  ------------------
 1058|     64|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     64|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     64|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     64|    }
 1062|       |    /* fall through */
 1063|  24.9k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 20.4k, False: 77.9k]
  ------------------
 1064|  29.6k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.64k, False: 93.8k]
  ------------------
 1065|  33.2k|    for (;;) {
 1066|  33.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  33.2k|#  define MINBPC(enc) 2
  ------------------
 1067|  33.2k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  33.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  33.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  33.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 176, False: 33.0k]
  ------------------
 1068|    176|        break;
 1069|  33.0k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  33.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  33.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 31.2k, False: 1.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  2.14k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 2.14k, False: 30.9k]
  ------------------
 1071|  2.85k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 713, False: 32.3k]
  ------------------
 1072|  2.85k|        break;
 1073|    779|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 779, False: 32.2k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    779|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    779|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 775, False: 4]
  ------------------
 1076|    775|          break;
 1077|       |        /* fall through */
 1078|  29.4k|      default:
  ------------------
  |  Branch (1078:7): [True: 29.4k, False: 3.63k]
  ------------------
 1079|  29.4k|        *nextTokPtr = ptr;
 1080|  29.4k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  29.4k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  33.0k|      }
 1082|  33.0k|    }
 1083|    176|    *nextTokPtr = ptr;
 1084|    176|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    176|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.19k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.19k, False: 96.2k]
  ------------------
 1086|  2.19k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.19k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.19k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.42k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.42k, False: 96.0k]
  ------------------
 1088|  2.42k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.42k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.42k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.42k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.31k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.31k, False: 97.1k]
  ------------------
 1091|  1.31k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.31k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.31k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.31k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    805|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 805, False: 97.6k]
  ------------------
 1094|    805|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    805|#  define MINBPC(enc) 2
  ------------------
 1095|    805|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    805|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    805|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    805|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 5, False: 800]
  ------------------
 1096|      5|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      5|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    800|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    800|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    800|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 789, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 39, False: 750]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     39|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     39|    {                                                                          \
  |  |  135|     39|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     39|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     39|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 38]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     39|    }
  ------------------
 1099|     38|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     38|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     38|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 20, False: 18]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     38|    }
 1104|    797|    *nextTokPtr = ptr;
 1105|    797|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    797|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.54k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.54k, False: 92.9k]
  ------------------
 1107|  5.54k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.54k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.54k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.54k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.47k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.47k, False: 93.9k]
  ------------------
 1110|  4.47k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.47k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.47k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.47k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.47k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.47k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 3, False: 4.47k]
  ------------------
 1112|      3|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      3|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.47k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.47k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.47k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 40, False: 4.43k]
  |  |  |  |  |  Branch (737:4): [True: 4.43k, False: 39]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    774|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 774, False: 3.69k]
  ------------------
 1115|    774|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    774|#  define MINBPC(enc) 2
  ------------------
 1116|    774|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    774|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    198|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 198, False: 4.27k]
  ------------------
 1118|    198|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    198|#  define MINBPC(enc) 2
  ------------------
 1119|    198|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    198|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|     66|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 66, False: 4.40k]
  ------------------
 1121|     66|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     66|#  define MINBPC(enc) 2
  ------------------
 1122|     66|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|     66|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    468|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 468, False: 4.00k]
  ------------------
 1124|    789|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 321, False: 4.15k]
  ------------------
 1125|  1.12k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 335, False: 4.13k]
  ------------------
 1126|  1.92k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 796, False: 3.67k]
  ------------------
 1127|  2.43k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 519, False: 3.95k]
  ------------------
 1128|  2.91k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 479, False: 3.99k]
  ------------------
 1129|  3.39k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 475, False: 3.99k]
  ------------------
 1130|  3.39k|      *nextTokPtr = ptr;
 1131|  3.39k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.39k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.47k|    }
 1133|     40|    *nextTokPtr = ptr;
 1134|     40|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.78k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.78k, False: 95.6k]
  ------------------
 1136|  2.78k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.78k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.78k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.78k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.47k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.47k, False: 92.9k]
  ------------------
 1139|  5.47k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.47k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.47k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.47k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.84k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.84k, False: 95.6k]
  ------------------
 1142|  2.84k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.84k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.84k|#  define MINBPC(enc) 2
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|      0|    LEAD_CASE(2)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 98.4k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 98.4k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     98|    LEAD_CASE(4)
  ------------------
  |  | 1144|     22|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 32, False: 98.4k]
  |  |  ------------------
  |  | 1145|     32|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 10, False: 22]
  |  |  ------------------
  |  | 1146|     22|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     22|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     22|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     22|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     22|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     22|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     22|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     22|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.34k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.34k, False: 89.1k]
  ------------------
 1168|  17.4k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 8.14k, False: 90.3k]
  ------------------
 1169|  17.4k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  17.4k|#define XML_TOK_NAME 18
  ------------------
 1170|  17.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  17.4k|#  define MINBPC(enc) 2
  ------------------
 1171|  17.4k|    break;
 1172|    234|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 234, False: 98.2k]
  ------------------
 1173|    482|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 248, False: 98.2k]
  ------------------
 1174|    702|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 220, False: 98.2k]
  ------------------
 1175|    702|#  ifdef XML_NS
 1176|    702|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 98.4k]
  ------------------
 1177|    702|#  endif
 1178|    702|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    702|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    702|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    702|#  define MINBPC(enc) 2
  ------------------
 1180|    702|    break;
 1181|  2.89k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.89k, False: 95.5k]
  ------------------
 1182|  2.89k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  2.89k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  2.89k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.89k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.55k, False: 338]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.55k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.55k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.55k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.55k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.55k|      break;
 1186|  2.55k|    }
 1187|    338|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    338|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    338|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    338|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 285, False: 53]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    285|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    285|#  define MINBPC(enc) 2
  ------------------
 1189|    285|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    285|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    285|      break;
 1191|    285|    }
 1192|       |    /* fall through */
 1193|     70|  default:
  ------------------
  |  Branch (1193:3): [True: 17, False: 98.4k]
  ------------------
 1194|     70|    *nextTokPtr = ptr;
 1195|     70|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     70|#define XML_TOK_INVALID 0
  ------------------
 1196|  98.4k|  }
 1197|  52.1k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  52.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  52.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  52.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  48.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 48.3k, False: 3.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   112k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  31.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.73k, False: 48.4k]
  |  |  ------------------
  |  |   82|  31.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  3.73k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.73k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.73k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 36, False: 3.69k]
  |  |  ------------------
  |  |   83|     36|      *nextTokPtr = ptr;                                                       \
  |  |   84|     36|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     36|    }                                                                          \
  |  |   86|  31.2k|    /* fall through */                                                         \
  |  |   87|  31.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 13.3k, False: 38.8k]
  |  |  ------------------
  |  |   88|  30.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 13.3k, False: 38.8k]
  |  |  ------------------
  |  |   89|  30.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 424, False: 51.7k]
  |  |  ------------------
  |  |   90|  30.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 51.9k]
  |  |  ------------------
  |  |   91|  31.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 282, False: 51.8k]
  |  |  ------------------
  |  |   92|  31.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  31.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  31.2k|    break;                                                                     \
  |  |   94|  31.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 52.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 52.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 52.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    237|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 237, False: 51.9k]
  ------------------
 1201|  1.89k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.65k, False: 50.4k]
  ------------------
 1202|  2.44k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 547, False: 51.5k]
  ------------------
 1203|  4.05k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.61k, False: 50.5k]
  ------------------
 1204|  4.96k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 910, False: 51.2k]
  ------------------
 1205|  4.97k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 52.1k]
  ------------------
 1206|  16.2k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 11.2k, False: 40.8k]
  ------------------
 1207|  17.5k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.30k, False: 50.8k]
  ------------------
 1208|  19.5k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.04k, False: 50.0k]
  ------------------
 1209|  19.5k|      *nextTokPtr = ptr;
 1210|  19.5k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 52.1k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    206|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 206, False: 51.9k]
  ------------------
 1232|    206|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    206|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 205]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    205|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    205|#  define MINBPC(enc) 2
  ------------------
 1237|    205|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    205|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    597|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 597, False: 51.5k]
  ------------------
 1239|    597|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    597|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 596]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    596|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    596|#  define MINBPC(enc) 2
  ------------------
 1244|    596|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    596|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    472|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 472, False: 51.6k]
  ------------------
 1246|    472|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    472|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 471]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    471|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    471|#  define MINBPC(enc) 2
  ------------------
 1251|    471|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    471|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|      9|    default:
  ------------------
  |  Branch (1252:5): [True: 9, False: 52.1k]
  ------------------
 1253|      9|      *nextTokPtr = ptr;
 1254|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1255|  52.1k|    }
 1256|  52.1k|  }
 1257|    136|  return -tok;
 1258|  21.0k|}
xmltok.c:little2_scanLit:
  984|  5.88k|                const char **nextTokPtr) {
  985|  35.9M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  35.9M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  35.9M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.9M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   574k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 574k, False: 35.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  35.9M|    switch (t) {
  988|   420k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   210k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   210k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 210k, False: 35.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|   210k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 210k]
  |  |  |  |  ------------------
  |  |  |  |   51|   210k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   210k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   210k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|   210k|    ptr += n;                                                                  \
  |  |  |  |   57|   210k|    break;
  |  |  ------------------
  |  |   63|   210k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 16, False: 35.9M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 35.9M]
  |  |  ------------------
  |  |   65|     21|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 35.9M]
  |  |  ------------------
  |  |   66|     21|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     21|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  7.12k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 7.12k, False: 35.9M]
  ------------------
  990|  12.1k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.06k, False: 35.9M]
  ------------------
  991|  12.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.1k|#  define MINBPC(enc) 2
  ------------------
  992|  12.1k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 6.42k, False: 5.76k]
  ------------------
  993|  6.42k|        break;
  994|  5.76k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.76k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.76k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 1, False: 5.76k]
  ------------------
  995|      1|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      1|#define XML_TOK_LITERAL 27
  ------------------
  996|  5.76k|      *nextTokPtr = ptr;
  997|  5.76k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.76k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.76k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.73k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.63k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.63k, False: 4.12k]
  ------------------
  999|  2.67k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.03k, False: 4.72k]
  ------------------
 1000|  2.84k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 169, False: 5.59k]
  ------------------
 1001|  5.71k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.86k, False: 2.89k]
  ------------------
 1002|  5.72k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 14, False: 5.75k]
  ------------------
 1003|  5.73k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 4, False: 5.76k]
  ------------------
 1004|  5.73k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.73k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     33|      default:
  ------------------
  |  Branch (1005:7): [True: 33, False: 5.73k]
  ------------------
 1006|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
 1007|  5.76k|      }
 1008|  35.7M|    default:
  ------------------
  |  Branch (1008:5): [True: 35.7M, False: 222k]
  ------------------
 1009|  35.7M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  35.7M|#  define MINBPC(enc) 2
  ------------------
 1010|  35.7M|      break;
 1011|  35.9M|    }
 1012|  35.9M|  }
 1013|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  5.88k|}
xmltok.c:little2_scanDecl:
  183|  7.34k|                 const char **nextTokPtr) {
  184|  7.34k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.34k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.34k|    {                                                                          \
  |  |  |  |  135|  7.34k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.34k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.34k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 7.34k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  7.34k|    }
  |  |  ------------------
  ------------------
  185|  7.34k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.34k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.34k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.31k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    539|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 539, False: 6.80k]
  ------------------
  187|    539|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    539|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    539|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.33k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    334|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 334, False: 7.00k]
  ------------------
  192|  6.77k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.44k, False: 898]
  ------------------
  193|  6.77k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.77k|#  define MINBPC(enc) 2
  ------------------
  194|  6.77k|    break;
  195|     24|  default:
  ------------------
  |  Branch (195:3): [True: 24, False: 7.31k]
  ------------------
  196|     24|    *nextTokPtr = ptr;
  197|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  198|  7.34k|  }
  199|  44.6k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  44.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  44.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  44.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 44.6k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     34|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 34, False: 44.6k]
  ------------------
  202|     34|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     34|    {                                                                          \
  |  |  135|     34|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     34|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     34|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 33]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     34|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     33|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     33|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     33|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      9|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 28, False: 5]
  |  |  |  |  |  Branch (737:4): [True: 9, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 32]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 32]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 32]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 2, False: 31]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     33|      }
  212|       |      /* fall through */
  213|  4.80k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.77k, False: 39.8k]
  ------------------
  214|  5.84k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.04k, False: 43.6k]
  ------------------
  215|  6.71k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 864, False: 43.7k]
  ------------------
  216|  6.71k|      *nextTokPtr = ptr;
  217|  6.71k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.71k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  31.5k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 31.5k, False: 13.1k]
  ------------------
  219|  37.8k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 6.37k, False: 38.2k]
  ------------------
  220|  37.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  37.8k|#  define MINBPC(enc) 2
  ------------------
  221|  37.8k|      break;
  222|     31|    default:
  ------------------
  |  Branch (222:5): [True: 31, False: 44.6k]
  ------------------
  223|     31|      *nextTokPtr = ptr;
  224|     31|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  225|  44.6k|    }
  226|  44.6k|  }
  227|     26|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.77k|}
xmltok.c:little2_scanComment:
  146|    883|                    const char **nextTokPtr) {
  147|    883|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    883|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    883|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    883|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 870, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    870|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    870|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    870|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 859, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 848, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     22|      *nextTokPtr = ptr;
  150|     22|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  151|     22|    }
  152|    848|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    848|#  define MINBPC(enc) 2
  ------------------
  153|   339k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   339k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   339k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   339k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.14k, False: 333k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  3.84k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 339k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 339k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.90k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.87k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.90k, False: 337k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.90k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.87k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.87k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.87k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.87k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.87k|    break;
  |  |  ------------------
  |  |   63|  1.87k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 35, False: 339k]
  |  |  ------------------
  |  |   64|     35|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 339k]
  |  |  ------------------
  |  |   65|     40|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 339k]
  |  |  ------------------
  |  |   66|     40|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     40|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     40|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.25k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.25k, False: 337k]
  ------------------
  157|  1.25k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.25k|#  define MINBPC(enc) 2
  ------------------
  158|  1.25k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.25k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.25k|    {                                                                          \
  |  |  |  |  135|  1.25k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.25k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.25k|    }
  |  |  ------------------
  ------------------
  159|  1.25k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.25k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.25k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.03k, False: 220]
  |  |  |  |  |  Branch (739:52): [True: 713, False: 320]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    713|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    713|#  define MINBPC(enc) 2
  ------------------
  161|    713|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    713|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    713|    {                                                                          \
  |  |  |  |  135|    713|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    713|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    713|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 712]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    713|    }
  |  |  ------------------
  ------------------
  162|    712|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    712|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    712|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 705, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 694, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     18|            *nextTokPtr = ptr;
  164|     18|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  165|     18|          }
  166|    694|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    694|#  define MINBPC(enc) 2
  ------------------
  167|    694|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    694|#define XML_TOK_COMMENT 13
  ------------------
  168|    712|        }
  169|    540|        break;
  170|   335k|      default:
  ------------------
  |  Branch (170:7): [True: 335k, False: 3.19k]
  ------------------
  171|   335k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   335k|#  define MINBPC(enc) 2
  ------------------
  172|   335k|        break;
  173|   339k|      }
  174|   339k|    }
  175|    848|  }
  176|     78|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     78|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    883|}
xmltok.c:little2_scanPi:
  277|  5.88k|               const char **nextTokPtr) {
  278|  5.88k|  int tok;
  279|  5.88k|  const char *target = ptr;
  280|  5.88k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.88k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.88k|    {                                                                          \
  |  |  |  |  135|  5.88k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.88k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.88k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 5.87k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  5.88k|    }
  |  |  ------------------
  ------------------
  281|  5.87k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.87k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.87k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.77k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.77k, False: 1.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  6.24k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.83k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.07k, False: 4.79k]
  |  |  ------------------
  |  |  111|  5.83k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.07k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.07k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.07k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 17, False: 1.06k]
  |  |  ------------------
  |  |  112|     17|      *nextTokPtr = ptr;                                                       \
  |  |  113|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     17|    }                                                                          \
  |  |  115|  5.83k|    /* fall through */                                                         \
  |  |  116|  5.83k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.06k, False: 1.81k]
  |  |  ------------------
  |  |  117|  5.83k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 706, False: 5.17k]
  |  |  ------------------
  |  |  118|  5.83k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  5.83k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.83k|    break;                                                                     \
  |  |  120|  5.83k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.87k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.87k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 5.86k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  5.87k|  }
  287|  28.9k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  28.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  28.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  28.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.5k, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   106k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  23.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 17.3k, False: 11.5k]
  |  |  ------------------
  |  |   82|  23.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  17.3k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  17.3k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  17.3k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 17.3k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  23.1k|    /* fall through */                                                         \
  |  |   87|  23.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.93k, False: 24.9k]
  |  |  ------------------
  |  |   88|  22.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.20k, False: 27.7k]
  |  |  ------------------
  |  |   89|  22.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 263, False: 28.6k]
  |  |  ------------------
  |  |   90|  22.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 211, False: 28.6k]
  |  |  ------------------
  |  |   91|  23.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 28.7k]
  |  |  ------------------
  |  |   92|  23.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  23.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  23.1k|    break;                                                                     \
  |  |   94|  23.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 28.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 28.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 28.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.07k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.07k, False: 27.8k]
  ------------------
  291|  1.98k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 911, False: 27.9k]
  ------------------
  292|  2.74k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 759, False: 28.1k]
  ------------------
  293|  2.74k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.74k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.74k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.74k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.74k|#  define MINBPC(enc) 2
  ------------------
  298|   119k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   119k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   119k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   119k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 16.7k, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  3.29k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 119k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.64k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.61k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.64k, False: 117k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.64k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 1.61k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.61k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.61k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.61k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.61k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.61k|    break;
  |  |  ------------------
  |  |   63|  1.61k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 18, False: 119k]
  |  |  ------------------
  |  |   64|     18|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 119k]
  |  |  ------------------
  |  |   65|     23|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 119k]
  |  |  ------------------
  |  |   66|     23|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     23|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  4.15k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 4.15k, False: 115k]
  ------------------
  302|  4.15k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.15k|#  define MINBPC(enc) 2
  ------------------
  303|  4.15k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.15k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.15k|    {                                                                          \
  |  |  |  |  135|  4.15k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.15k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.15k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 4.15k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  4.15k|    }
  |  |  ------------------
  ------------------
  304|  4.15k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  4.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.52k, False: 633]
  |  |  |  |  |  Branch (739:52): [True: 2.56k, False: 959]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.56k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.56k|#  define MINBPC(enc) 2
  ------------------
  306|  2.56k|            return tok;
  307|  2.56k|          }
  308|  1.59k|          break;
  309|   113k|        default:
  ------------------
  |  Branch (309:9): [True: 113k, False: 5.82k]
  ------------------
  310|   113k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   113k|#  define MINBPC(enc) 2
  ------------------
  311|   113k|          break;
  312|   119k|        }
  313|   119k|      }
  314|    120|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    120|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.97k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.97k, False: 25.9k]
  ------------------
  316|  2.97k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.97k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.97k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.97k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.97k|#  define MINBPC(enc) 2
  ------------------
  321|  2.97k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.97k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.97k|    {                                                                          \
  |  |  |  |  135|  2.97k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.97k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.97k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 2.93k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  2.97k|    }
  |  |  ------------------
  ------------------
  322|  2.93k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.93k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.93k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.92k, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 2.91k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.91k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.91k|#  define MINBPC(enc) 2
  ------------------
  324|  2.91k|        return tok;
  325|  2.91k|      }
  326|       |      /* fall through */
  327|     32|    default:
  ------------------
  |  Branch (327:5): [True: 8, False: 28.9k]
  ------------------
  328|     32|      *nextTokPtr = ptr;
  329|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  330|  28.9k|    }
  331|  28.9k|  }
  332|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.83k|}
xmltok.c:little2_checkPiTarget:
  232|  5.71k|                      int *tokPtr) {
  233|  5.71k|  int upper = 0;
  234|  5.71k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.71k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.71k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.71k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.71k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  5.71k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.98k, False: 2.73k]
  ------------------
  237|  2.98k|    return 1;
  238|  2.73k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.73k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.73k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.18k, False: 553]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.17k|  case ASCII_x:
  ------------------
  |  |   86|  1.17k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.17k, False: 1.56k]
  ------------------
  240|  1.17k|    break;
  241|    919|  case ASCII_X:
  ------------------
  |  |   59|    919|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 919, False: 1.81k]
  ------------------
  242|    919|    upper = 1;
  243|    919|    break;
  244|    643|  default:
  ------------------
  |  Branch (244:3): [True: 643, False: 2.09k]
  ------------------
  245|    643|    return 1;
  246|  2.73k|  }
  247|  2.09k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.09k|#  define MINBPC(enc) 2
  ------------------
  248|  2.09k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.09k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.09k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.38k, False: 706]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    783|  case ASCII_m:
  ------------------
  |  |   75|    783|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 783, False: 1.31k]
  ------------------
  250|    783|    break;
  251|    573|  case ASCII_M:
  ------------------
  |  |   48|    573|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 573, False: 1.52k]
  ------------------
  252|    573|    upper = 1;
  253|    573|    break;
  254|    739|  default:
  ------------------
  |  Branch (254:3): [True: 739, False: 1.35k]
  ------------------
  255|    739|    return 1;
  256|  2.09k|  }
  257|  1.35k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
  258|  1.35k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.35k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.35k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 891, False: 465]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     47|  case ASCII_l:
  ------------------
  |  |   74|     47|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 47, False: 1.30k]
  ------------------
  260|     47|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.35k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.30k|  default:
  ------------------
  |  Branch (264:3): [True: 1.30k, False: 49]
  ------------------
  265|  1.30k|    return 1;
  266|  1.35k|  }
  267|     49|  if (upper)
  ------------------
  |  Branch (267:7): [True: 2, False: 47]
  ------------------
  268|      2|    return 0;
  269|     47|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     47|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     47|  return 1;
  271|     49|}
xmltok.c:little2_scanPercent:
  924|  2.19k|                    const char **nextTokPtr) {
  925|  2.19k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.19k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.19k|    {                                                                          \
  |  |  |  |  135|  2.19k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.19k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 2.18k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  2.19k|    }
  |  |  ------------------
  ------------------
  926|  2.18k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.18k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.18k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.77k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.77k, False: 408]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.21k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 387, False: 1.79k]
  |  |  ------------------
  |  |  111|  1.16k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    387|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    387|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    387|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 375]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  1.16k|    /* fall through */                                                         \
  |  |  116|  1.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 420, False: 1.76k]
  |  |  ------------------
  |  |  117|  1.16k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 366, False: 1.81k]
  |  |  ------------------
  |  |  118|  1.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.16k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.16k|    break;                                                                     \
  |  |  120|  1.16k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.18k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    214|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 214, False: 1.96k]
  ------------------
  929|    603|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 389, False: 1.79k]
  ------------------
  930|    985|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 382, False: 1.80k]
  ------------------
  931|    988|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.17k]
  ------------------
  932|    988|    *nextTokPtr = ptr;
  933|    988|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    988|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 2.17k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  2.18k|  }
  938|  3.46k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.46k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.46k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.46k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.94k, False: 521]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  7.71k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 507, False: 2.96k]
  |  |  ------------------
  |  |   82|  2.37k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    507|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    507|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    507|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 483]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  2.37k|    /* fall through */                                                         \
  |  |   87|  2.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 816, False: 2.65k]
  |  |  ------------------
  |  |   88|  1.76k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 462, False: 3.00k]
  |  |  ------------------
  |  |   89|  1.96k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 200, False: 3.26k]
  |  |  ------------------
  |  |   90|  2.16k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 207, False: 3.26k]
  |  |  ------------------
  |  |   91|  2.37k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 3.25k]
  |  |  ------------------
  |  |   92|  2.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.37k|    break;                                                                     \
  |  |   94|  2.37k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.46k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.46k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 3.45k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.04k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.04k, False: 2.42k]
  ------------------
  942|  1.04k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.04k|#  define MINBPC(enc) 2
  ------------------
  943|  1.04k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.04k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|      9|    default:
  ------------------
  |  Branch (944:5): [True: 9, False: 3.45k]
  ------------------
  945|      9|      *nextTokPtr = ptr;
  946|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  947|  3.46k|    }
  948|  3.46k|  }
  949|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.16k|}
xmltok.c:little2_scanPoundName:
  954|  2.84k|                      const char **nextTokPtr) {
  955|  2.84k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.84k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.84k|    {                                                                          \
  |  |  |  |  135|  2.84k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.84k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 2.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  2.84k|    }
  |  |  ------------------
  ------------------
  956|  2.84k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.84k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.84k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.75k, False: 91]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  2.64k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.79k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 58, False: 2.78k]
  |  |  ------------------
  |  |  111|  2.79k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     58|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     58|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     58|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 46]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.79k|    /* fall through */                                                         \
  |  |  116|  2.79k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.49k, False: 350]
  |  |  ------------------
  |  |  117|  2.79k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 259, False: 2.58k]
  |  |  ------------------
  |  |  118|  2.79k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.79k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.79k|    break;                                                                     \
  |  |  120|  2.79k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.84k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.84k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     27|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 27, False: 2.81k]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 23]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     46|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     23|    }                                                                          \
  |  |  |  |  106|     23|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 2.83k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  2.84k|  }
  962|  19.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  19.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  19.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  19.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 19.2k, False: 475]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  58.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 458, False: 19.2k]
  |  |  ------------------
  |  |   82|  16.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    458|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    458|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    458|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 434]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  16.9k|    /* fall through */                                                         \
  |  |   87|  16.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 8.54k, False: 11.1k]
  |  |  ------------------
  |  |   88|  16.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 7.21k, False: 12.4k]
  |  |  ------------------
  |  |   89|  16.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 242, False: 19.4k]
  |  |  ------------------
  |  |   90|  16.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 19.4k]
  |  |  ------------------
  |  |   91|  16.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 295, False: 19.3k]
  |  |  ------------------
  |  |   92|  16.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  16.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.9k|    break;                                                                     \
  |  |   94|  16.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    217|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 217, False: 19.4k]
  ------------------
  966|    442|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 225, False: 19.4k]
  ------------------
  967|  1.85k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 1.41k, False: 18.2k]
  ------------------
  968|  2.31k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 456, False: 19.2k]
  ------------------
  969|  2.50k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 195, False: 19.4k]
  ------------------
  970|  2.50k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 19.6k]
  ------------------
  971|  2.70k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 194, False: 19.4k]
  ------------------
  972|  2.70k|      *nextTokPtr = ptr;
  973|  2.70k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.70k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      8|    default:
  ------------------
  |  Branch (974:5): [True: 8, False: 19.6k]
  ------------------
  975|      8|      *nextTokPtr = ptr;
  976|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  977|  19.6k|    }
  978|  19.6k|  }
  979|     54|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     54|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.79k|}
xmltok.c:little2_contentTok:
  824|  58.9k|                   const char **nextTokPtr) {
  825|  58.9k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.03k, False: 57.9k]
  ------------------
  826|  1.03k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.03k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  57.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  57.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  57.9k|    size_t n = end - ptr;
  829|  57.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  57.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 17.1k, False: 40.7k]
  ------------------
  830|  17.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  17.1k|#  define MINBPC(enc) 2
  ------------------
  831|  17.1k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 117, False: 17.0k]
  ------------------
  832|    117|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    117|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  17.0k|      end = ptr + n;
  834|  17.0k|    }
  835|  57.9k|  }
  836|  57.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  57.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  57.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  46.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 46.3k, False: 11.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  15.5k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 15.5k, False: 42.1k]
  ------------------
  838|  15.5k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  15.5k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  15.5k|#  define MINBPC(enc) 2
  ------------------
  839|  11.2k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 11.2k, False: 46.5k]
  ------------------
  840|  11.2k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  11.2k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  11.2k|#  define MINBPC(enc) 2
  ------------------
  841|  9.43k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 9.43k, False: 48.3k]
  ------------------
  842|  9.43k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.43k|#  define MINBPC(enc) 2
  ------------------
  843|  9.43k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.43k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.43k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.43k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 17, False: 9.41k]
  ------------------
  844|     17|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     17|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  9.41k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  9.41k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.41k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.24k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.24k, False: 6.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 213, False: 9.20k]
  ------------------
  846|    213|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    213|#  define MINBPC(enc) 2
  ------------------
  847|  9.41k|    *nextTokPtr = ptr;
  848|  9.41k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.41k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  3.12k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 3.12k, False: 54.6k]
  ------------------
  850|  3.12k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.12k|#  define MINBPC(enc) 2
  ------------------
  851|  3.12k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.12k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  3.55k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 3.55k, False: 54.2k]
  ------------------
  853|  3.55k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.55k|#  define MINBPC(enc) 2
  ------------------
  854|  3.55k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.55k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.55k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.55k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 7, False: 3.55k]
  ------------------
  855|      7|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      7|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  3.55k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  3.55k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.55k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.77k, False: 779]
  |  |  |  |  |  Branch (739:52): [True: 1.60k, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.94k|      break;
  858|  1.60k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.60k|#  define MINBPC(enc) 2
  ------------------
  859|  1.60k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.60k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.60k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 7, False: 1.59k]
  ------------------
  860|      7|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      7|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.59k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.59k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.59k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 874, False: 723]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 873]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.59k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.59k|#  define MINBPC(enc) 2
  ------------------
  863|  1.59k|      break;
  864|  1.59k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  6.15k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 57.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 57.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.05k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.99k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.05k, False: 54.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.05k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 57, False: 2.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.99k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     57|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.99k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.99k|    break;
  |  |  ------------------
  |  |   63|  2.99k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 51, False: 57.7k]
  |  |  ------------------
  |  |   64|     51|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 57.7k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 57.7k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  11.6k|  default:
  ------------------
  |  Branch (868:3): [True: 11.6k, False: 46.0k]
  ------------------
  869|  11.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.6k|#  define MINBPC(enc) 2
  ------------------
  870|  11.6k|    break;
  871|  57.7k|  }
  872|   568k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   568k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   568k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   568k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  53.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 53.2k, False: 515k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|      0|      LEAD_CASE(2)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 568k]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  883|      0|      LEAD_CASE(3)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 568k]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  884|  13.2k|      LEAD_CASE(4)
  ------------------
  |  |  875|  13.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 13.2k, False: 555k]
  |  |  ------------------
  |  |  876|  13.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  13.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 49, False: 13.2k]
  |  |  ------------------
  |  |  877|     49|      *nextTokPtr = ptr;                                                       \
  |  |  878|     49|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     49|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     49|    }                                                                          \
  |  |  880|  13.2k|    ptr += n;                                                                  \
  |  |  881|  13.2k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  7.00k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 7.00k, False: 561k]
  ------------------
  887|  7.00k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  7.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  7.00k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 6.99k, False: 5]
  |  |  ------------------
  ------------------
  888|  6.99k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  6.99k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.99k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.08k, False: 1.91k]
  |  |  |  |  |  Branch (739:52): [True: 2.15k, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  4.84k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.84k|#  define MINBPC(enc) 2
  ------------------
  890|  4.84k|          break;
  891|  4.84k|        }
  892|  2.15k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.15k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  2.15k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.14k, False: 6]
  |  |  ------------------
  ------------------
  893|  2.14k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  2.14k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.14k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.40k, False: 741]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.14k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.14k|#  define MINBPC(enc) 2
  ------------------
  895|  2.14k|            break;
  896|  2.14k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  2.14k|        }
  900|  2.15k|      }
  901|       |      /* fall through */
  902|  3.56k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 3.55k, False: 564k]
  ------------------
  903|  7.33k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.76k, False: 564k]
  ------------------
  904|  7.37k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 43, False: 568k]
  ------------------
  905|  7.37k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 568k]
  ------------------
  906|  7.37k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 568k]
  ------------------
  907|  15.2k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 7.82k, False: 560k]
  ------------------
  908|  17.8k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 2.63k, False: 565k]
  ------------------
  909|  17.8k|      *nextTokPtr = ptr;
  910|  17.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  17.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   530k|    default:
  ------------------
  |  Branch (911:5): [True: 530k, False: 38.0k]
  ------------------
  912|   530k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   530k|#  define MINBPC(enc) 2
  ------------------
  913|   530k|      break;
  914|   568k|    }
  915|   568k|  }
  916|    349|  *nextTokPtr = ptr;
  917|    349|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    349|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  18.2k|}
xmltok.c:little2_scanLt:
  726|  15.5k|               const char **nextTokPtr) {
  727|  15.5k|#  ifdef XML_NS
  728|  15.5k|  int hadColon;
  729|  15.5k|#  endif
  730|  15.5k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.5k|    {                                                                          \
  |  |  |  |  135|  15.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  15.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  15.5k|    }
  |  |  ------------------
  ------------------
  731|  15.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.4k, False: 3.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.0k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.96k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.07k, False: 12.5k]
  |  |  ------------------
  |  |  111|  9.96k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.07k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.07k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.07k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 21, False: 3.05k]
  |  |  ------------------
  |  |  112|     21|      *nextTokPtr = ptr;                                                       \
  |  |  113|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     21|    }                                                                          \
  |  |  115|  9.96k|    /* fall through */                                                         \
  |  |  116|  9.96k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.88k, False: 11.6k]
  |  |  ------------------
  |  |  117|  9.96k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.02k, False: 12.5k]
  |  |  ------------------
  |  |  118|  9.96k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.96k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.96k|    break;                                                                     \
  |  |  120|  9.96k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    944|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 944, False: 14.6k]
  ------------------
  734|    944|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    944|#  define MINBPC(enc) 2
  ------------------
  735|    944|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    944|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    944|    {                                                                          \
  |  |  |  |  135|    944|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    944|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    944|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 943]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    944|    }
  |  |  ------------------
  ------------------
  736|    943|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    943|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    943|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    921|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 23, False: 920]
  |  |  |  |  |  Branch (737:4): [True: 921, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    344|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 344, False: 599]
  ------------------
  738|    344|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    344|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    344|#  define MINBPC(enc) 2
  ------------------
  739|    576|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 576, False: 367]
  ------------------
  740|    576|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    576|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    576|#  define MINBPC(enc) 2
  ------------------
  741|    943|    }
  742|     23|    *nextTokPtr = ptr;
  743|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  744|  3.19k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.19k, False: 12.3k]
  ------------------
  745|  3.19k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.19k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.19k|#  define MINBPC(enc) 2
  ------------------
  746|  1.42k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.42k, False: 14.1k]
  ------------------
  747|  1.42k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.42k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.42k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 15.5k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  15.5k|  }
  752|  9.96k|#  ifdef XML_NS
  753|  9.96k|  hadColon = 0;
  754|  9.96k|#  endif
  755|       |  /* we have a start-tag */
  756|  36.1k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  36.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  36.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  36.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.1k, False: 23.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   124k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  26.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 23.0k, False: 13.1k]
  |  |  ------------------
  |  |   82|  26.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  23.0k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  23.0k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  23.0k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 23.0k]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  26.2k|    /* fall through */                                                         \
  |  |   87|  26.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.51k, False: 34.6k]
  |  |  ------------------
  |  |   88|  25.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 753, False: 35.4k]
  |  |  ------------------
  |  |   89|  25.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 380, False: 35.7k]
  |  |  ------------------
  |  |   90|  25.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 228, False: 35.9k]
  |  |  ------------------
  |  |   91|  26.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 381, False: 35.7k]
  |  |  ------------------
  |  |   92|  26.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  26.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  26.2k|    break;                                                                     \
  |  |   94|  26.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 36.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 36.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|     10|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 36.1k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  1.48k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.48k, False: 34.6k]
  ------------------
  777|  2.41k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 933, False: 35.2k]
  ------------------
  778|  3.77k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.35k, False: 34.7k]
  ------------------
  779|  3.77k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.77k|#  define MINBPC(enc) 2
  ------------------
  780|  5.05k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.05k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.05k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.05k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.91k, False: 1.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.32k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.55k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.11k, False: 3.94k]
  |  |  ------------------
  |  |  111|  2.55k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.11k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.11k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.11k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.10k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.55k|    /* fall through */                                                         \
  |  |  116|  2.55k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.05k, False: 3.99k]
  |  |  ------------------
  |  |  117|  2.55k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 390, False: 4.66k]
  |  |  ------------------
  |  |  118|  2.55k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.55k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.55k|    break;                                                                     \
  |  |  120|  2.55k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.05k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.05k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 5.03k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    803|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 803, False: 4.25k]
  ------------------
  784|    803|          goto gt;
  785|    339|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 339, False: 4.71k]
  ------------------
  786|    339|          goto sol;
  787|    387|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 387, False: 4.67k]
  ------------------
  788|    903|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 516, False: 4.54k]
  ------------------
  789|  1.31k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 416, False: 4.64k]
  ------------------
  790|  1.31k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.31k|#  define MINBPC(enc) 2
  ------------------
  791|  1.31k|          continue;
  792|      7|        default:
  ------------------
  |  Branch (792:9): [True: 7, False: 5.05k]
  ------------------
  793|      7|          *nextTokPtr = ptr;
  794|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  795|  5.05k|        }
  796|  2.55k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.55k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.05k|      }
  798|     36|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  3.77k|    }
  800|  5.74k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.74k, False: 30.4k]
  ------------------
  801|  6.54k|    gt:
  802|  6.54k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.54k|#  define MINBPC(enc) 2
  ------------------
  803|  6.54k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.54k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    327|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 327, False: 35.8k]
  ------------------
  805|    666|    sol:
  806|    666|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    666|#  define MINBPC(enc) 2
  ------------------
  807|    666|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    666|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    666|    {                                                                          \
  |  |  |  |  135|    666|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    666|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    666|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 654]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    666|    }
  |  |  ------------------
  ------------------
  808|    654|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    654|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    654|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 649, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 637, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     17|        *nextTokPtr = ptr;
  810|     17|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  811|     17|      }
  812|    637|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    637|#  define MINBPC(enc) 2
  ------------------
  813|    637|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    637|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     11|    default:
  ------------------
  |  Branch (814:5): [True: 11, False: 36.1k]
  ------------------
  815|     11|      *nextTokPtr = ptr;
  816|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  817|  36.1k|    }
  818|  36.1k|  }
  819|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.96k|}
xmltok.c:little2_scanCdataSection:
  337|    576|                         const char **nextTokPtr) {
  338|    576|  static const char CDATA_LSQB[]
  339|    576|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    576|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    576|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    576|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    576|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    576|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    576|#define ASCII_LSQB 0x5B
  ------------------
  340|    576|  int i;
  341|    576|  UNUSED_P(enc);
  ------------------
  |  |  135|    576|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    576|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    576|    {                                                                          \
  |  |  135|    576|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    576|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    576|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 571]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    576|    }
  ------------------
  344|  3.94k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.37k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.38k, False: 557]
  ------------------
  345|  3.38k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.38k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.38k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.37k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 3.37k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     14|      *nextTokPtr = ptr;
  347|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  348|     14|    }
  349|  3.38k|  }
  350|    557|  *nextTokPtr = ptr;
  351|    557|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    557|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    571|}
xmltok.c:little2_scanEndTag:
  432|  1.42k|                   const char **nextTokPtr) {
  433|  1.42k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.42k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.42k|    {                                                                          \
  |  |  |  |  135|  1.42k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.42k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.42k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.42k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.42k|    }
  |  |  ------------------
  ------------------
  434|  1.42k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.42k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.42k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    945|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 945, False: 477]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.57k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.39k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 455, False: 967]
  |  |  ------------------
  |  |  111|  1.39k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    455|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    455|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    455|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 452]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  1.39k|    /* fall through */                                                         \
  |  |  116|  1.39k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 638, False: 784]
  |  |  ------------------
  |  |  117|  1.39k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 307, False: 1.11k]
  |  |  ------------------
  |  |  118|  1.39k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.39k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.39k|    break;                                                                     \
  |  |  120|  1.39k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.42k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.42k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 1.40k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.41k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.42k|  }
  440|  2.78k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.78k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.78k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.78k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.37k, False: 412]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.12k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.44k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 384, False: 2.40k]
  |  |  ------------------
  |  |   82|  1.44k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    384|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    384|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    384|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 368]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  1.44k|    /* fall through */                                                         \
  |  |   87|  1.44k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 216, False: 2.56k]
  |  |  ------------------
  |  |   88|    814|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 230, False: 2.55k]
  |  |  ------------------
  |  |   89|  1.05k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 241, False: 2.54k]
  |  |  ------------------
  |  |   90|  1.24k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.59k]
  |  |  ------------------
  |  |   91|  1.44k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 199, False: 2.58k]
  |  |  ------------------
  |  |   92|  1.44k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.44k|    break;                                                                     \
  |  |   94|  1.44k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.78k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.78k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 2.76k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    363|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 363, False: 2.42k]
  ------------------
  444|    607|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 244, False: 2.54k]
  ------------------
  445|  1.01k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 405, False: 2.38k]
  ------------------
  446|  1.67k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.01k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    701|#  define MINBPC(enc) 2
  ------------------
  447|  1.67k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.67k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.67k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.65k, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    233|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 233, False: 1.43k]
  ------------------
  449|    449|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 216, False: 1.45k]
  ------------------
  450|    701|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 252, False: 1.41k]
  ------------------
  451|    701|          break;
  452|    951|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 951, False: 720]
  ------------------
  453|    951|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    951|#  define MINBPC(enc) 2
  ------------------
  454|    951|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    951|#define XML_TOK_END_TAG 5
  ------------------
  455|     19|        default:
  ------------------
  |  Branch (455:9): [True: 19, False: 1.65k]
  ------------------
  456|     19|          *nextTokPtr = ptr;
  457|     19|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  458|  1.67k|        }
  459|  1.67k|      }
  460|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 2.78k]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|    279|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 279, False: 2.50k]
  ------------------
  469|    279|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    279|#  define MINBPC(enc) 2
  ------------------
  470|    279|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    279|#define XML_TOK_END_TAG 5
  ------------------
  471|      9|    default:
  ------------------
  |  Branch (471:5): [True: 9, False: 2.77k]
  ------------------
  472|      9|      *nextTokPtr = ptr;
  473|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  474|  2.78k|    }
  475|  2.78k|  }
  476|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.39k|}
xmltok.c:little2_scanAtts:
  573|  2.55k|                 const char **nextTokPtr) {
  574|  2.55k|#  ifdef XML_NS
  575|  2.55k|  int hadColon = 0;
  576|  2.55k|#  endif
  577|   271k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   271k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   271k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   271k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   269k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 269k, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  11.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.28k, False: 269k]
  |  |  ------------------
  |  |   82|  3.16k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.28k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.28k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 1.26k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  3.16k|    /* fall through */                                                         \
  |  |   87|  3.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 872, False: 270k]
  |  |  ------------------
  |  |   88|  2.53k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 400, False: 270k]
  |  |  ------------------
  |  |   89|  2.75k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 216, False: 270k]
  |  |  ------------------
  |  |   90|  2.94k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 270k]
  |  |  ------------------
  |  |   91|  3.16k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 215, False: 270k]
  |  |  ------------------
  |  |   92|  3.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  3.16k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.16k|    break;                                                                     \
  |  |   94|  3.16k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 271k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 271k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 271k]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 271k]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|    408|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 408, False: 270k]
  ------------------
  598|    684|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 276, False: 270k]
  ------------------
  599|    940|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 256, False: 270k]
  ------------------
  600|  2.01k|      for (;;) {
  601|  2.01k|        int t;
  602|       |
  603|  2.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.01k|#  define MINBPC(enc) 2
  ------------------
  604|  2.01k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.01k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.01k|    {                                                                          \
  |  |  |  |  135|  2.01k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.01k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.98k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.01k|    }
  |  |  ------------------
  ------------------
  605|  1.98k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.98k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.98k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.96k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.98k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 878, False: 1.10k]
  ------------------
  607|    878|          break;
  608|  1.10k|        switch (t) {
  609|    355|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 355, False: 748]
  ------------------
  610|    767|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 412, False: 691]
  ------------------
  611|  1.07k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 312, False: 791]
  ------------------
  612|  1.07k|          break;
  613|     24|        default:
  ------------------
  |  Branch (613:9): [True: 24, False: 1.07k]
  ------------------
  614|     24|          *nextTokPtr = ptr;
  615|     24|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  616|  1.10k|        }
  617|  1.10k|      }
  618|       |      /* fall through */
  619|   267k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 266k, False: 4.14k]
  ------------------
  620|   267k|      int open;
  621|   267k|#  ifdef XML_NS
  622|   267k|      hadColon = 0;
  623|   267k|#  endif
  624|   268k|      for (;;) {
  625|   268k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   268k|#  define MINBPC(enc) 2
  ------------------
  626|   268k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   268k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   268k|    {                                                                          \
  |  |  |  |  135|   268k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   268k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   268k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 268k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|   268k|    }
  |  |  ------------------
  ------------------
  627|   268k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   268k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   268k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   268k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 268k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   268k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 3.47k, False: 265k]
  |  Branch (628:32): [True: 264k, False: 1.10k]
  ------------------
  629|   267k|          break;
  630|  1.10k|        switch (open) {
  631|    453|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 453, False: 656]
  ------------------
  632|    873|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 420, False: 689]
  ------------------
  633|  1.07k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 203, False: 906]
  ------------------
  634|  1.07k|          break;
  635|     33|        default:
  ------------------
  |  Branch (635:9): [True: 33, False: 1.07k]
  ------------------
  636|     33|          *nextTokPtr = ptr;
  637|     33|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  638|  1.10k|        }
  639|  1.10k|      }
  640|   267k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   267k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  6.77M|      for (;;) {
  643|  6.77M|        int t;
  644|  6.77M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.77M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.77M|    {                                                                          \
  |  |  |  |  135|  6.77M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.77M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.77M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 52, False: 6.77M]
  |  |  |  |  ------------------
  |  |  |  |  136|     52|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     52|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     52|      }                                                                        \
  |  |  |  |  138|  6.77M|    }
  |  |  ------------------
  ------------------
  645|  6.77M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  6.77M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.77M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.42M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.42M, False: 5.35M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  6.77M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 267k, False: 6.51M]
  ------------------
  647|   267k|          break;
  648|  6.51M|        switch (t) {
  649|   199k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  99.9k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  99.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 99.9k, False: 6.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|  99.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 99.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  99.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  99.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  99.8k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  99.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  99.8k|    break;
  |  |  ------------------
  |  |   63|  99.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 6.51M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 6.51M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 6.51M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  95.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 95.9k, False: 6.41M]
  ------------------
  651|  95.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  95.9k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  95.9k|#  define MINBPC(enc) 2
  ------------------
  652|  95.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 10, False: 95.9k]
  ------------------
  653|     10|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 5, False: 5]
  ------------------
  654|      5|              *nextTokPtr = ptr;
  655|     10|            return tok;
  656|     10|          }
  657|  95.9k|          break;
  658|  95.9k|        }
  659|  95.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 7, False: 6.51M]
  ------------------
  660|      7|          *nextTokPtr = ptr;
  661|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  662|  6.31M|        default:
  ------------------
  |  Branch (662:9): [True: 6.31M, False: 195k]
  ------------------
  663|  6.31M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.31M|#  define MINBPC(enc) 2
  ------------------
  664|  6.31M|          break;
  665|  6.51M|        }
  666|  6.51M|      }
  667|   267k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   267k|#  define MINBPC(enc) 2
  ------------------
  668|   267k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   267k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   267k|    {                                                                          \
  |  |  |  |  135|   267k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   267k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   267k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   267k|    }
  |  |  ------------------
  ------------------
  669|   267k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   267k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   267k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   267k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 267k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   263k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 263k, False: 4.43k]
  ------------------
  671|   263k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 753, False: 266k]
  ------------------
  672|   266k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 2.01k, False: 265k]
  ------------------
  673|   266k|        break;
  674|    230|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 230, False: 267k]
  ------------------
  675|    230|        goto sol;
  676|  1.41k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.41k, False: 266k]
  ------------------
  677|  1.41k|        goto gt;
  678|     24|      default:
  ------------------
  |  Branch (678:7): [True: 24, False: 267k]
  ------------------
  679|     24|        *nextTokPtr = ptr;
  680|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  681|   267k|      }
  682|       |      /* ptr points to closing quote */
  683|   267k|      for (;;) {
  684|   267k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   267k|#  define MINBPC(enc) 2
  ------------------
  685|   267k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   267k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   267k|    {                                                                          \
  |  |  |  |  135|   267k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   267k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   267k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|   267k|    }
  |  |  ------------------
  ------------------
  686|   267k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   267k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   267k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   266k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 266k, False: 718]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   213k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   265k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 693, False: 266k]
  |  |  ------------------
  |  |  111|   265k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    693|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    693|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    693|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 4, False: 689]
  |  |  ------------------
  |  |  112|      4|      *nextTokPtr = ptr;                                                       \
  |  |  113|      4|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      4|    }                                                                          \
  |  |  115|   265k|    /* fall through */                                                         \
  |  |  116|   265k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 212k, False: 55.0k]
  |  |  ------------------
  |  |  117|   265k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 52.5k, False: 214k]
  |  |  ------------------
  |  |  118|   265k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   265k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   265k|    break;                                                                     \
  |  |  120|   265k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    543|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 543, False: 266k]
  ------------------
  689|    784|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 241, False: 267k]
  ------------------
  690|  1.36k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 576, False: 266k]
  ------------------
  691|  1.36k|          continue;
  692|    240|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 240, False: 267k]
  ------------------
  693|  1.65k|        gt:
  694|  1.65k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.65k|#  define MINBPC(enc) 2
  ------------------
  695|  1.65k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.65k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    198|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 198, False: 267k]
  ------------------
  697|    428|        sol:
  698|    428|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    428|#  define MINBPC(enc) 2
  ------------------
  699|    428|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    428|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    428|    {                                                                          \
  |  |  |  |  135|    428|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    428|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    428|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 420]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|    428|    }
  |  |  ------------------
  ------------------
  700|    420|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    420|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    420|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 415, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 406, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     14|            *nextTokPtr = ptr;
  702|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  703|     14|          }
  704|    406|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    406|#  define MINBPC(enc) 2
  ------------------
  705|    406|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    406|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     10|        default:
  ------------------
  |  Branch (706:9): [True: 10, False: 267k]
  ------------------
  707|     10|          *nextTokPtr = ptr;
  708|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  709|   267k|        }
  710|   265k|        break;
  711|   267k|      }
  712|   265k|      break;
  713|   266k|    }
  714|   265k|    default:
  ------------------
  |  Branch (714:5): [True: 10, False: 271k]
  ------------------
  715|     10|      *nextTokPtr = ptr;
  716|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  717|   271k|    }
  718|   271k|  }
  719|     87|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     87|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.55k|}
xmltok.c:little2_scanRef:
  545|   208k|                const char **nextTokPtr) {
  546|   208k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   208k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   208k|    {                                                                          \
  |  |  |  |  135|   208k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   208k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   208k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 208k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|   208k|    }
  |  |  ------------------
  ------------------
  547|   208k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   208k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   208k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   207k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 207k, False: 1.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  7.04k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   199k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.48k, False: 207k]
  |  |  ------------------
  |  |  111|   199k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.48k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.48k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.48k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 24, False: 1.46k]
  |  |  ------------------
  |  |  112|     24|      *nextTokPtr = ptr;                                                       \
  |  |  113|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     24|    }                                                                          \
  |  |  115|   199k|    /* fall through */                                                         \
  |  |  116|   199k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.08k, False: 204k]
  |  |  ------------------
  |  |  117|   199k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 193k, False: 14.6k]
  |  |  ------------------
  |  |  118|   199k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   199k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   199k|    break;                                                                     \
  |  |  120|   199k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 208k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 208k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     10|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 208k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|      5|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  9.07k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 9.07k, False: 199k]
  ------------------
  550|  9.07k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  9.07k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  9.07k|#  define MINBPC(enc) 2
  ------------------
  551|      8|  default:
  ------------------
  |  Branch (551:3): [True: 8, False: 208k]
  ------------------
  552|      8|    *nextTokPtr = ptr;
  553|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  554|   208k|  }
  555|   219k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   219k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   219k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   219k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   214k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 214k, False: 5.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  82.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  20.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.28k, False: 214k]
  |  |  ------------------
  |  |   82|  20.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  5.28k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  5.28k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 25, False: 5.25k]
  |  |  ------------------
  |  |   83|     25|      *nextTokPtr = ptr;                                                       \
  |  |   84|     25|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     25|    }                                                                          \
  |  |   86|  20.2k|    /* fall through */                                                         \
  |  |   87|  20.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.8k, False: 206k]
  |  |  ------------------
  |  |   88|  19.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.24k, False: 218k]
  |  |  ------------------
  |  |   89|  19.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 361, False: 219k]
  |  |  ------------------
  |  |   90|  19.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 210, False: 219k]
  |  |  ------------------
  |  |   91|  20.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 309, False: 219k]
  |  |  ------------------
  |  |   92|  20.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  20.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  20.2k|    break;                                                                     \
  |  |   94|  20.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 219k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 219k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     17|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 219k]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|     13|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   199k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 199k, False: 20.3k]
  ------------------
  559|   199k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   199k|#  define MINBPC(enc) 2
  ------------------
  560|   199k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   199k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      7|    default:
  ------------------
  |  Branch (561:5): [True: 7, False: 219k]
  ------------------
  562|      7|      *nextTokPtr = ptr;
  563|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  564|   219k|    }
  565|   219k|  }
  566|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   199k|}
xmltok.c:little2_scanCharRef:
  514|  9.07k|                    const char **nextTokPtr) {
  515|  9.07k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  9.07k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.07k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.07k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 9.07k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  9.07k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  9.07k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  9.07k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 9.07k, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 5.23k, False: 3.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  5.23k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.23k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.23k|#  define MINBPC(enc) 2
  ------------------
  518|  3.84k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.84k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.84k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.83k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.83k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  3.83k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 3.83k, False: 10]
  ------------------
  520|  3.83k|      break;
  521|     10|    default:
  ------------------
  |  Branch (521:5): [True: 10, False: 3.83k]
  ------------------
  522|     10|      *nextTokPtr = ptr;
  523|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  524|  3.84k|    }
  525|  7.77k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.83k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.94k|#  define MINBPC(enc) 2
  ------------------
  526|  7.77k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.77k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.77k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.74k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.74k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  3.94k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.94k, False: 3.82k]
  ------------------
  528|  3.94k|        break;
  529|  3.80k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 3.80k, False: 3.96k]
  ------------------
  530|  3.80k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.80k|#  define MINBPC(enc) 2
  ------------------
  531|  3.80k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  3.80k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     22|      default:
  ------------------
  |  Branch (532:7): [True: 22, False: 7.74k]
  ------------------
  533|     22|        *nextTokPtr = ptr;
  534|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  535|  7.77k|      }
  536|  7.77k|    }
  537|  3.83k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  9.07k|}
xmltok.c:little2_scanHexCharRef:
  483|  5.23k|                       const char **nextTokPtr) {
  484|  5.23k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.23k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.23k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.23k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  5.23k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.23k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.23k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.22k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  1.64k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.64k, False: 3.58k]
  ------------------
  487|  5.22k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.57k, False: 1.65k]
  ------------------
  488|  5.22k|      break;
  489|     10|    default:
  ------------------
  |  Branch (489:5): [True: 10, False: 5.22k]
  ------------------
  490|     10|      *nextTokPtr = ptr;
  491|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  492|  5.23k|    }
  493|  18.8k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  5.22k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  13.6k|#  define MINBPC(enc) 2
  ------------------
  494|  18.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  18.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  18.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.8k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  6.40k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 6.40k, False: 12.4k]
  ------------------
  496|  13.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 7.28k, False: 11.6k]
  ------------------
  497|  13.6k|        break;
  498|  5.17k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 5.17k, False: 13.7k]
  ------------------
  499|  5.17k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.17k|#  define MINBPC(enc) 2
  ------------------
  500|  5.17k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  5.17k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     34|      default:
  ------------------
  |  Branch (501:7): [True: 34, False: 18.8k]
  ------------------
  502|     34|        *nextTokPtr = ptr;
  503|     34|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  504|  18.8k|      }
  505|  18.8k|    }
  506|  5.22k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  5.23k|}
xmltok.c:little2_cdataSectionTok:
  356|  19.1k|                        const char **nextTokPtr) {
  357|  19.1k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 144, False: 18.9k]
  ------------------
  358|    144|    return XML_TOK_NONE;
  ------------------
  |  |   51|    144|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  18.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  18.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  18.9k|    size_t n = end - ptr;
  361|  18.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  18.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 4.34k, False: 14.6k]
  ------------------
  362|  4.34k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  4.34k|#  define MINBPC(enc) 2
  ------------------
  363|  4.34k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 16, False: 4.32k]
  ------------------
  364|     16|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  4.32k|      end = ptr + n;
  366|  4.32k|    }
  367|  18.9k|  }
  368|  18.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  18.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  18.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.6k, False: 4.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  5.87k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 5.87k, False: 13.1k]
  ------------------
  370|  5.87k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.87k|#  define MINBPC(enc) 2
  ------------------
  371|  5.87k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.87k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.87k|    {                                                                          \
  |  |  |  |  135|  5.87k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.87k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.87k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.87k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.87k|    }
  |  |  ------------------
  ------------------
  372|  5.87k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  5.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.07k, False: 1.79k]
  |  |  |  |  |  Branch (739:52): [True: 2.65k, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  3.21k|      break;
  374|  2.65k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.65k|#  define MINBPC(enc) 2
  ------------------
  375|  2.65k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.65k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.65k|    {                                                                          \
  |  |  |  |  135|  2.65k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.65k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.65k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.65k|    }
  |  |  ------------------
  ------------------
  376|  2.65k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.65k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.65k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.54k, False: 1.10k]
  |  |  |  |  |  Branch (739:52): [True: 262, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  2.39k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  2.39k|#  define MINBPC(enc) 2
  ------------------
  378|  2.39k|      break;
  379|  2.39k|    }
  380|    262|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    262|#  define MINBPC(enc) 2
  ------------------
  381|    262|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    262|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  6.07k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 6.07k, False: 12.9k]
  ------------------
  383|  6.07k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.07k|#  define MINBPC(enc) 2
  ------------------
  384|  6.07k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.07k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.07k|    {                                                                          \
  |  |  |  |  135|  6.07k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.07k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.07k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 16, False: 6.06k]
  |  |  |  |  ------------------
  |  |  |  |  136|     16|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     16|      }                                                                        \
  |  |  |  |  138|  6.07k|    }
  |  |  ------------------
  ------------------
  385|  6.06k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  6.06k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.06k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.25k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.25k, False: 3.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 313, False: 5.74k]
  ------------------
  386|    313|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    313|#  define MINBPC(enc) 2
  ------------------
  387|  6.06k|    *nextTokPtr = ptr;
  388|  6.06k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.06k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.67k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.67k, False: 17.2k]
  ------------------
  390|  1.67k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
  391|  1.67k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.67k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  3.49k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 18.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 18.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.72k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.67k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.72k, False: 17.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.72k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 57, False: 1.67k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.67k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     57|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.67k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.67k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.67k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.67k|    break;
  |  |  ------------------
  |  |   63|  1.67k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 48, False: 18.9k]
  |  |  ------------------
  |  |   64|     48|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 18.9k]
  |  |  ------------------
  |  |   65|     58|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 18.9k]
  |  |  ------------------
  |  |   66|     58|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     58|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     58|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  3.56k|  default:
  ------------------
  |  Branch (393:3): [True: 3.56k, False: 15.4k]
  ------------------
  394|  3.56k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.56k|#  define MINBPC(enc) 2
  ------------------
  395|  3.56k|    break;
  396|  18.9k|  }
  397|  2.32M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  2.32M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.32M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.32M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  48.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 48.7k, False: 2.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.32M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.32M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  409|  15.0k|      LEAD_CASE(4)
  ------------------
  |  |  400|  15.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 15.0k, False: 2.30M]
  |  |  ------------------
  |  |  401|  15.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  15.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 51, False: 15.0k]
  |  |  ------------------
  |  |  402|     51|      *nextTokPtr = ptr;                                                       \
  |  |  403|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     51|    }                                                                          \
  |  |  405|  15.0k|    ptr += n;                                                                  \
  |  |  406|  15.0k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     46|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 46, False: 2.32M]
  ------------------
  412|     46|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 2.32M]
  ------------------
  413|     52|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 6, False: 2.32M]
  ------------------
  414|  4.91k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 4.85k, False: 2.31M]
  ------------------
  415|  6.34k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.43k, False: 2.32M]
  ------------------
  416|  10.6k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 4.31k, False: 2.32M]
  ------------------
  417|  10.6k|      *nextTokPtr = ptr;
  418|  10.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  10.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  2.29M|    default:
  ------------------
  |  Branch (419:5): [True: 2.29M, False: 25.7k]
  ------------------
  420|  2.29M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.29M|#  define MINBPC(enc) 2
  ------------------
  421|  2.29M|      break;
  422|  2.32M|    }
  423|  2.32M|  }
  424|    131|  *nextTokPtr = ptr;
  425|    131|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    131|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  10.8k|}
xmltok.c:little2_attributeValueTok:
 1262|   237k|                          const char **nextTokPtr) {
 1263|   237k|  const char *start;
 1264|   237k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.33k, False: 233k]
  ------------------
 1265|  3.33k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.33k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   233k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   233k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   233k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   233k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 233k]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|   233k|  start = ptr;
 1275|  3.95M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  3.95M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.95M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.95M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   326k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 326k, False: 3.63M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 3.95M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 3.95M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|   128k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   128k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 128k, False: 3.82M]
  |  |  ------------------
  |  | 1279|   128k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   128k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   184k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 184k, False: 3.77M]
  ------------------
 1286|   184k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 95.4k, False: 89.0k]
  ------------------
 1287|  95.4k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  95.4k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  95.4k|#  define MINBPC(enc) 2
  ------------------
 1288|  89.0k|      *nextTokPtr = ptr;
 1289|  89.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  89.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      2|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 2, False: 3.95M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      2|      *nextTokPtr = ptr;
 1293|      2|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1294|  31.1k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 31.1k, False: 3.92M]
  ------------------
 1295|  31.1k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 15.8k, False: 15.2k]
  ------------------
 1296|  15.8k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  15.8k|#  define MINBPC(enc) 2
  ------------------
 1297|  15.8k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  15.8k|      }
 1299|  15.2k|      *nextTokPtr = ptr;
 1300|  15.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  15.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  7.37k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 7.37k, False: 3.95M]
  ------------------
 1302|  7.37k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 4.16k, False: 3.21k]
  ------------------
 1303|  4.16k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.16k|#  define MINBPC(enc) 2
  ------------------
 1304|  4.16k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 276, False: 3.89k]
  ------------------
 1305|    276|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    276|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  3.89k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  3.89k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.89k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.65k, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 474, False: 3.41k]
  ------------------
 1307|    474|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    474|#  define MINBPC(enc) 2
  ------------------
 1308|  3.89k|        *nextTokPtr = ptr;
 1309|  3.89k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.89k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  4.16k|      }
 1311|  3.21k|      *nextTokPtr = ptr;
 1312|  3.21k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.21k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.76k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.76k, False: 3.94M]
  ------------------
 1314|  8.76k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.86k, False: 3.89k]
  ------------------
 1315|  4.86k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.86k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.86k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.86k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.86k|      }
 1318|  3.89k|      *nextTokPtr = ptr;
 1319|  3.89k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.89k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  3.59M|    default:
  ------------------
  |  Branch (1320:5): [True: 3.59M, False: 359k]
  ------------------
 1321|  3.59M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.59M|#  define MINBPC(enc) 2
  ------------------
 1322|  3.59M|      break;
 1323|  3.95M|    }
 1324|  3.95M|  }
 1325|  1.96k|  *nextTokPtr = ptr;
 1326|  1.96k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.96k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   233k|}
xmltok.c:little2_entityValueTok:
 1331|   226k|                       const char **nextTokPtr) {
 1332|   226k|  const char *start;
 1333|   226k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.29k, False: 224k]
  ------------------
 1334|  2.29k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.29k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   224k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   224k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   224k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   224k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 224k]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|   224k|  start = ptr;
 1344|  35.0M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  35.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  35.0M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.0M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   615k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 615k, False: 34.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 35.0M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 35.0M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   153k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   153k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 153k, False: 34.8M]
  |  |  ------------------
  |  | 1348|   153k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   153k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  11.6k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 11.6k, False: 34.9M]
  ------------------
 1355|  11.6k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 5.97k, False: 5.70k]
  ------------------
 1356|  5.97k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.97k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.97k|#  define MINBPC(enc) 2
  ------------------
 1357|  5.70k|      *nextTokPtr = ptr;
 1358|  5.70k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.70k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      9|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 9, False: 35.0M]
  ------------------
 1360|      9|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 4]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      5|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 3]
  ------------------
 1363|      5|      }
 1364|      4|      *nextTokPtr = ptr;
 1365|      4|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  36.0k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 36.0k, False: 34.9M]
  ------------------
 1367|  36.0k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 19.0k, False: 16.9k]
  ------------------
 1368|  19.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  19.0k|#  define MINBPC(enc) 2
  ------------------
 1369|  19.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  19.0k|      }
 1371|  16.9k|      *nextTokPtr = ptr;
 1372|  16.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   175k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 175k, False: 34.8M]
  ------------------
 1374|   175k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 97.7k, False: 77.3k]
  ------------------
 1375|  97.7k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  97.7k|#  define MINBPC(enc) 2
  ------------------
 1376|  97.7k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  97.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  97.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  97.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 660, False: 97.0k]
  ------------------
 1377|    660|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    660|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  97.0k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  97.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  97.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  37.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 37.2k, False: 59.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 767, False: 96.3k]
  ------------------
 1379|    767|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    767|#  define MINBPC(enc) 2
  ------------------
 1380|  97.0k|        *nextTokPtr = ptr;
 1381|  97.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  97.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  97.7k|      }
 1383|  77.3k|      *nextTokPtr = ptr;
 1384|  77.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  77.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  34.6M|    default:
  ------------------
  |  Branch (1385:5): [True: 34.6M, False: 376k]
  ------------------
 1386|  34.6M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  34.6M|#  define MINBPC(enc) 2
  ------------------
 1387|  34.6M|      break;
 1388|  35.0M|    }
 1389|  35.0M|  }
 1390|  1.19k|  *nextTokPtr = ptr;
 1391|  1.19k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.19k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   224k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  29.7k|                         const char *end1, const char *ptr2) {
 1716|  29.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  29.7k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   126k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  96.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 109k, False: 17.0k]
  ------------------
 1718|   109k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|   109k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 29, False: 109k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     29|      return 0; /* LCOV_EXCL_LINE */
 1725|     29|    }
 1726|   109k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|   109k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|   109k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 109k, False: 25]
  |  |  |  |  |  Branch (739:52): [True: 96.8k, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  12.6k|      return 0;
 1728|   109k|  }
 1729|  17.0k|  return ptr1 == end1;
 1730|  29.7k|}
xmltok.c:little2_nameLength:
 1733|  13.1k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  13.1k|  const char *start = ptr;
 1735|  51.8k|  for (;;) {
 1736|  51.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  51.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  51.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  24.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 24.5k, False: 27.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 51.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 51.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 51.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  27.2k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 27.2k, False: 24.5k]
  ------------------
 1746|  34.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 6.88k, False: 44.9k]
  ------------------
 1747|  34.1k|#  ifdef XML_NS
 1748|  34.1k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 51.8k]
  ------------------
 1749|  34.1k|#  endif
 1750|  38.3k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.19k, False: 47.6k]
  ------------------
 1751|  38.5k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 176, False: 51.6k]
  ------------------
 1752|  38.5k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 34, False: 51.8k]
  ------------------
 1753|  38.7k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 184, False: 51.6k]
  ------------------
 1754|  38.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  38.7k|#  define MINBPC(enc) 2
  ------------------
 1755|  38.7k|      break;
 1756|  13.1k|    default:
  ------------------
  |  Branch (1756:5): [True: 13.1k, False: 38.7k]
  ------------------
 1757|  13.1k|      return (int)(ptr - start);
 1758|  51.8k|    }
 1759|  51.8k|  }
 1760|  13.1k|}
xmltok.c:little2_getAtts:
 1510|  9.34k|                ATTRIBUTE *atts) {
 1511|  9.34k|  enum { other, inName, inValue } state = inName;
 1512|  9.34k|  int nAtts = 0;
 1513|  9.34k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  11.8M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.34k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  11.8M|#  define MINBPC(enc) 2
  ------------------
 1517|  11.8M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  11.8M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.8M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.96M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.96M, False: 6.87M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 11.8M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 11.8M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|   122k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   122k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 122k, False: 11.7M]
  |  |  ------------------
  |  | 1528|   122k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   122k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 122k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|   122k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   122k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  6.75M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 6.75M, False: 5.08M]
  ------------------
 1535|  7.32M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 567k, False: 11.2M]
  ------------------
 1536|  7.55M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 231k, False: 11.6M]
  ------------------
 1537|  7.55M|      START_NAME
  ------------------
  |  | 1519|  7.55M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 529k, False: 7.02M]
  |  |  ------------------
  |  | 1520|   529k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 267k, False: 261k]
  |  |  ------------------
  |  | 1521|   267k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   267k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   267k|      }                                                                        \
  |  | 1524|   529k|      state = inName;                                                          \
  |  | 1525|   529k|    }
  ------------------
 1538|  7.55M|      break;
 1539|      0|#  undef START_NAME
 1540|  11.2k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 11.2k, False: 11.8M]
  ------------------
 1541|  11.2k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 4.46k, False: 6.75k]
  ------------------
 1542|  4.46k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 3.20k, False: 1.26k]
  ------------------
 1543|  3.20k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.20k|#  define MINBPC(enc) 2
  ------------------
 1544|  4.46k|        state = inValue;
 1545|  4.46k|        open = BT_QUOT;
 1546|  6.75k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 4.46k, False: 2.28k]
  ------------------
 1547|  4.46k|        state = other;
 1548|  4.46k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 3.20k, False: 1.26k]
  ------------------
 1549|  3.20k|          atts[nAtts].valueEnd = ptr;
 1550|  4.46k|        nAtts++;
 1551|  4.46k|      }
 1552|  11.2k|      break;
 1553|  1.05M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.05M, False: 10.7M]
  ------------------
 1554|  1.05M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 524k, False: 527k]
  ------------------
 1555|   524k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 264k, False: 260k]
  ------------------
 1556|   264k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   264k|#  define MINBPC(enc) 2
  ------------------
 1557|   524k|        state = inValue;
 1558|   524k|        open = BT_APOS;
 1559|   527k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 524k, False: 2.31k]
  ------------------
 1560|   524k|        state = other;
 1561|   524k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 264k, False: 260k]
  ------------------
 1562|   264k|          atts[nAtts].valueEnd = ptr;
 1563|   524k|        nAtts++;
 1564|   524k|      }
 1565|  1.05M|      break;
 1566|  96.2k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 96.2k, False: 11.7M]
  ------------------
 1567|  96.2k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 95.9k, False: 364]
  ------------------
 1568|  95.9k|        atts[nAtts].normalized = 0;
 1569|  96.2k|      break;
 1570|  1.45M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.45M, False: 10.3M]
  ------------------
 1571|  1.45M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.69k, False: 1.45M]
  ------------------
 1572|  1.69k|        state = other;
 1573|  1.45M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 926k, False: 525k]
  |  Branch (1573:36): [True: 467k, False: 458k]
  |  Branch (1573:55): [True: 232k, False: 234k]
  ------------------
 1574|  1.45M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 41.9k, False: 191k]
  ------------------
 1575|   232k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   191k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   191k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 191k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   423k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 9.00k, False: 182k]
  ------------------
 1576|   232k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   182k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   182k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 174k, False: 7.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   414k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 96.5k, False: 85.4k]
  ------------------
 1577|   232k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  85.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  85.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  78.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 78.1k, False: 7.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 77.8k, False: 7.63k]
  ------------------
 1578|   225k|        atts[nAtts].normalized = 0;
 1579|  1.45M|      break;
 1580|   197k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 197k, False: 11.6M]
  ------------------
 1581|   218k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 21.4k, False: 11.8M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   218k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.35k, False: 216k]
  ------------------
 1585|  2.35k|        state = other;
 1586|   216k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 212k, False: 4.27k]
  |  Branch (1586:36): [True: 116k, False: 95.6k]
  ------------------
 1587|   116k|        atts[nAtts].normalized = 0;
 1588|   218k|      break;
 1589|   233k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 233k, False: 11.6M]
  ------------------
 1590|   286k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 53.1k, False: 11.7M]
  ------------------
 1591|   286k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 9.34k, False: 277k]
  ------------------
 1592|  9.34k|        return nAtts;
 1593|   277k|      break;
 1594|  1.04M|    default:
  ------------------
  |  Branch (1594:5): [True: 1.04M, False: 10.7M]
  ------------------
 1595|  1.04M|      break;
 1596|  11.8M|    }
 1597|  11.8M|  }
 1598|       |  /* not reached */
 1599|  9.34k|}
xmltok.c:little2_charRefNumber:
 1602|  8.28k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  8.28k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  8.28k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.28k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  8.28k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  8.28k|#  define MINBPC(enc) 2
  ------------------
 1607|  8.28k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  8.28k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  8.28k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 8.28k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.70k, False: 3.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  22.0k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  4.70k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  22.0k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  22.0k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 22.0k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.69k, False: 17.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  17.3k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  17.3k|#  define MINBPC(enc) 2
  ------------------
 1610|  17.3k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  17.3k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  17.3k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 17.3k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  17.3k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 17.3k]
  ------------------
 1612|    382|      case ASCII_0:
  ------------------
  |  |   90|    382|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 382, False: 16.9k]
  ------------------
 1613|    697|      case ASCII_1:
  ------------------
  |  |   91|    697|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 315, False: 17.0k]
  ------------------
 1614|  1.78k|      case ASCII_2:
  ------------------
  |  |   92|  1.78k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.08k, False: 16.2k]
  ------------------
 1615|  2.15k|      case ASCII_3:
  ------------------
  |  |   93|  2.15k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 372, False: 17.0k]
  ------------------
 1616|  2.76k|      case ASCII_4:
  ------------------
  |  |   94|  2.76k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 609, False: 16.7k]
  ------------------
 1617|  4.37k|      case ASCII_5:
  ------------------
  |  |   95|  4.37k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.61k, False: 15.7k]
  ------------------
 1618|  5.10k|      case ASCII_6:
  ------------------
  |  |   96|  5.10k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 725, False: 16.6k]
  ------------------
 1619|  5.84k|      case ASCII_7:
  ------------------
  |  |   97|  5.84k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 747, False: 16.6k]
  ------------------
 1620|  6.27k|      case ASCII_8:
  ------------------
  |  |   98|  6.27k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 429, False: 16.9k]
  ------------------
 1621|  7.12k|      case ASCII_9:
  ------------------
  |  |   99|  7.12k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 849, False: 16.5k]
  ------------------
 1622|  7.12k|        result <<= 4;
 1623|  7.12k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  7.12k|#define ASCII_0 0x30
  ------------------
 1624|  7.12k|        break;
 1625|    472|      case ASCII_A:
  ------------------
  |  |   36|    472|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 472, False: 16.9k]
  ------------------
 1626|  1.71k|      case ASCII_B:
  ------------------
  |  |   37|  1.71k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 1.24k, False: 16.1k]
  ------------------
 1627|  1.91k|      case ASCII_C:
  ------------------
  |  |   38|  1.91k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 198, False: 17.1k]
  ------------------
 1628|  2.60k|      case ASCII_D:
  ------------------
  |  |   39|  2.60k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 688, False: 16.6k]
  ------------------
 1629|  3.64k|      case ASCII_E:
  ------------------
  |  |   40|  3.64k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 1.03k, False: 16.3k]
  ------------------
 1630|  4.74k|      case ASCII_F:
  ------------------
  |  |   41|  4.74k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.10k, False: 16.2k]
  ------------------
 1631|  4.74k|        result <<= 4;
 1632|  4.74k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.74k|#define ASCII_A 0x41
  ------------------
 1633|  4.74k|        break;
 1634|    214|      case ASCII_a:
  ------------------
  |  |   63|    214|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 214, False: 17.1k]
  ------------------
 1635|    982|      case ASCII_b:
  ------------------
  |  |   64|    982|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 768, False: 16.6k]
  ------------------
 1636|  1.20k|      case ASCII_c:
  ------------------
  |  |   65|  1.20k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 219, False: 17.1k]
  ------------------
 1637|  2.85k|      case ASCII_d:
  ------------------
  |  |   66|  2.85k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.64k, False: 15.7k]
  ------------------
 1638|  4.26k|      case ASCII_e:
  ------------------
  |  |   67|  4.26k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 1.41k, False: 15.9k]
  ------------------
 1639|  5.50k|      case ASCII_f:
  ------------------
  |  |   68|  5.50k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.24k, False: 16.1k]
  ------------------
 1640|  5.50k|        result <<= 4;
 1641|  5.50k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  5.50k|#define ASCII_a 0x61
  ------------------
 1642|  5.50k|        break;
 1643|  17.3k|      }
 1644|  17.3k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 15, False: 17.3k]
  ------------------
 1645|     15|        return -1;
 1646|  17.3k|    }
 1647|  4.70k|  } else {
 1648|  10.8k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  10.8k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  10.8k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 10.8k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.57k, False: 7.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.29k|#  define MINBPC(enc) 2
  ------------------
 1649|  7.29k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  7.29k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  7.29k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 7.29k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  7.29k|      result *= 10;
 1651|  7.29k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  7.29k|#define ASCII_0 0x30
  ------------------
 1652|  7.29k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 4, False: 7.29k]
  ------------------
 1653|      4|        return -1;
 1654|  7.29k|    }
 1655|  3.58k|  }
 1656|  8.26k|  return checkCharRefNumber(result);
 1657|  8.28k|}
xmltok.c:little2_predefinedEntityName:
 1661|   104k|                             const char *end) {
 1662|   104k|  UNUSED_P(enc);
  ------------------
  |  |  135|   104k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   104k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 97.7k, False: 7.07k]
  ------------------
 1664|  1.65k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.65k, False: 103k]
  ------------------
 1665|  1.65k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.65k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.65k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.38k, False: 271]
  |  |  |  |  |  Branch (739:52): [True: 852, False: 535]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    852|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    852|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    852|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 285, False: 567]
  |  |  |  |  |  Branch (738:35): [True: 582, False: 270]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    483|      case ASCII_l:
  ------------------
  |  |   74|    483|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 483, False: 369]
  ------------------
 1668|    483|        return ASCII_LT;
  ------------------
  |  |  111|    483|#define ASCII_LT 0x3C
  ------------------
 1669|     84|      case ASCII_g:
  ------------------
  |  |   69|     84|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 84, False: 768]
  ------------------
 1670|     84|        return ASCII_GT;
  ------------------
  |  |  113|     84|#define ASCII_GT 0x3E
  ------------------
 1671|    852|      }
 1672|    852|    }
 1673|  1.09k|    break;
 1674|  1.80k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.80k, False: 102k]
  ------------------
 1675|  1.80k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.80k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.80k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.42k, False: 385]
  |  |  |  |  |  Branch (739:52): [True: 1.17k, False: 252]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.17k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.17k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.17k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.17k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.17k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 977, False: 195]
  |  |  |  |  |  Branch (739:52): [True: 727, False: 250]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    727|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    727|#  define MINBPC(enc) 2
  ------------------
 1679|    727|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    727|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    727|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 508, False: 219]
  |  |  |  |  |  Branch (739:52): [True: 270, False: 238]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    270|          return ASCII_AMP;
  ------------------
  |  |  105|    270|#define ASCII_AMP 0x26
  ------------------
 1681|    727|      }
 1682|  1.17k|    }
 1683|  1.53k|    break;
 1684|  3.60k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.60k, False: 101k]
  ------------------
 1685|  3.60k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.60k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.60k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 284, False: 3.32k]
  |  |  |  |  |  Branch (738:35): [True: 3.35k, False: 255]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.80k|    case ASCII_q:
  ------------------
  |  |   79|  1.80k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.80k, False: 1.80k]
  ------------------
 1687|  1.80k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.80k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.80k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.80k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.43k, False: 371]
  |  |  |  |  |  Branch (739:52): [True: 1.23k, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.23k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.23k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.23k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.23k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.23k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.01k, False: 220]
  |  |  |  |  |  Branch (739:52): [True: 797, False: 216]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    797|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    797|#  define MINBPC(enc) 2
  ------------------
 1692|    797|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    797|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    797|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 597, False: 200]
  |  |  |  |  |  Branch (739:52): [True: 268, False: 329]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    268|            return ASCII_QUOT;
  ------------------
  |  |  104|    268|#define ASCII_QUOT 0x22
  ------------------
 1694|    797|        }
 1695|  1.23k|      }
 1696|  1.53k|      break;
 1697|  1.53k|    case ASCII_a:
  ------------------
  |  |   63|  1.51k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.51k, False: 2.08k]
  ------------------
 1698|  1.51k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.51k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.51k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.30k, False: 211]
  |  |  |  |  |  Branch (739:52): [True: 1.07k, False: 229]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.07k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.07k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.07k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.07k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.07k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 864, False: 213]
  |  |  |  |  |  Branch (739:52): [True: 631, False: 233]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    631|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    631|#  define MINBPC(enc) 2
  ------------------
 1703|    631|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    631|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    631|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 396, False: 235]
  |  |  |  |  |  Branch (739:52): [True: 194, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    194|            return ASCII_APOS;
  ------------------
  |  |  106|    194|#define ASCII_APOS 0x27
  ------------------
 1705|    631|        }
 1706|  1.07k|      }
 1707|  1.32k|      break;
 1708|  3.60k|    }
 1709|   104k|  }
 1710|   103k|  return 0;
 1711|   104k|}
xmltok.c:little2_updatePosition:
 1779|  3.39k|                       POSITION *pos) {
 1780|  6.22M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  6.22M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.22M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.22M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   540k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 540k, False: 5.68M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 6.22M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 6.22M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   112k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   112k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 112k, False: 6.11M]
  |  |  ------------------
  |  | 1784|   112k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   112k|    pos->columnNumber++;                                                       \
  |  | 1786|   112k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  18.7k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 18.7k, False: 6.20M]
  ------------------
 1792|  18.7k|      pos->columnNumber = 0;
 1793|  18.7k|      pos->lineNumber++;
 1794|  18.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  18.7k|#  define MINBPC(enc) 2
  ------------------
 1795|  18.7k|      break;
 1796|  20.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 20.0k, False: 6.20M]
  ------------------
 1797|  20.0k|      pos->lineNumber++;
 1798|  20.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  20.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  20.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  20.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  40.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  20.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 20.0k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  20.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  20.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.0k, False: 9.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.29k, False: 18.7k]
  ------------------
 1800|  1.29k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.29k|#  define MINBPC(enc) 2
  ------------------
 1801|  20.0k|      pos->columnNumber = 0;
 1802|  20.0k|      break;
 1803|  6.07M|    default:
  ------------------
  |  Branch (1803:5): [True: 6.07M, False: 151k]
  ------------------
 1804|  6.07M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.07M|#  define MINBPC(enc) 2
  ------------------
 1805|  6.07M|      pos->columnNumber++;
 1806|  6.07M|      break;
 1807|  6.22M|    }
 1808|  6.22M|  }
 1809|  3.39k|}
xmltok.c:little2_isPublicId:
 1450|    938|                   const char **badPtr) {
 1451|    938|  ptr += MINBPC(enc);
  ------------------
  |  |  783|    938|#  define MINBPC(enc) 2
  ------------------
 1452|    938|  end -= MINBPC(enc);
  ------------------
  |  |  783|    938|#  define MINBPC(enc) 2
  ------------------
 1453|  7.51k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.47k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.51k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.51k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.51k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.48k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    255|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 255, False: 7.25k]
  ------------------
 1456|    671|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 416, False: 7.09k]
  ------------------
 1457|  1.03k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 367, False: 7.14k]
  ------------------
 1458|  1.34k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 303, False: 7.21k]
  ------------------
 1459|  1.61k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 270, False: 7.24k]
  ------------------
 1460|  1.96k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 352, False: 7.16k]
  ------------------
 1461|  2.18k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 220, False: 7.29k]
  ------------------
 1462|  2.45k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 275, False: 7.23k]
  ------------------
 1463|  2.66k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 202, False: 7.31k]
  ------------------
 1464|  2.99k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 339, False: 7.17k]
  ------------------
 1465|  3.23k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 239, False: 7.27k]
  ------------------
 1466|  3.83k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 593, False: 6.92k]
  ------------------
 1467|  4.12k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 294, False: 7.22k]
  ------------------
 1468|  4.32k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 201, False: 7.31k]
  ------------------
 1469|  4.55k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 224, False: 7.29k]
  ------------------
 1470|  4.85k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 301, False: 7.21k]
  ------------------
 1471|  5.27k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 420, False: 7.09k]
  ------------------
 1472|  5.53k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 266, False: 7.24k]
  ------------------
 1473|  5.53k|#  ifdef XML_NS
 1474|  5.53k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.51k]
  ------------------
 1475|  5.53k|#  endif
 1476|  5.53k|      break;
 1477|    278|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 278, False: 7.23k]
  ------------------
 1478|    278|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    278|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    278|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 278, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 277]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    277|      break;
 1483|    277|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 257, False: 7.25k]
  ------------------
 1484|    758|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 501, False: 7.01k]
  ------------------
 1485|    758|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|    758|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    758|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 758, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 750, False: 8]
  ------------------
 1486|    750|        break;
 1487|       |      /* fall through */
 1488|    949|    default:
  ------------------
  |  Branch (1488:5): [True: 941, False: 6.57k]
  ------------------
 1489|    949|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    949|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    949|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 921, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    249|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 249, False: 700]
  ------------------
 1491|    912|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 663, False: 286]
  ------------------
 1492|    912|        break;
 1493|     37|      default:
  ------------------
  |  Branch (1493:7): [True: 37, False: 912]
  ------------------
 1494|     37|        *badPtr = ptr;
 1495|     37|        return 0;
 1496|    949|      }
 1497|    912|      break;
 1498|  7.51k|    }
 1499|  7.51k|  }
 1500|    900|  return 1;
 1501|    938|}
xmltok.c:big2_prologTok:
 1018|  99.4k|                  const char **nextTokPtr) {
 1019|  99.4k|  int tok;
 1020|  99.4k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 312, False: 99.1k]
  ------------------
 1021|    312|    return XML_TOK_NONE;
  ------------------
  |  |   51|    312|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  99.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  99.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  99.1k|    size_t n = end - ptr;
 1024|  99.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  99.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 33.6k, False: 65.5k]
  ------------------
 1025|  33.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  33.6k|#  define MINBPC(enc) 2
  ------------------
 1026|  33.6k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 23, False: 33.6k]
  ------------------
 1027|     23|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  33.6k|      end = ptr + n;
 1029|  33.6k|    }
 1030|  99.1k|  }
 1031|  99.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  99.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  99.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  95.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 95.8k, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    787|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 787, False: 98.3k]
  ------------------
 1033|    787|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    787|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    787|#  define MINBPC(enc) 2
  ------------------
 1034|  6.10k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 6.10k, False: 93.0k]
  ------------------
 1035|  6.10k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.10k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.10k|#  define MINBPC(enc) 2
  ------------------
 1036|  14.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 14.3k, False: 84.7k]
  ------------------
 1037|  14.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  14.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.3k|    {                                                                          \
  |  |  |  |  135|  14.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 14.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  14.3k|    }
  |  |  ------------------
  ------------------
 1039|  14.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 10, False: 14.3k]
  |  |  |  |  |  Branch (870:4): [True: 12.6k, False: 1.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.68k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.68k, False: 6.69k]
  ------------------
 1041|  7.68k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.68k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.68k|#  define MINBPC(enc) 2
  ------------------
 1042|  3.03k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.03k, False: 11.3k]
  ------------------
 1043|  3.03k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.03k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.03k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.27k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.27k, False: 13.1k]
  ------------------
 1045|  1.91k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 642, False: 13.7k]
  ------------------
 1046|  3.62k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.71k, False: 12.6k]
  ------------------
 1047|  3.62k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 14.3k]
  ------------------
 1048|  3.62k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 14.3k]
  ------------------
 1049|  3.64k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 17, False: 14.3k]
  ------------------
 1050|  3.64k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.64k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.64k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.64k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  14.3k|    }
 1053|     10|    *nextTokPtr = ptr;
 1054|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
 1055|  14.3k|  }
 1056|  4.92k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.92k, False: 94.2k]
  ------------------
 1057|  4.92k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  4.92k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 51, False: 4.87k]
  ------------------
 1058|     51|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     51|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     51|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     51|    }
 1062|       |    /* fall through */
 1063|  23.2k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 18.3k, False: 80.7k]
  ------------------
 1064|  29.1k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.87k, False: 93.2k]
  ------------------
 1065|  32.5k|    for (;;) {
 1066|  32.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  32.5k|#  define MINBPC(enc) 2
  ------------------
 1067|  32.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  32.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  32.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  32.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 178, False: 32.4k]
  ------------------
 1068|    178|        break;
 1069|  32.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  32.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  32.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.8k, False: 2.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.58k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.58k, False: 30.8k]
  ------------------
 1071|  2.82k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.23k, False: 31.1k]
  ------------------
 1072|  2.82k|        break;
 1073|    640|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 640, False: 31.7k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    640|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    640|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 634, False: 6]
  ------------------
 1076|    634|          break;
 1077|       |        /* fall through */
 1078|  28.9k|      default:
  ------------------
  |  Branch (1078:7): [True: 28.9k, False: 3.46k]
  ------------------
 1079|  28.9k|        *nextTokPtr = ptr;
 1080|  28.9k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  28.9k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  32.4k|      }
 1082|  32.4k|    }
 1083|    178|    *nextTokPtr = ptr;
 1084|    178|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    178|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.28k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.28k, False: 96.8k]
  ------------------
 1086|  2.28k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.28k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.28k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.46k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.46k, False: 96.6k]
  ------------------
 1088|  2.46k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.46k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.46k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.46k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.02k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.02k, False: 98.1k]
  ------------------
 1091|  1.02k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.02k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.02k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    481|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 481, False: 98.6k]
  ------------------
 1094|    481|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    481|#  define MINBPC(enc) 2
  ------------------
 1095|    481|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    481|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    481|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    481|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 480]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    480|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    480|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    480|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 478, False: 2]
  |  |  |  |  |  Branch (872:49): [True: 45, False: 433]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     45|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     45|    {                                                                          \
  |  |  135|     45|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     45|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     45|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 44]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     45|    }
  ------------------
 1099|     44|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     44|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     44|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 28, False: 16]
  |  |  |  |  |  Branch (872:49): [True: 7, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      7|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      7|#  define MINBPC(enc) 2
  ------------------
 1101|      7|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      7|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      7|      }
 1103|     44|    }
 1104|    472|    *nextTokPtr = ptr;
 1105|    472|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    472|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  6.00k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 6.00k, False: 93.1k]
  ------------------
 1107|  6.00k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.00k|#  define MINBPC(enc) 2
  ------------------
 1108|  6.00k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  6.00k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.74k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.74k, False: 94.3k]
  ------------------
 1110|  4.74k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.74k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.74k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.74k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.74k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.74k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 3, False: 4.74k]
  ------------------
 1112|      3|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      3|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.74k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.74k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.74k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.72k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 23, False: 4.72k]
  |  |  |  |  |  Branch (870:4): [True: 4.72k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    620|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 620, False: 4.12k]
  ------------------
 1115|    620|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    620|#  define MINBPC(enc) 2
  ------------------
 1116|    620|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    620|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    229|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 229, False: 4.51k]
  ------------------
 1118|    229|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    229|#  define MINBPC(enc) 2
  ------------------
 1119|    229|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    229|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    308|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 308, False: 4.43k]
  ------------------
 1121|    308|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    308|#  define MINBPC(enc) 2
  ------------------
 1122|    308|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    308|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    682|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 682, False: 4.06k]
  ------------------
 1124|  1.17k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 489, False: 4.25k]
  ------------------
 1125|  1.56k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 391, False: 4.35k]
  ------------------
 1126|  2.08k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 523, False: 4.22k]
  ------------------
 1127|  2.61k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 528, False: 4.21k]
  ------------------
 1128|  3.13k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 522, False: 4.22k]
  ------------------
 1129|  3.56k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 431, False: 4.31k]
  ------------------
 1130|  3.56k|      *nextTokPtr = ptr;
 1131|  3.56k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.56k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.74k|    }
 1133|     23|    *nextTokPtr = ptr;
 1134|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.14k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.14k, False: 97.0k]
  ------------------
 1136|  2.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.14k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.14k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.14k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.85k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.85k, False: 93.2k]
  ------------------
 1139|  5.85k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.85k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.85k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.85k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.78k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.78k, False: 97.3k]
  ------------------
 1142|  1.78k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.78k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|      0|    LEAD_CASE(2)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.1k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.1k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     58|    LEAD_CASE(4)
  ------------------
  |  | 1144|     12|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 22, False: 99.1k]
  |  |  ------------------
  |  | 1145|     22|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 10, False: 12]
  |  |  ------------------
  |  | 1146|     12|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     12|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     12|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     12|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     12|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     12|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     12|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  11.7k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 11.7k, False: 87.3k]
  ------------------
 1168|  18.1k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.39k, False: 92.7k]
  ------------------
 1169|  18.1k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  18.1k|#define XML_TOK_NAME 18
  ------------------
 1170|  18.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  18.1k|#  define MINBPC(enc) 2
  ------------------
 1171|  18.1k|    break;
 1172|     98|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 98, False: 99.0k]
  ------------------
 1173|    176|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 78, False: 99.0k]
  ------------------
 1174|    383|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 207, False: 98.9k]
  ------------------
 1175|    383|#  ifdef XML_NS
 1176|    383|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 99.1k]
  ------------------
 1177|    383|#  endif
 1178|    383|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    383|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    383|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    383|#  define MINBPC(enc) 2
  ------------------
 1180|    383|    break;
 1181|  3.25k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.25k, False: 95.8k]
  ------------------
 1182|  3.25k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  3.25k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  3.25k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.25k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.92k, False: 325]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.92k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.92k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.92k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.92k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.92k|      break;
 1186|  2.92k|    }
 1187|    325|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    325|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    325|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    325|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 203, False: 122]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    203|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    203|#  define MINBPC(enc) 2
  ------------------
 1189|    203|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    203|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    203|      break;
 1191|    203|    }
 1192|       |    /* fall through */
 1193|    162|  default:
  ------------------
  |  Branch (1193:3): [True: 40, False: 99.1k]
  ------------------
 1194|    162|    *nextTokPtr = ptr;
 1195|    162|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    162|#define XML_TOK_INVALID 0
  ------------------
 1196|  99.1k|  }
 1197|  66.2k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  66.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  66.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  66.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  43.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 43.6k, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   187k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  44.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 22.6k, False: 43.6k]
  |  |  ------------------
  |  |   82|  44.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  22.6k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  22.6k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  22.6k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 39, False: 22.5k]
  |  |  ------------------
  |  |   83|     39|      *nextTokPtr = ptr;                                                       \
  |  |   84|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     39|    }                                                                          \
  |  |   86|  44.6k|    /* fall through */                                                         \
  |  |   87|  44.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 10.4k, False: 55.8k]
  |  |  ------------------
  |  |   88|  43.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 10.3k, False: 55.9k]
  |  |  ------------------
  |  |   89|  44.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 916, False: 65.3k]
  |  |  ------------------
  |  |   90|  44.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 66.0k]
  |  |  ------------------
  |  |   91|  44.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 227, False: 66.0k]
  |  |  ------------------
  |  |   92|  44.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  44.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  44.6k|    break;                                                                     \
  |  |   94|  44.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 66.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 66.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 66.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    428|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 428, False: 65.8k]
  ------------------
 1201|  2.43k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.00k, False: 64.2k]
  ------------------
 1202|  2.98k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 552, False: 65.7k]
  ------------------
 1203|  3.84k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 860, False: 65.4k]
  ------------------
 1204|  4.77k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 930, False: 65.3k]
  ------------------
 1205|  4.78k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 6, False: 66.2k]
  ------------------
 1206|  15.1k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 10.3k, False: 55.9k]
  ------------------
 1207|  16.4k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.33k, False: 64.9k]
  ------------------
 1208|  19.9k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 3.52k, False: 62.7k]
  ------------------
 1209|  19.9k|      *nextTokPtr = ptr;
 1210|  19.9k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 66.2k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    464|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 464, False: 65.8k]
  ------------------
 1232|    464|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    464|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 463]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    463|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    463|#  define MINBPC(enc) 2
  ------------------
 1237|    463|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    463|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    583|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 583, False: 65.6k]
  ------------------
 1239|    583|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    583|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 2, False: 581]
  ------------------
 1240|      2|        *nextTokPtr = ptr;
 1241|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1242|      2|      }
 1243|    581|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    581|#  define MINBPC(enc) 2
  ------------------
 1244|    581|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    581|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    495|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 495, False: 65.7k]
  ------------------
 1246|    495|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    495|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 3, False: 492]
  ------------------
 1247|      3|        *nextTokPtr = ptr;
 1248|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1249|      3|      }
 1250|    492|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    492|#  define MINBPC(enc) 2
  ------------------
 1251|    492|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    492|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     18|    default:
  ------------------
  |  Branch (1252:5): [True: 18, False: 66.2k]
  ------------------
 1253|     18|      *nextTokPtr = ptr;
 1254|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
 1255|  66.2k|    }
 1256|  66.2k|  }
 1257|    123|  return -tok;
 1258|  21.7k|}
xmltok.c:big2_scanLit:
  984|  6.89k|                const char **nextTokPtr) {
  985|  10.1M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  10.1M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  10.1M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.1M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  81.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 81.3k, False: 10.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  10.1M|    switch (t) {
  988|  20.1k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  10.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.0k, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  10.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  10.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.0k|    break;
  |  |  ------------------
  |  |   63|  10.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 10.1M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 10.1M]
  |  |  ------------------
  |  |   65|     11|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 10.1M]
  |  |  ------------------
  |  |   66|     11|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  1.50k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 1.50k, False: 10.1M]
  ------------------
  990|  7.95k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 6.44k, False: 10.1M]
  ------------------
  991|  7.95k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.95k|#  define MINBPC(enc) 2
  ------------------
  992|  7.95k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 1.16k, False: 6.79k]
  ------------------
  993|  1.16k|        break;
  994|  6.79k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.79k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.79k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 2, False: 6.78k]
  ------------------
  995|      2|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      2|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.78k|      *nextTokPtr = ptr;
  997|  6.78k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.78k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.78k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.76k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    972|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 972, False: 5.81k]
  ------------------
  999|  2.26k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.29k, False: 5.49k]
  ------------------
 1000|  2.67k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 407, False: 6.38k]
  ------------------
 1001|  6.70k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 4.03k, False: 2.75k]
  ------------------
 1002|  6.75k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 50, False: 6.73k]
  ------------------
 1003|  6.76k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 10, False: 6.77k]
  ------------------
 1004|  6.76k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  6.76k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     23|      default:
  ------------------
  |  Branch (1005:7): [True: 23, False: 6.76k]
  ------------------
 1006|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.78k|      }
 1008|  10.1M|    default:
  ------------------
  |  Branch (1008:5): [True: 10.1M, False: 18.0k]
  ------------------
 1009|  10.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  10.1M|#  define MINBPC(enc) 2
  ------------------
 1010|  10.1M|      break;
 1011|  10.1M|    }
 1012|  10.1M|  }
 1013|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.89k|}
xmltok.c:big2_scanDecl:
  183|  7.68k|                 const char **nextTokPtr) {
  184|  7.68k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.68k|    {                                                                          \
  |  |  |  |  135|  7.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.68k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 7.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  7.68k|    }
  |  |  ------------------
  ------------------
  185|  7.68k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.68k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.68k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.66k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    451|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 451, False: 7.23k]
  ------------------
  187|    451|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    451|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    451|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.68k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    713|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 713, False: 6.97k]
  ------------------
  192|  7.20k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.49k, False: 1.19k]
  ------------------
  193|  7.20k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.20k|#  define MINBPC(enc) 2
  ------------------
  194|  7.20k|    break;
  195|     25|  default:
  ------------------
  |  Branch (195:3): [True: 25, False: 7.65k]
  ------------------
  196|     25|    *nextTokPtr = ptr;
  197|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  198|  7.68k|  }
  199|  48.7k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  48.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  48.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  48.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  48.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 48.6k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     36|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 36, False: 48.6k]
  ------------------
  202|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     36|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 35]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     36|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     35|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     35|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     35|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      6|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 31, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 6, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 34]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 34]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 34]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 34]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     35|      }
  212|       |      /* fall through */
  213|  4.78k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.75k, False: 43.9k]
  ------------------
  214|  5.97k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.19k, False: 47.5k]
  ------------------
  215|  7.13k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.15k, False: 47.5k]
  ------------------
  216|  7.13k|      *nextTokPtr = ptr;
  217|  7.13k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  7.13k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  35.8k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 35.8k, False: 12.8k]
  ------------------
  219|  41.5k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.68k, False: 43.0k]
  ------------------
  220|  41.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  41.5k|#  define MINBPC(enc) 2
  ------------------
  221|  41.5k|      break;
  222|     37|    default:
  ------------------
  |  Branch (222:5): [True: 37, False: 48.6k]
  ------------------
  223|     37|      *nextTokPtr = ptr;
  224|     37|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
  225|  48.7k|    }
  226|  48.7k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  7.20k|}
xmltok.c:big2_scanComment:
  146|    660|                    const char **nextTokPtr) {
  147|    660|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    660|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    660|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    660|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 649, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    649|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    649|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    649|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 638, False: 11]
  |  |  |  |  |  Branch (872:49): [True: 635, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     14|      *nextTokPtr = ptr;
  150|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  151|     14|    }
  152|    635|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    635|#  define MINBPC(enc) 2
  ------------------
  153|  22.4k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  22.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  22.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  22.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.15k, False: 19.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  3.69k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 22.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.82k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.79k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.82k, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 1.79k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.79k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.79k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.79k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.79k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.79k|    break;
  |  |  ------------------
  |  |   63|  1.79k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 41, False: 22.4k]
  |  |  ------------------
  |  |   64|     41|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 22.4k]
  |  |  ------------------
  |  |   65|     46|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 22.4k]
  |  |  ------------------
  |  |   66|     46|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     46|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     46|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.11k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.11k, False: 21.3k]
  ------------------
  157|  1.11k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
  158|  1.11k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.11k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.11k|    {                                                                          \
  |  |  |  |  135|  1.11k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.11k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.11k|    }
  |  |  ------------------
  ------------------
  159|  1.11k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.11k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.11k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 776, False: 341]
  |  |  |  |  |  Branch (872:49): [True: 493, False: 283]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    493|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    493|#  define MINBPC(enc) 2
  ------------------
  161|    493|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    493|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    493|    {                                                                          \
  |  |  |  |  135|    493|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    493|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    493|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 492]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    493|    }
  |  |  ------------------
  ------------------
  162|    492|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    492|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    492|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 480, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 476, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    476|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    476|#  define MINBPC(enc) 2
  ------------------
  167|    476|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    476|#define XML_TOK_COMMENT 13
  ------------------
  168|    492|        }
  169|    624|        break;
  170|  19.4k|      default:
  ------------------
  |  Branch (170:7): [True: 19.4k, False: 2.98k]
  ------------------
  171|  19.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  19.4k|#  define MINBPC(enc) 2
  ------------------
  172|  19.4k|        break;
  173|  22.4k|      }
  174|  22.4k|    }
  175|    635|  }
  176|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    660|}
xmltok.c:big2_scanPi:
  277|  6.07k|               const char **nextTokPtr) {
  278|  6.07k|  int tok;
  279|  6.07k|  const char *target = ptr;
  280|  6.07k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.07k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.07k|    {                                                                          \
  |  |  |  |  135|  6.07k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.07k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.07k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 6.06k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  6.07k|    }
  |  |  ------------------
  ------------------
  281|  6.06k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.06k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.06k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.02k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.02k, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.86k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.03k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.01k, False: 5.04k]
  |  |  ------------------
  |  |  111|  6.03k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.01k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.01k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.01k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 1.01k]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  6.03k|    /* fall through */                                                         \
  |  |  116|  6.03k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.80k, False: 2.26k]
  |  |  ------------------
  |  |  117|  6.03k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.21k, False: 4.84k]
  |  |  ------------------
  |  |  118|  6.03k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  6.03k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.03k|    break;                                                                     \
  |  |  120|  6.03k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.06k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.06k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 6.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      9|  default:
  ------------------
  |  Branch (283:3): [True: 9, False: 6.05k]
  ------------------
  284|      9|    *nextTokPtr = ptr;
  285|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  286|  6.06k|  }
  287|   373k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   373k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   373k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   373k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.1k, False: 362k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.82M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   367k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 362k, False: 11.2k]
  |  |  ------------------
  |  |   82|   367k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   362k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   362k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   362k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 362k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|   367k|    /* fall through */                                                         \
  |  |   87|   367k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.33k, False: 369k]
  |  |  ------------------
  |  |   88|   366k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.06k, False: 372k]
  |  |  ------------------
  |  |   89|   366k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 273, False: 372k]
  |  |  ------------------
  |  |   90|   367k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 388, False: 372k]
  |  |  ------------------
  |  |   91|   367k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 212, False: 373k]
  |  |  ------------------
  |  |   92|   367k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   367k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   367k|    break;                                                                     \
  |  |   94|   367k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 373k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 373k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     17|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 373k]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|     13|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.06k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.06k, False: 372k]
  ------------------
  291|  1.89k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 829, False: 372k]
  ------------------
  292|  2.54k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 655, False: 372k]
  ------------------
  293|  2.54k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.54k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.54k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.54k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.54k|#  define MINBPC(enc) 2
  ------------------
  298|  29.0k|      while (HAS_CHAR(enc, ptr, end)) {
  299|  29.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  29.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.3k, False: 16.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  2.70k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 29.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 29.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.33k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.30k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.33k, False: 27.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.33k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 36, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.30k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     36|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.30k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.30k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.30k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.30k|    break;
  |  |  ------------------
  |  |   63|  1.30k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 33, False: 29.0k]
  |  |  ------------------
  |  |   64|     33|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 29.0k]
  |  |  ------------------
  |  |   65|     38|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 29.0k]
  |  |  ------------------
  |  |   66|     38|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     38|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.41k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.41k, False: 25.6k]
  ------------------
  302|  3.41k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.41k|#  define MINBPC(enc) 2
  ------------------
  303|  3.41k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.41k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.41k|    {                                                                          \
  |  |  |  |  135|  3.41k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.41k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.41k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  3.41k|    }
  |  |  ------------------
  ------------------
  304|  3.40k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.40k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.40k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.01k, False: 390]
  |  |  |  |  |  Branch (872:49): [True: 2.35k, False: 665]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.35k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.35k|#  define MINBPC(enc) 2
  ------------------
  306|  2.35k|            return tok;
  307|  2.35k|          }
  308|  1.05k|          break;
  309|  24.3k|        default:
  ------------------
  |  Branch (309:9): [True: 24.3k, False: 4.78k]
  ------------------
  310|  24.3k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.3k|#  define MINBPC(enc) 2
  ------------------
  311|  24.3k|          break;
  312|  29.0k|        }
  313|  29.0k|      }
  314|    114|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    114|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.37k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.37k, False: 369k]
  ------------------
  316|  3.37k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  3.37k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.36k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.36k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.36k|#  define MINBPC(enc) 2
  ------------------
  321|  3.36k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.36k|    {                                                                          \
  |  |  |  |  135|  3.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 3.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|  3.36k|    }
  |  |  ------------------
  ------------------
  322|  3.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.31k, False: 15]
  |  |  |  |  |  Branch (872:49): [True: 3.29k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  3.29k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.29k|#  define MINBPC(enc) 2
  ------------------
  324|  3.29k|        return tok;
  325|  3.29k|      }
  326|       |      /* fall through */
  327|     40|    default:
  ------------------
  |  Branch (327:5): [True: 9, False: 373k]
  ------------------
  328|     40|      *nextTokPtr = ptr;
  329|     40|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
  330|   373k|    }
  331|   373k|  }
  332|     80|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.03k|}
xmltok.c:big2_checkPiTarget:
  232|  5.91k|                      int *tokPtr) {
  233|  5.91k|  int upper = 0;
  234|  5.91k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.91k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.91k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.91k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.91k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  5.91k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.48k, False: 3.43k]
  ------------------
  237|  2.48k|    return 1;
  238|  3.43k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.43k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.43k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.71k, False: 721]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.31k|  case ASCII_x:
  ------------------
  |  |   86|  1.31k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.31k, False: 2.12k]
  ------------------
  240|  1.31k|    break;
  241|    969|  case ASCII_X:
  ------------------
  |  |   59|    969|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 969, False: 2.46k]
  ------------------
  242|    969|    upper = 1;
  243|    969|    break;
  244|  1.15k|  default:
  ------------------
  |  Branch (244:3): [True: 1.15k, False: 2.28k]
  ------------------
  245|  1.15k|    return 1;
  246|  3.43k|  }
  247|  2.28k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.28k|#  define MINBPC(enc) 2
  ------------------
  248|  2.28k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.28k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.28k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.73k, False: 552]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    972|  case ASCII_m:
  ------------------
  |  |   75|    972|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 972, False: 1.31k]
  ------------------
  250|    972|    break;
  251|    652|  case ASCII_M:
  ------------------
  |  |   48|    652|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 652, False: 1.63k]
  ------------------
  252|    652|    upper = 1;
  253|    652|    break;
  254|    660|  default:
  ------------------
  |  Branch (254:3): [True: 660, False: 1.62k]
  ------------------
  255|    660|    return 1;
  256|  2.28k|  }
  257|  1.62k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.62k|#  define MINBPC(enc) 2
  ------------------
  258|  1.62k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.62k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.62k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 779, False: 845]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     33|  case ASCII_l:
  ------------------
  |  |   74|     33|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 33, False: 1.59k]
  ------------------
  260|     33|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.62k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.58k|  default:
  ------------------
  |  Branch (264:3): [True: 1.58k, False: 35]
  ------------------
  265|  1.58k|    return 1;
  266|  1.62k|  }
  267|     35|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 32]
  ------------------
  268|      3|    return 0;
  269|     32|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     32|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     32|  return 1;
  271|     35|}
xmltok.c:big2_scanPercent:
  924|  2.29k|                    const char **nextTokPtr) {
  925|  2.29k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.29k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.29k|    {                                                                          \
  |  |  |  |  135|  2.29k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.29k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.29k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.29k|    }
  |  |  ------------------
  ------------------
  926|  2.25k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.25k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.25k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.76k, False: 484]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.35k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.48k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 471, False: 1.78k]
  |  |  ------------------
  |  |  111|  1.48k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    471|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    471|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    471|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 458]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  1.48k|    /* fall through */                                                         \
  |  |  116|  1.48k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 412, False: 1.84k]
  |  |  ------------------
  |  |  117|  1.48k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 612, False: 1.64k]
  |  |  ------------------
  |  |  118|  1.48k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.48k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.48k|    break;                                                                     \
  |  |  120|  1.48k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      8|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 2.24k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    463|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 463, False: 1.79k]
  ------------------
  929|    665|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 202, False: 2.05k]
  ------------------
  930|    739|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 74, False: 2.17k]
  ------------------
  931|    742|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.25k]
  ------------------
  932|    742|    *nextTokPtr = ptr;
  933|    742|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    742|#define XML_TOK_PERCENT 22
  ------------------
  934|      8|  default:
  ------------------
  |  Branch (934:3): [True: 8, False: 2.24k]
  ------------------
  935|      8|    *nextTokPtr = ptr;
  936|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  937|  2.25k|  }
  938|  4.51k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.51k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.51k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.51k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.70k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.70k, False: 805]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  10.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.10k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 775, False: 3.73k]
  |  |  ------------------
  |  |   82|  3.10k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    775|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    775|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    775|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 754]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  3.10k|    /* fall through */                                                         \
  |  |   87|  3.10k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.08k, False: 3.42k]
  |  |  ------------------
  |  |   88|  2.47k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 635, False: 3.87k]
  |  |  ------------------
  |  |   89|  2.68k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 207, False: 4.30k]
  |  |  ------------------
  |  |   90|  2.87k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 4.31k]
  |  |  ------------------
  |  |   91|  3.10k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 227, False: 4.28k]
  |  |  ------------------
  |  |   92|  3.10k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.10k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.10k|    break;                                                                     \
  |  |   94|  3.10k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 4.49k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.35k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.35k, False: 3.16k]
  ------------------
  942|  1.35k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.35k|#  define MINBPC(enc) 2
  ------------------
  943|  1.35k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.35k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     18|    default:
  ------------------
  |  Branch (944:5): [True: 18, False: 4.49k]
  ------------------
  945|     18|      *nextTokPtr = ptr;
  946|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  947|  4.51k|    }
  948|  4.51k|  }
  949|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.48k|}
xmltok.c:big2_scanPoundName:
  954|  1.78k|                      const char **nextTokPtr) {
  955|  1.78k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.78k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.78k|    {                                                                          \
  |  |  |  |  135|  1.78k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.78k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.78k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.78k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.78k|    }
  |  |  ------------------
  ------------------
  956|  1.78k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.78k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.78k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.67k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.67k, False: 108]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.58k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.73k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 75, False: 1.70k]
  |  |  ------------------
  |  |  111|  1.73k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     75|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     75|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     75|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 60]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  1.73k|    /* fall through */                                                         \
  |  |  116|  1.73k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.39k, False: 386]
  |  |  ------------------
  |  |  117|  1.73k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 278, False: 1.50k]
  |  |  ------------------
  |  |  118|  1.73k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.73k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.73k|    break;                                                                     \
  |  |  120|  1.73k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.78k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.78k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     28|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 28, False: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  100|     28|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     24|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     48|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     24|    }                                                                          \
  |  |  |  |  106|     24|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 1.77k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  1.78k|  }
  962|  13.5k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  13.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  13.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.5k, False: 1.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  40.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  11.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.02k, False: 12.5k]
  |  |  ------------------
  |  |   82|  11.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.02k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.02k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.02k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 12, False: 1.01k]
  |  |  ------------------
  |  |   83|     12|      *nextTokPtr = ptr;                                                       \
  |  |   84|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     12|    }                                                                          \
  |  |   86|  11.8k|    /* fall through */                                                         \
  |  |   87|  11.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.07k, False: 8.47k]
  |  |  ------------------
  |  |   88|  10.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.53k, False: 9.02k]
  |  |  ------------------
  |  |   89|  11.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 674, False: 12.8k]
  |  |  ------------------
  |  |   90|  11.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 13.3k]
  |  |  ------------------
  |  |   91|  11.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 383, False: 13.1k]
  |  |  ------------------
  |  |   92|  11.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  11.8k|    break;                                                                     \
  |  |   94|  11.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    255|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 255, False: 13.2k]
  ------------------
  966|    327|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 72, False: 13.4k]
  ------------------
  967|  1.11k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 788, False: 12.7k]
  ------------------
  968|  1.38k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 271, False: 13.2k]
  ------------------
  969|  1.45k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 66, False: 13.4k]
  ------------------
  970|  1.45k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 13.5k]
  ------------------
  971|  1.64k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 194, False: 13.3k]
  ------------------
  972|  1.64k|      *nextTokPtr = ptr;
  973|  1.64k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.64k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      9|    default:
  ------------------
  |  Branch (974:5): [True: 9, False: 13.5k]
  ------------------
  975|      9|      *nextTokPtr = ptr;
  976|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  977|  13.5k|    }
  978|  13.5k|  }
  979|     57|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     57|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.73k|}
xmltok.c:big2_contentTok:
  824|  72.5k|                   const char **nextTokPtr) {
  825|  72.5k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.02k, False: 71.5k]
  ------------------
  826|  1.02k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.02k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  71.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  71.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  71.5k|    size_t n = end - ptr;
  829|  71.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  71.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 22.4k, False: 49.1k]
  ------------------
  830|  22.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  22.4k|#  define MINBPC(enc) 2
  ------------------
  831|  22.4k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 112, False: 22.3k]
  ------------------
  832|    112|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    112|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  22.3k|      end = ptr + n;
  834|  22.3k|    }
  835|  71.5k|  }
  836|  71.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  71.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  71.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  63.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 63.6k, False: 7.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  17.1k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 17.1k, False: 54.2k]
  ------------------
  838|  17.1k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  17.1k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  17.1k|#  define MINBPC(enc) 2
  ------------------
  839|  16.0k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 16.0k, False: 55.4k]
  ------------------
  840|  16.0k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  16.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  16.0k|#  define MINBPC(enc) 2
  ------------------
  841|  11.0k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 11.0k, False: 60.4k]
  ------------------
  842|  11.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.0k|#  define MINBPC(enc) 2
  ------------------
  843|  11.0k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  11.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  11.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 15, False: 10.9k]
  ------------------
  844|     15|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     15|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  10.9k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  10.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.70k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.70k, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 543, False: 10.4k]
  ------------------
  846|    543|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    543|#  define MINBPC(enc) 2
  ------------------
  847|  10.9k|    *nextTokPtr = ptr;
  848|  10.9k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  4.18k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 4.18k, False: 67.2k]
  ------------------
  850|  4.18k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.18k|#  define MINBPC(enc) 2
  ------------------
  851|  4.18k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.18k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  5.23k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 5.23k, False: 66.2k]
  ------------------
  853|  5.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.23k|#  define MINBPC(enc) 2
  ------------------
  854|  5.23k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.23k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.23k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 5.23k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  5.23k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  5.23k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.23k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.77k, False: 1.45k]
  |  |  |  |  |  Branch (872:49): [True: 1.85k, False: 1.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  3.38k|      break;
  858|  1.85k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.85k|#  define MINBPC(enc) 2
  ------------------
  859|  1.85k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.85k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  1.85k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 3, False: 1.84k]
  ------------------
  860|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.84k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.84k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.84k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.57k, False: 274]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.84k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  1.84k|#  define MINBPC(enc) 2
  ------------------
  863|  1.84k|      break;
  864|  1.84k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  4.43k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 71.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 71.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.17k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.12k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.17k, False: 69.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.17k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 49, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.12k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     49|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.12k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.12k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.12k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.12k|    break;
  |  |  ------------------
  |  |   63|  2.12k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 67, False: 71.3k]
  |  |  ------------------
  |  |   64|     67|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 71.4k]
  |  |  ------------------
  |  |   65|     74|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 71.4k]
  |  |  ------------------
  |  |   66|     74|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     74|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     74|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  15.5k|  default:
  ------------------
  |  Branch (868:3): [True: 15.5k, False: 55.8k]
  ------------------
  869|  15.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.5k|#  define MINBPC(enc) 2
  ------------------
  870|  15.5k|    break;
  871|  71.4k|  }
  872|   647k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   647k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   647k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   647k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  72.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 72.6k, False: 574k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|      0|      LEAD_CASE(2)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 647k]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  883|      0|      LEAD_CASE(3)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 647k]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  884|  29.3k|      LEAD_CASE(4)
  ------------------
  |  |  875|  29.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 29.3k, False: 618k]
  |  |  ------------------
  |  |  876|  29.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  29.3k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 45, False: 29.3k]
  |  |  ------------------
  |  |  877|     45|      *nextTokPtr = ptr;                                                       \
  |  |  878|     45|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     45|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     45|    }                                                                          \
  |  |  880|  29.3k|    ptr += n;                                                                  \
  |  |  881|  29.3k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  11.2k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 11.2k, False: 636k]
  ------------------
  887|  11.2k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  11.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  11.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 11.2k, False: 2]
  |  |  ------------------
  ------------------
  888|  11.2k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  11.2k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  11.2k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 9.20k, False: 2.04k]
  |  |  |  |  |  Branch (872:49): [True: 3.66k, False: 5.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  7.57k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.57k|#  define MINBPC(enc) 2
  ------------------
  890|  7.57k|          break;
  891|  7.57k|        }
  892|  3.66k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  3.66k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.66k, False: 2]
  |  |  ------------------
  ------------------
  893|  3.66k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  3.66k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.66k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.32k, False: 1.34k]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 2.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.66k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.66k|#  define MINBPC(enc) 2
  ------------------
  895|  3.66k|            break;
  896|  3.66k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  3.66k|        }
  900|  3.66k|      }
  901|       |      /* fall through */
  902|  5.71k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.71k, False: 641k]
  ------------------
  903|  10.0k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 4.37k, False: 643k]
  ------------------
  904|  10.1k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 50, False: 647k]
  ------------------
  905|  10.1k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 647k]
  ------------------
  906|  10.1k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 4, False: 647k]
  ------------------
  907|  19.2k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 9.07k, False: 638k]
  ------------------
  908|  22.5k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 3.31k, False: 644k]
  ------------------
  909|  22.5k|      *nextTokPtr = ptr;
  910|  22.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   584k|    default:
  ------------------
  |  Branch (911:5): [True: 584k, False: 63.1k]
  ------------------
  912|   584k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   584k|#  define MINBPC(enc) 2
  ------------------
  913|   584k|      break;
  914|   647k|    }
  915|   647k|  }
  916|    358|  *nextTokPtr = ptr;
  917|    358|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    358|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  22.9k|}
xmltok.c:big2_scanLt:
  726|  17.1k|               const char **nextTokPtr) {
  727|  17.1k|#  ifdef XML_NS
  728|  17.1k|  int hadColon;
  729|  17.1k|#  endif
  730|  17.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.1k|    {                                                                          \
  |  |  |  |  135|  17.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  17.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 25, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     25|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     25|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     25|      }                                                                        \
  |  |  |  |  138|  17.1k|    }
  |  |  ------------------
  ------------------
  731|  17.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.7k, False: 4.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  12.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 4.34k, False: 12.7k]
  |  |  ------------------
  |  |  111|  11.5k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  4.34k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  4.34k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.34k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 4.32k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  11.5k|    /* fall through */                                                         \
  |  |  116|  11.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.17k, False: 12.9k]
  |  |  ------------------
  |  |  117|  11.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.01k, False: 14.1k]
  |  |  ------------------
  |  |  118|  11.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.5k|    break;                                                                     \
  |  |  120|  11.5k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 17.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    791|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 791, False: 16.3k]
  ------------------
  734|    791|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    791|#  define MINBPC(enc) 2
  ------------------
  735|    791|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    791|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    791|    {                                                                          \
  |  |  |  |  135|    791|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    791|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    791|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 790]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    791|    }
  |  |  ------------------
  ------------------
  736|    790|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    790|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    790|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    778|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 18, False: 772]
  |  |  |  |  |  Branch (870:4): [True: 778, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    209|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 209, False: 581]
  ------------------
  738|    209|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    209|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    209|#  define MINBPC(enc) 2
  ------------------
  739|    563|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 563, False: 227]
  ------------------
  740|    563|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    563|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    563|#  define MINBPC(enc) 2
  ------------------
  741|    790|    }
  742|     18|    *nextTokPtr = ptr;
  743|     18|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  744|  3.03k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.03k, False: 14.0k]
  ------------------
  745|  3.03k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.03k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.03k|#  define MINBPC(enc) 2
  ------------------
  746|  1.74k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.74k, False: 15.3k]
  ------------------
  747|  1.74k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.74k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.74k|#  define MINBPC(enc) 2
  ------------------
  748|      7|  default:
  ------------------
  |  Branch (748:3): [True: 7, False: 17.1k]
  ------------------
  749|      7|    *nextTokPtr = ptr;
  750|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  751|  17.1k|  }
  752|  11.5k|#  ifdef XML_NS
  753|  11.5k|  hadColon = 0;
  754|  11.5k|#  endif
  755|       |  /* we have a start-tag */
  756|   977k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   977k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   977k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   977k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.7k, False: 961k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  4.82M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   965k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 961k, False: 15.8k]
  |  |  ------------------
  |  |   82|   965k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   961k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   961k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   961k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 961k]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|   965k|    /* fall through */                                                         \
  |  |   87|   965k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.65k, False: 975k]
  |  |  ------------------
  |  |   88|   965k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.80k, False: 975k]
  |  |  ------------------
  |  |   89|   965k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 213, False: 977k]
  |  |  ------------------
  |  |   90|   965k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 420, False: 976k]
  |  |  ------------------
  |  |   91|   965k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 297, False: 977k]
  |  |  ------------------
  |  |   92|   965k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   965k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   965k|    break;                                                                     \
  |  |   94|   965k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 977k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 977k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 977k]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 977k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  2.28k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.28k, False: 975k]
  ------------------
  777|  3.07k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 785, False: 976k]
  ------------------
  778|  4.91k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.84k, False: 975k]
  ------------------
  779|  4.91k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.91k|#  define MINBPC(enc) 2
  ------------------
  780|  7.09k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  7.09k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.09k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.09k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.79k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.79k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.78k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.07k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.27k, False: 5.81k]
  |  |  ------------------
  |  |  111|  3.07k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.27k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.27k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.27k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 1.25k]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  3.07k|    /* fall through */                                                         \
  |  |  116|  3.07k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.23k, False: 5.86k]
  |  |  ------------------
  |  |  117|  3.07k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 588, False: 6.50k]
  |  |  ------------------
  |  |  118|  3.07k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.07k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.07k|    break;                                                                     \
  |  |  120|  3.07k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 7.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 7.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 7.07k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.47k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.47k, False: 5.61k]
  ------------------
  784|  1.47k|          goto gt;
  785|    280|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 280, False: 6.81k]
  ------------------
  786|    280|          goto sol;
  787|    484|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 484, False: 6.60k]
  ------------------
  788|  1.63k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 1.15k, False: 5.93k]
  ------------------
  789|  2.21k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 582, False: 6.50k]
  ------------------
  790|  2.21k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.21k|#  define MINBPC(enc) 2
  ------------------
  791|  2.21k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 7.08k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  7.09k|        }
  796|  3.07k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.07k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  7.09k|      }
  798|     41|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.91k|    }
  800|  6.14k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 6.14k, False: 971k]
  ------------------
  801|  7.61k|    gt:
  802|  7.61k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.61k|#  define MINBPC(enc) 2
  ------------------
  803|  7.61k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  7.61k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    335|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 335, False: 977k]
  ------------------
  805|    615|    sol:
  806|    615|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    615|#  define MINBPC(enc) 2
  ------------------
  807|    615|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    615|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    615|    {                                                                          \
  |  |  |  |  135|    615|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    615|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    615|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 604]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    615|    }
  |  |  ------------------
  ------------------
  808|    604|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    604|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    604|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 594, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 579, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     25|        *nextTokPtr = ptr;
  810|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  811|     25|      }
  812|    579|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    579|#  define MINBPC(enc) 2
  ------------------
  813|    579|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    579|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     26|    default:
  ------------------
  |  Branch (814:5): [True: 26, False: 977k]
  ------------------
  815|     26|      *nextTokPtr = ptr;
  816|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  817|   977k|    }
  818|   977k|  }
  819|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.5k|}
xmltok.c:big2_scanCdataSection:
  337|    563|                         const char **nextTokPtr) {
  338|    563|  static const char CDATA_LSQB[]
  339|    563|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    563|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    563|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    563|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    563|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    563|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    563|#define ASCII_LSQB 0x5B
  ------------------
  340|    563|  int i;
  341|    563|  UNUSED_P(enc);
  ------------------
  |  |  135|    563|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    563|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    563|    {                                                                          \
  |  |  135|    563|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    563|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    563|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 560]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    563|    }
  ------------------
  344|  3.87k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.31k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.32k, False: 547]
  ------------------
  345|  3.32k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.31k, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 3.31k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     13|      *nextTokPtr = ptr;
  347|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  348|     13|    }
  349|  3.32k|  }
  350|    547|  *nextTokPtr = ptr;
  351|    547|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    547|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    560|}
xmltok.c:big2_scanEndTag:
  432|  1.74k|                   const char **nextTokPtr) {
  433|  1.74k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.74k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.74k|    {                                                                          \
  |  |  |  |  135|  1.74k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.74k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.74k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.74k|    }
  |  |  ------------------
  ------------------
  434|  1.74k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.74k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.74k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.38k, False: 352]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.60k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.71k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 328, False: 1.41k]
  |  |  ------------------
  |  |  111|  1.71k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    328|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    328|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    328|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 327]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.71k|    /* fall through */                                                         \
  |  |  116|  1.71k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 920, False: 820]
  |  |  ------------------
  |  |  117|  1.71k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 468, False: 1.27k]
  |  |  ------------------
  |  |  118|  1.71k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.71k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.71k|    break;                                                                     \
  |  |  120|  1.71k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 1.72k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.73k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.74k|  }
  440|  3.34k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.34k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.34k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.34k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.71k, False: 632]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.36k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.69k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 605, False: 2.73k]
  |  |  ------------------
  |  |   82|  1.69k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    605|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    605|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    605|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 587]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  1.69k|    /* fall through */                                                         \
  |  |   87|  1.69k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 255, False: 3.08k]
  |  |  ------------------
  |  |   88|  1.07k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 228, False: 3.11k]
  |  |  ------------------
  |  |   89|  1.30k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 237, False: 3.10k]
  |  |  ------------------
  |  |   90|  1.50k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 3.15k]
  |  |  ------------------
  |  |   91|  1.69k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 3.15k]
  |  |  ------------------
  |  |   92|  1.69k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.69k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.69k|    break;                                                                     \
  |  |   94|  1.69k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.34k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.34k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 3.32k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    349|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 349, False: 2.99k]
  ------------------
  444|    568|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 219, False: 3.12k]
  ------------------
  445|    888|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 320, False: 3.02k]
  ------------------
  446|  1.69k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    888|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    843|#  define MINBPC(enc) 2
  ------------------
  447|  1.69k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.69k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.69k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.66k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    330|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 330, False: 1.36k]
  ------------------
  449|    557|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 227, False: 1.47k]
  ------------------
  450|    843|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 286, False: 1.41k]
  ------------------
  451|    843|          break;
  452|    813|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 813, False: 884]
  ------------------
  453|    813|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    813|#  define MINBPC(enc) 2
  ------------------
  454|    813|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    813|#define XML_TOK_END_TAG 5
  ------------------
  455|     41|        default:
  ------------------
  |  Branch (455:9): [True: 41, False: 1.65k]
  ------------------
  456|     41|          *nextTokPtr = ptr;
  457|     41|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
  458|  1.69k|        }
  459|  1.69k|      }
  460|     34|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 3.34k]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|    711|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 711, False: 2.63k]
  ------------------
  469|    711|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    711|#  define MINBPC(enc) 2
  ------------------
  470|    711|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    711|#define XML_TOK_END_TAG 5
  ------------------
  471|     11|    default:
  ------------------
  |  Branch (471:5): [True: 11, False: 3.33k]
  ------------------
  472|     11|      *nextTokPtr = ptr;
  473|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  474|  3.34k|    }
  475|  3.34k|  }
  476|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.71k|}
xmltok.c:big2_scanAtts:
  573|  3.07k|                 const char **nextTokPtr) {
  574|  3.07k|#  ifdef XML_NS
  575|  3.07k|  int hadColon = 0;
  576|  3.07k|#  endif
  577|   151k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   151k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   151k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   151k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   150k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 150k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  63.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.26k, False: 150k]
  |  |  ------------------
  |  |   82|  16.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.26k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.26k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.26k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 1.24k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  16.4k|    /* fall through */                                                         \
  |  |   87|  16.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.4k, False: 139k]
  |  |  ------------------
  |  |   88|  15.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.04k, False: 149k]
  |  |  ------------------
  |  |   89|  16.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 226, False: 151k]
  |  |  ------------------
  |  |   90|  16.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 151k]
  |  |  ------------------
  |  |   91|  16.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 203, False: 151k]
  |  |  ------------------
  |  |   92|  16.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  16.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.4k|    break;                                                                     \
  |  |   94|  16.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 151k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 151k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     25|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 151k]
  |  |  |  |  ------------------
  |  |  |  |   71|     25|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|     21|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 151k]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|    449|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 449, False: 151k]
  ------------------
  598|    751|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 302, False: 151k]
  ------------------
  599|    976|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 225, False: 151k]
  ------------------
  600|  2.01k|      for (;;) {
  601|  2.01k|        int t;
  602|       |
  603|  2.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.01k|#  define MINBPC(enc) 2
  ------------------
  604|  2.01k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.01k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.01k|    {                                                                          \
  |  |  |  |  135|  2.01k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.01k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 1.97k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|  2.01k|    }
  |  |  ------------------
  ------------------
  605|  1.97k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  1.97k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.97k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.94k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.97k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 902, False: 1.06k]
  ------------------
  607|    902|          break;
  608|  1.06k|        switch (t) {
  609|    555|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 555, False: 514]
  ------------------
  610|    838|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 283, False: 786]
  ------------------
  611|  1.03k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 201, False: 868]
  ------------------
  612|  1.03k|          break;
  613|     30|        default:
  ------------------
  |  Branch (613:9): [True: 30, False: 1.03k]
  ------------------
  614|     30|          *nextTokPtr = ptr;
  615|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  616|  1.06k|        }
  617|  1.06k|      }
  618|       |      /* fall through */
  619|   135k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 134k, False: 17.4k]
  ------------------
  620|   135k|      int open;
  621|   135k|#  ifdef XML_NS
  622|   135k|      hadColon = 0;
  623|   135k|#  endif
  624|   136k|      for (;;) {
  625|   136k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   136k|#  define MINBPC(enc) 2
  ------------------
  626|   136k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   136k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   136k|    {                                                                          \
  |  |  |  |  135|   136k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   136k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   136k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 136k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|   136k|    }
  |  |  ------------------
  ------------------
  627|   136k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   136k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   136k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   136k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 136k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   136k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 39.5k, False: 96.6k]
  |  Branch (628:32): [True: 95.5k, False: 1.10k]
  ------------------
  629|   135k|          break;
  630|  1.10k|        switch (open) {
  631|    325|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 325, False: 781]
  ------------------
  632|    553|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 228, False: 878]
  ------------------
  633|  1.07k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 520, False: 586]
  ------------------
  634|  1.07k|          break;
  635|     33|        default:
  ------------------
  |  Branch (635:9): [True: 33, False: 1.07k]
  ------------------
  636|     33|          *nextTokPtr = ptr;
  637|     33|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  638|  1.10k|        }
  639|  1.10k|      }
  640|   135k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   135k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  5.58M|      for (;;) {
  643|  5.58M|        int t;
  644|  5.58M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.58M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.58M|    {                                                                          \
  |  |  |  |  135|  5.58M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.58M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.58M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 74, False: 5.58M]
  |  |  |  |  ------------------
  |  |  |  |  136|     74|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     74|      }                                                                        \
  |  |  |  |  138|  5.58M|    }
  |  |  ------------------
  ------------------
  645|  5.58M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  5.58M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.58M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   671k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 671k, False: 4.90M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  5.58M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 134k, False: 5.44M]
  ------------------
  647|   134k|          break;
  648|  5.44M|        switch (t) {
  649|  76.5k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.44M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.44M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  38.2k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  38.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 38.2k, False: 5.40M]
  |  |  |  |  ------------------
  |  |  |  |   50|  38.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 26, False: 38.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  38.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     26|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  38.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  38.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  38.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  38.2k|    break;
  |  |  ------------------
  |  |   63|  38.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 5.44M]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 5.44M]
  |  |  ------------------
  |  |   65|     33|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 5.44M]
  |  |  ------------------
  |  |   66|     33|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     33|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  46.0k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 46.0k, False: 5.39M]
  ------------------
  651|  46.0k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  46.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  46.0k|#  define MINBPC(enc) 2
  ------------------
  652|  46.0k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 46.0k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 5, False: 6]
  ------------------
  654|      5|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  46.0k|          break;
  658|  46.0k|        }
  659|  46.0k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 4, False: 5.44M]
  ------------------
  660|      4|          *nextTokPtr = ptr;
  661|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  662|  5.36M|        default:
  ------------------
  |  Branch (662:9): [True: 5.36M, False: 84.3k]
  ------------------
  663|  5.36M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.36M|#  define MINBPC(enc) 2
  ------------------
  664|  5.36M|          break;
  665|  5.44M|        }
  666|  5.44M|      }
  667|   134k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   134k|#  define MINBPC(enc) 2
  ------------------
  668|   134k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   134k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   134k|    {                                                                          \
  |  |  |  |  135|   134k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   134k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   134k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 134k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|   134k|    }
  |  |  ------------------
  ------------------
  669|   134k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   134k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   134k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   134k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 134k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   128k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 128k, False: 6.10k]
  ------------------
  671|   131k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.81k, False: 132k]
  ------------------
  672|   132k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.28k, False: 133k]
  ------------------
  673|   132k|        break;
  674|    231|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 231, False: 134k]
  ------------------
  675|    231|        goto sol;
  676|  1.75k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.75k, False: 133k]
  ------------------
  677|  1.75k|        goto gt;
  678|     30|      default:
  ------------------
  |  Branch (678:7): [True: 30, False: 134k]
  ------------------
  679|     30|        *nextTokPtr = ptr;
  680|     30|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  681|   134k|      }
  682|       |      /* ptr points to closing quote */
  683|   143k|      for (;;) {
  684|   143k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   143k|#  define MINBPC(enc) 2
  ------------------
  685|   143k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   143k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   143k|    {                                                                          \
  |  |  |  |  135|   143k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   143k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   143k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 143k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   143k|    }
  |  |  ------------------
  ------------------
  686|   143k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   143k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   143k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   141k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 141k, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|  66.7k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   132k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.46k, False: 141k]
  |  |  ------------------
  |  |  111|   132k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.46k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.46k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.46k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 8, False: 2.45k]
  |  |  ------------------
  |  |  112|      8|      *nextTokPtr = ptr;                                                       \
  |  |  113|      8|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      8|    }                                                                          \
  |  |  115|   132k|    /* fall through */                                                         \
  |  |  116|   132k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 61.7k, False: 81.7k]
  |  |  ------------------
  |  |  117|   132k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 68.0k, False: 75.4k]
  |  |  ------------------
  |  |  118|   132k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   132k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   132k|    break;                                                                     \
  |  |  120|   132k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 143k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 143k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 143k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  10.0k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 10.0k, False: 133k]
  ------------------
  689|  10.3k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 286, False: 143k]
  ------------------
  690|  10.6k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 325, False: 143k]
  ------------------
  691|  10.6k|          continue;
  692|    215|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 215, False: 143k]
  ------------------
  693|  1.96k|        gt:
  694|  1.96k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.96k|#  define MINBPC(enc) 2
  ------------------
  695|  1.96k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.96k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    338|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 338, False: 143k]
  ------------------
  697|    569|        sol:
  698|    569|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    569|#  define MINBPC(enc) 2
  ------------------
  699|    569|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    569|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    569|    {                                                                          \
  |  |  |  |  135|    569|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    569|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    569|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 562]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|    569|    }
  |  |  ------------------
  ------------------
  700|    562|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    562|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    562|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 556, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 548, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     14|            *nextTokPtr = ptr;
  702|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  703|     14|          }
  704|    548|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    548|#  define MINBPC(enc) 2
  ------------------
  705|    548|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    548|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      9|        default:
  ------------------
  |  Branch (706:9): [True: 9, False: 143k]
  ------------------
  707|      9|          *nextTokPtr = ptr;
  708|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  709|   143k|        }
  710|   132k|        break;
  711|   143k|      }
  712|   132k|      break;
  713|   132k|    }
  714|   132k|    default:
  ------------------
  |  Branch (714:5): [True: 9, False: 151k]
  ------------------
  715|      9|      *nextTokPtr = ptr;
  716|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  717|   151k|    }
  718|   151k|  }
  719|     85|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     85|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.07k|}
xmltok.c:big2_scanRef:
  545|   113k|                const char **nextTokPtr) {
  546|   113k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   113k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   113k|    {                                                                          \
  |  |  |  |  135|   113k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   113k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   113k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 113k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|   113k|    }
  |  |  ------------------
  ------------------
  547|   113k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   113k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   113k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   111k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 111k, False: 1.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  7.42k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   108k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.78k, False: 111k]
  |  |  ------------------
  |  |  111|   108k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.78k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.78k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.78k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 1.78k]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|   108k|    /* fall through */                                                         \
  |  |  116|   108k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.84k, False: 109k]
  |  |  ------------------
  |  |  117|   108k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 102k, False: 10.8k]
  |  |  ------------------
  |  |  118|   108k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   108k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   108k|    break;                                                                     \
  |  |  120|   108k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 113k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 113k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      8|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 113k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  5.22k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 5.22k, False: 108k]
  ------------------
  550|  5.22k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.22k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.22k|#  define MINBPC(enc) 2
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 113k]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|   113k|  }
  555|   149k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   149k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   149k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   149k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   133k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 133k, False: 15.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   176k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  41.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 15.6k, False: 133k]
  |  |  ------------------
  |  |   82|  41.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  15.6k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  15.6k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  15.6k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 26, False: 15.6k]
  |  |  ------------------
  |  |   83|     26|      *nextTokPtr = ptr;                                                       \
  |  |   84|     26|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     26|    }                                                                          \
  |  |   86|  41.3k|    /* fall through */                                                         \
  |  |   87|  41.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 23.2k, False: 126k]
  |  |  ------------------
  |  |   88|  40.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.29k, False: 148k]
  |  |  ------------------
  |  |   89|  40.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 276, False: 149k]
  |  |  ------------------
  |  |   90|  41.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 621, False: 148k]
  |  |  ------------------
  |  |   91|  41.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 202, False: 149k]
  |  |  ------------------
  |  |   92|  41.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  41.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  41.3k|    break;                                                                     \
  |  |   94|  41.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   108k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 108k, False: 41.3k]
  ------------------
  559|   108k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   108k|#  define MINBPC(enc) 2
  ------------------
  560|   108k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   108k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     18|    default:
  ------------------
  |  Branch (561:5): [True: 18, False: 149k]
  ------------------
  562|     18|      *nextTokPtr = ptr;
  563|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  564|   149k|    }
  565|   149k|  }
  566|     59|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     59|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   108k|}
xmltok.c:big2_scanCharRef:
  514|  5.22k|                    const char **nextTokPtr) {
  515|  5.22k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.22k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.22k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.22k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.22k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  5.22k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  5.22k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.22k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.21k, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 4.17k, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.17k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.17k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.17k|#  define MINBPC(enc) 2
  ------------------
  518|  1.04k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.04k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.04k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.04k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.04k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.02k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.02k, False: 25]
  ------------------
  520|  1.02k|      break;
  521|     25|    default:
  ------------------
  |  Branch (521:5): [True: 25, False: 1.02k]
  ------------------
  522|     25|      *nextTokPtr = ptr;
  523|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  524|  1.04k|    }
  525|  2.87k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.85k|#  define MINBPC(enc) 2
  ------------------
  526|  2.87k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.87k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.87k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.85k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.85k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.85k, False: 1.01k]
  ------------------
  528|  1.85k|        break;
  529|    989|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 989, False: 1.88k]
  ------------------
  530|    989|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    989|#  define MINBPC(enc) 2
  ------------------
  531|    989|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|    989|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     26|      default:
  ------------------
  |  Branch (532:7): [True: 26, False: 2.84k]
  ------------------
  533|     26|        *nextTokPtr = ptr;
  534|     26|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  535|  2.87k|      }
  536|  2.87k|    }
  537|  1.02k|  }
  538|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  5.22k|}
xmltok.c:big2_scanHexCharRef:
  483|  4.17k|                       const char **nextTokPtr) {
  484|  4.17k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.17k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.17k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.16k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.16k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.16k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.16k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  1.63k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.63k, False: 2.53k]
  ------------------
  487|  4.15k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.52k, False: 1.64k]
  ------------------
  488|  4.15k|      break;
  489|     16|    default:
  ------------------
  |  Branch (489:5): [True: 16, False: 4.15k]
  ------------------
  490|     16|      *nextTokPtr = ptr;
  491|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  492|  4.16k|    }
  493|  12.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.15k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.57k|#  define MINBPC(enc) 2
  ------------------
  494|  12.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.6k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  3.41k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 3.41k, False: 9.30k]
  ------------------
  496|  8.57k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.16k, False: 7.55k]
  ------------------
  497|  8.57k|        break;
  498|  4.09k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.09k, False: 8.61k]
  ------------------
  499|  4.09k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.09k|#  define MINBPC(enc) 2
  ------------------
  500|  4.09k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.09k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     42|      default:
  ------------------
  |  Branch (501:7): [True: 42, False: 12.6k]
  ------------------
  502|     42|        *nextTokPtr = ptr;
  503|     42|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
  504|  12.7k|      }
  505|  12.7k|    }
  506|  4.15k|  }
  507|     18|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.17k|}
xmltok.c:big2_cdataSectionTok:
  356|  18.0k|                        const char **nextTokPtr) {
  357|  18.0k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 139, False: 17.9k]
  ------------------
  358|    139|    return XML_TOK_NONE;
  ------------------
  |  |   51|    139|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  17.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  17.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  17.9k|    size_t n = end - ptr;
  361|  17.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  17.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 4.20k, False: 13.7k]
  ------------------
  362|  4.20k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  4.20k|#  define MINBPC(enc) 2
  ------------------
  363|  4.20k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 21, False: 4.18k]
  ------------------
  364|     21|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  4.18k|      end = ptr + n;
  366|  4.18k|    }
  367|  17.9k|  }
  368|  17.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.0k, False: 3.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  3.96k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 3.96k, False: 13.9k]
  ------------------
  370|  3.96k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.96k|#  define MINBPC(enc) 2
  ------------------
  371|  3.96k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.96k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.96k|    {                                                                          \
  |  |  |  |  135|  3.96k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.96k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.96k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 3.96k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  3.96k|    }
  |  |  ------------------
  ------------------
  372|  3.96k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  3.96k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.96k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.66k, False: 1.29k]
  |  |  |  |  |  Branch (872:49): [True: 1.52k, False: 1.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.43k|      break;
  374|  1.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.52k|#  define MINBPC(enc) 2
  ------------------
  375|  1.52k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.52k|    {                                                                          \
  |  |  |  |  135|  1.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 1.52k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  1.52k|    }
  |  |  ------------------
  ------------------
  376|  1.52k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.52k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.52k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.02k, False: 498]
  |  |  |  |  |  Branch (872:49): [True: 245, False: 781]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.27k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  1.27k|#  define MINBPC(enc) 2
  ------------------
  378|  1.27k|      break;
  379|  1.27k|    }
  380|    245|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    245|#  define MINBPC(enc) 2
  ------------------
  381|    245|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    245|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  7.72k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 7.72k, False: 10.1k]
  ------------------
  383|  7.72k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.72k|#  define MINBPC(enc) 2
  ------------------
  384|  7.72k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.72k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.72k|    {                                                                          \
  |  |  |  |  135|  7.72k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.72k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 19, False: 7.70k]
  |  |  |  |  ------------------
  |  |  |  |  136|     19|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     19|      }                                                                        \
  |  |  |  |  138|  7.72k|    }
  |  |  ------------------
  ------------------
  385|  7.70k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  7.70k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.70k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.19k, False: 3.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 243, False: 7.45k]
  ------------------
  386|    243|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    243|#  define MINBPC(enc) 2
  ------------------
  387|  7.70k|    *nextTokPtr = ptr;
  388|  7.70k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.70k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|    733|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 733, False: 17.1k]
  ------------------
  390|    733|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    733|#  define MINBPC(enc) 2
  ------------------
  391|    733|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    733|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  2.20k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.07k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.01k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.07k, False: 16.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.07k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 57, False: 1.01k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.01k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     57|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.01k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.01k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.01k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.01k|    break;
  |  |  ------------------
  |  |   63|  1.01k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 55, False: 17.8k]
  |  |  ------------------
  |  |   64|     55|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 17.8k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 17.8k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.32k|  default:
  ------------------
  |  Branch (393:3): [True: 4.32k, False: 13.5k]
  ------------------
  394|  4.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.32k|#  define MINBPC(enc) 2
  ------------------
  395|  4.32k|    break;
  396|  17.8k|  }
  397|   517k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   517k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   517k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   517k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.7k, False: 490k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 517k]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 517k]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  409|  4.12k|      LEAD_CASE(4)
  ------------------
  |  |  400|  4.07k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 4.12k, False: 513k]
  |  |  ------------------
  |  |  401|  4.12k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  4.07k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 52, False: 4.07k]
  |  |  ------------------
  |  |  402|     52|      *nextTokPtr = ptr;                                                       \
  |  |  403|     52|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     52|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     52|    }                                                                          \
  |  |  405|  4.07k|    ptr += n;                                                                  \
  |  |  406|  4.07k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     49|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 49, False: 517k]
  ------------------
  412|     49|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 517k]
  ------------------
  413|     53|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 4, False: 517k]
  ------------------
  414|  5.66k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 5.61k, False: 511k]
  ------------------
  415|  6.19k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 533, False: 516k]
  ------------------
  416|  8.88k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 2.68k, False: 514k]
  ------------------
  417|  8.88k|      *nextTokPtr = ptr;
  418|  8.88k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  8.88k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   504k|    default:
  ------------------
  |  Branch (419:5): [True: 504k, False: 13.0k]
  ------------------
  420|   504k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   504k|#  define MINBPC(enc) 2
  ------------------
  421|   504k|      break;
  422|   517k|    }
  423|   517k|  }
  424|    132|  *nextTokPtr = ptr;
  425|    132|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    132|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  9.06k|}
xmltok.c:big2_attributeValueTok:
 1262|   143k|                          const char **nextTokPtr) {
 1263|   143k|  const char *start;
 1264|   143k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 4.49k, False: 138k]
  ------------------
 1265|  4.49k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.49k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   138k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   138k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   138k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   138k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 138k]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|   138k|  start = ptr;
 1275|  3.94M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  3.94M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.94M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.94M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   200k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 200k, False: 3.74M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 3.94M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 3.94M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  9.96k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  9.96k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 9.96k, False: 3.93M]
  |  |  ------------------
  |  | 1279|  9.96k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  9.96k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  67.9k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 67.9k, False: 3.88M]
  ------------------
 1286|  67.9k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 45.9k, False: 22.0k]
  ------------------
 1287|  45.9k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  45.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  45.9k|#  define MINBPC(enc) 2
  ------------------
 1288|  22.0k|      *nextTokPtr = ptr;
 1289|  22.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      2|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 2, False: 3.94M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      2|      *nextTokPtr = ptr;
 1293|      2|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1294|  10.1k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 10.1k, False: 3.93M]
  ------------------
 1295|  10.1k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 5.66k, False: 4.45k]
  ------------------
 1296|  5.66k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.66k|#  define MINBPC(enc) 2
  ------------------
 1297|  5.66k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.66k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  5.66k|      }
 1299|  4.45k|      *nextTokPtr = ptr;
 1300|  4.45k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.45k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  50.5k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 50.5k, False: 3.89M]
  ------------------
 1302|  50.5k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 27.3k, False: 23.1k]
  ------------------
 1303|  27.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  27.3k|#  define MINBPC(enc) 2
  ------------------
 1304|  27.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  27.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 484, False: 26.9k]
  ------------------
 1305|    484|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    484|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  26.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  26.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  26.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 16.8k, False: 10.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 935, False: 25.9k]
  ------------------
 1307|    935|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    935|#  define MINBPC(enc) 2
  ------------------
 1308|  26.9k|        *nextTokPtr = ptr;
 1309|  26.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  26.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  27.3k|      }
 1311|  23.1k|      *nextTokPtr = ptr;
 1312|  23.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  7.26k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 7.26k, False: 3.94M]
  ------------------
 1314|  7.26k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 5.60k, False: 1.65k]
  ------------------
 1315|  5.60k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.60k|#  define MINBPC(enc) 2
  ------------------
 1316|  5.60k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  5.60k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  5.60k|      }
 1318|  1.65k|      *nextTokPtr = ptr;
 1319|  1.65k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.65k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  3.80M|    default:
  ------------------
  |  Branch (1320:5): [True: 3.80M, False: 145k]
  ------------------
 1321|  3.80M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.80M|#  define MINBPC(enc) 2
  ------------------
 1322|  3.80M|      break;
 1323|  3.94M|    }
 1324|  3.94M|  }
 1325|  2.74k|  *nextTokPtr = ptr;
 1326|  2.74k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.74k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   138k|}
xmltok.c:big2_entityValueTok:
 1331|  24.9k|                       const char **nextTokPtr) {
 1332|  24.9k|  const char *start;
 1333|  24.9k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.39k, False: 23.5k]
  ------------------
 1334|  1.39k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.39k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  23.5k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  23.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  23.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  23.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 23.5k]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  23.5k|  start = ptr;
 1344|  9.87M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  9.87M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  9.87M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.87M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  42.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 42.5k, False: 9.83M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 9.87M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 9.87M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  6.07k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  6.07k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 6.07k, False: 9.87M]
  |  |  ------------------
  |  | 1348|  6.07k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  6.07k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  8.05k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 8.05k, False: 9.86M]
  ------------------
 1355|  8.05k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 5.46k, False: 2.58k]
  ------------------
 1356|  5.46k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.46k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.46k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.58k|      *nextTokPtr = ptr;
 1358|  2.58k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.58k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|     10|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 10, False: 9.87M]
  ------------------
 1360|     10|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 7, False: 3]
  ------------------
 1361|      7|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      7|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      7|#  define MINBPC(enc) 2
  ------------------
 1362|      7|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      7|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 5]
  ------------------
 1363|      7|      }
 1364|      3|      *nextTokPtr = ptr;
 1365|      3|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  1.23k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 1.23k, False: 9.87M]
  ------------------
 1367|  1.23k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 732, False: 502]
  ------------------
 1368|    732|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    732|#  define MINBPC(enc) 2
  ------------------
 1369|    732|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    732|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|    732|      }
 1371|    502|      *nextTokPtr = ptr;
 1372|    502|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    502|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  13.6k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 13.6k, False: 9.86M]
  ------------------
 1374|  13.6k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 7.77k, False: 5.89k]
  ------------------
 1375|  7.77k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.77k|#  define MINBPC(enc) 2
  ------------------
 1376|  7.77k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.77k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.77k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.77k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 303, False: 7.46k]
  ------------------
 1377|    303|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    303|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  7.46k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  7.46k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.46k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.17k, False: 3.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 204, False: 7.26k]
  ------------------
 1379|    204|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    204|#  define MINBPC(enc) 2
  ------------------
 1380|  7.46k|        *nextTokPtr = ptr;
 1381|  7.46k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.46k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  7.77k|      }
 1383|  5.89k|      *nextTokPtr = ptr;
 1384|  5.89k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.89k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  9.84M|    default:
  ------------------
  |  Branch (1385:5): [True: 9.84M, False: 29.0k]
  ------------------
 1386|  9.84M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.84M|#  define MINBPC(enc) 2
  ------------------
 1387|  9.84M|      break;
 1388|  9.87M|    }
 1389|  9.87M|  }
 1390|    600|  *nextTokPtr = ptr;
 1391|    600|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    600|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  23.5k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  27.7k|                         const char *end1, const char *ptr2) {
 1716|  27.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  27.7k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   111k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  84.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 96.6k, False: 15.2k]
  ------------------
 1718|  96.6k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  96.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 27, False: 96.6k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     27|      return 0; /* LCOV_EXCL_LINE */
 1725|     27|    }
 1726|  96.6k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  96.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  96.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 96.6k, False: 28]
  |  |  |  |  |  Branch (872:49): [True: 84.0k, False: 12.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  12.5k|      return 0;
 1728|  96.6k|  }
 1729|  15.2k|  return ptr1 == end1;
 1730|  27.7k|}
xmltok.c:big2_nameLength:
 1733|  15.3k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  15.3k|  const char *start = ptr;
 1735|   996k|  for (;;) {
 1736|   996k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   996k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   996k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.2k, False: 967k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 996k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 996k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 996k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   967k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 967k, False: 29.2k]
  ------------------
 1746|   974k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.69k, False: 988k]
  ------------------
 1747|   974k|#  ifdef XML_NS
 1748|   974k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 996k]
  ------------------
 1749|   974k|#  endif
 1750|   980k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 5.82k, False: 990k]
  ------------------
 1751|   980k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 22, False: 996k]
  ------------------
 1752|   981k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 354, False: 996k]
  ------------------
 1753|   981k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 51, False: 996k]
  ------------------
 1754|   981k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   981k|#  define MINBPC(enc) 2
  ------------------
 1755|   981k|      break;
 1756|  15.3k|    default:
  ------------------
  |  Branch (1756:5): [True: 15.3k, False: 981k]
  ------------------
 1757|  15.3k|      return (int)(ptr - start);
 1758|   996k|    }
 1759|   996k|  }
 1760|  15.3k|}
xmltok.c:big2_getAtts:
 1510|  10.8k|                ATTRIBUTE *atts) {
 1511|  10.8k|  enum { other, inName, inValue } state = inName;
 1512|  10.8k|  int nAtts = 0;
 1513|  10.8k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.12M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.8k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.11M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.12M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  9.12M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.12M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.37M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.37M, False: 6.75M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.12M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.12M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|  65.5k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  65.5k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 65.5k, False: 9.06M]
  |  |  ------------------
  |  | 1528|  65.5k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  65.5k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 65.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  65.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  65.5k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  6.68M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 6.68M, False: 2.44M]
  ------------------
 1535|  6.89M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 210k, False: 8.91M]
  ------------------
 1536|  7.10M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 211k, False: 8.91M]
  ------------------
 1537|  7.10M|      START_NAME
  ------------------
  |  | 1519|  7.10M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 260k, False: 6.84M]
  |  |  ------------------
  |  | 1520|   260k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 133k, False: 127k]
  |  |  ------------------
  |  | 1521|   133k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   133k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   133k|      }                                                                        \
  |  | 1524|   260k|      state = inName;                                                          \
  |  | 1525|   260k|    }
  ------------------
 1538|  7.10M|      break;
 1539|      0|#  undef START_NAME
 1540|   251k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 251k, False: 8.87M]
  ------------------
 1541|   251k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 74.9k, False: 176k]
  ------------------
 1542|  74.9k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 38.8k, False: 36.0k]
  ------------------
 1543|  38.8k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  38.8k|#  define MINBPC(enc) 2
  ------------------
 1544|  74.9k|        state = inValue;
 1545|  74.9k|        open = BT_QUOT;
 1546|   176k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 74.9k, False: 101k]
  ------------------
 1547|  74.9k|        state = other;
 1548|  74.9k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 38.8k, False: 36.0k]
  ------------------
 1549|  38.8k|          atts[nAtts].valueEnd = ptr;
 1550|  74.9k|        nAtts++;
 1551|  74.9k|      }
 1552|   251k|      break;
 1553|   371k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 371k, False: 8.75M]
  ------------------
 1554|   371k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 185k, False: 185k]
  ------------------
 1555|   185k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 94.5k, False: 91.0k]
  ------------------
 1556|  94.5k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  94.5k|#  define MINBPC(enc) 2
  ------------------
 1557|   185k|        state = inValue;
 1558|   185k|        open = BT_APOS;
 1559|   185k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 185k, False: 448]
  ------------------
 1560|   185k|        state = other;
 1561|   185k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 94.5k, False: 91.0k]
  ------------------
 1562|  94.5k|          atts[nAtts].valueEnd = ptr;
 1563|   185k|        nAtts++;
 1564|   185k|      }
 1565|   371k|      break;
 1566|  45.8k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 45.8k, False: 9.08M]
  ------------------
 1567|  45.8k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 45.5k, False: 300]
  ------------------
 1568|  45.5k|        atts[nAtts].normalized = 0;
 1569|  45.8k|      break;
 1570|   607k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 607k, False: 8.52M]
  ------------------
 1571|   607k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.35k, False: 605k]
  ------------------
 1572|  2.35k|        state = other;
 1573|   605k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 333k, False: 272k]
  |  Branch (1573:36): [True: 170k, False: 162k]
  |  Branch (1573:55): [True: 98.9k, False: 71.7k]
  ------------------
 1574|   605k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 20.6k, False: 78.2k]
  ------------------
 1575|  98.9k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  78.2k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  78.2k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 78.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   177k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 387, False: 77.9k]
  ------------------
 1576|  98.9k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  77.9k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  77.9k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 60.9k, False: 17.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   176k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 44.6k, False: 33.2k]
  ------------------
 1577|  98.9k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  33.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 16.2k, False: 17.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 5.05k, False: 28.1k]
  ------------------
 1578|  70.8k|        atts[nAtts].normalized = 0;
 1579|   607k|      break;
 1580|  83.0k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 83.0k, False: 9.04M]
  ------------------
 1581|  96.1k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 13.1k, False: 9.11M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  96.1k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.60k, False: 93.5k]
  ------------------
 1585|  2.60k|        state = other;
 1586|  93.5k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 86.0k, False: 7.50k]
  |  Branch (1586:36): [True: 60.1k, False: 25.9k]
  ------------------
 1587|  60.1k|        atts[nAtts].normalized = 0;
 1588|  96.1k|      break;
 1589|   177k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 177k, False: 8.95M]
  ------------------
 1590|   183k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 6.13k, False: 9.12M]
  ------------------
 1591|   183k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.8k, False: 172k]
  ------------------
 1592|  10.8k|        return nAtts;
 1593|   172k|      break;
 1594|   398k|    default:
  ------------------
  |  Branch (1594:5): [True: 398k, False: 8.73M]
  ------------------
 1595|   398k|      break;
 1596|  9.12M|    }
 1597|  9.12M|  }
 1598|       |  /* not reached */
 1599|  10.8k|}
xmltok.c:big2_charRefNumber:
 1602|  4.06k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  4.06k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  4.06k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.06k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  4.06k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  4.06k|#  define MINBPC(enc) 2
  ------------------
 1607|  4.06k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  4.06k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.06k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.06k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 3.39k, False: 670]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  14.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  3.39k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  14.3k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  14.3k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 14.3k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 3.37k, False: 10.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  10.9k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.9k|#  define MINBPC(enc) 2
  ------------------
 1610|  10.9k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  10.9k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  10.9k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 10.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  10.9k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 10.9k]
  ------------------
 1612|    411|      case ASCII_0:
  ------------------
  |  |   90|    411|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 411, False: 10.5k]
  ------------------
 1613|    737|      case ASCII_1:
  ------------------
  |  |   91|    737|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 326, False: 10.6k]
  ------------------
 1614|  1.37k|      case ASCII_2:
  ------------------
  |  |   92|  1.37k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 639, False: 10.3k]
  ------------------
 1615|  1.60k|      case ASCII_3:
  ------------------
  |  |   93|  1.60k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 230, False: 10.7k]
  ------------------
 1616|  1.93k|      case ASCII_4:
  ------------------
  |  |   94|  1.93k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 324, False: 10.6k]
  ------------------
 1617|  2.60k|      case ASCII_5:
  ------------------
  |  |   95|  2.60k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 678, False: 10.2k]
  ------------------
 1618|  2.85k|      case ASCII_6:
  ------------------
  |  |   96|  2.85k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 251, False: 10.7k]
  ------------------
 1619|  3.28k|      case ASCII_7:
  ------------------
  |  |   97|  3.28k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 430, False: 10.5k]
  ------------------
 1620|  3.68k|      case ASCII_8:
  ------------------
  |  |   98|  3.68k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 397, False: 10.5k]
  ------------------
 1621|  4.28k|      case ASCII_9:
  ------------------
  |  |   99|  4.28k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 599, False: 10.3k]
  ------------------
 1622|  4.28k|        result <<= 4;
 1623|  4.28k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  4.28k|#define ASCII_0 0x30
  ------------------
 1624|  4.28k|        break;
 1625|    531|      case ASCII_A:
  ------------------
  |  |   36|    531|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 531, False: 10.4k]
  ------------------
 1626|    988|      case ASCII_B:
  ------------------
  |  |   37|    988|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 457, False: 10.5k]
  ------------------
 1627|  1.27k|      case ASCII_C:
  ------------------
  |  |   38|  1.27k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 290, False: 10.6k]
  ------------------
 1628|  1.86k|      case ASCII_D:
  ------------------
  |  |   39|  1.86k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 584, False: 10.3k]
  ------------------
 1629|  2.31k|      case ASCII_E:
  ------------------
  |  |   40|  2.31k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 448, False: 10.5k]
  ------------------
 1630|  3.67k|      case ASCII_F:
  ------------------
  |  |   41|  3.67k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.36k, False: 9.60k]
  ------------------
 1631|  3.67k|        result <<= 4;
 1632|  3.67k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.67k|#define ASCII_A 0x41
  ------------------
 1633|  3.67k|        break;
 1634|    334|      case ASCII_a:
  ------------------
  |  |   63|    334|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 334, False: 10.6k]
  ------------------
 1635|  1.06k|      case ASCII_b:
  ------------------
  |  |   64|  1.06k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 729, False: 10.2k]
  ------------------
 1636|  1.42k|      case ASCII_c:
  ------------------
  |  |   65|  1.42k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 360, False: 10.6k]
  ------------------
 1637|  2.18k|      case ASCII_d:
  ------------------
  |  |   66|  2.18k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 758, False: 10.2k]
  ------------------
 1638|  2.51k|      case ASCII_e:
  ------------------
  |  |   67|  2.51k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 330, False: 10.6k]
  ------------------
 1639|  3.01k|      case ASCII_f:
  ------------------
  |  |   68|  3.01k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 500, False: 10.4k]
  ------------------
 1640|  3.01k|        result <<= 4;
 1641|  3.01k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.01k|#define ASCII_a 0x61
  ------------------
 1642|  3.01k|        break;
 1643|  10.9k|      }
 1644|  10.9k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 22, False: 10.9k]
  ------------------
 1645|     22|        return -1;
 1646|  10.9k|    }
 1647|  3.39k|  } else {
 1648|  2.57k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  2.57k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.57k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.57k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 669, False: 1.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.90k|#  define MINBPC(enc) 2
  ------------------
 1649|  1.91k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  1.91k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.91k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.91k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  1.91k|      result *= 10;
 1651|  1.91k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  1.91k|#define ASCII_0 0x30
  ------------------
 1652|  1.91k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 1, False: 1.90k]
  ------------------
 1653|      1|        return -1;
 1654|  1.91k|    }
 1655|    670|  }
 1656|  4.04k|  return checkCharRefNumber(result);
 1657|  4.06k|}
xmltok.c:big2_predefinedEntityName:
 1661|  59.4k|                             const char *end) {
 1662|  59.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  59.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  59.4k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  59.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 47.9k, False: 11.5k]
  ------------------
 1664|  1.86k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.86k, False: 57.5k]
  ------------------
 1665|  1.86k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.86k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.86k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.37k, False: 492]
  |  |  |  |  |  Branch (872:49): [True: 711, False: 665]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    711|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    711|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    711|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 362, False: 349]
  |  |  |  |  |  Branch (871:32): [True: 365, False: 346]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    191|      case ASCII_l:
  ------------------
  |  |   74|    191|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 191, False: 520]
  ------------------
 1668|    191|        return ASCII_LT;
  ------------------
  |  |  111|    191|#define ASCII_LT 0x3C
  ------------------
 1669|    158|      case ASCII_g:
  ------------------
  |  |   69|    158|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 158, False: 553]
  ------------------
 1670|    158|        return ASCII_GT;
  ------------------
  |  |  113|    158|#define ASCII_GT 0x3E
  ------------------
 1671|    711|      }
 1672|    711|    }
 1673|  1.51k|    break;
 1674|  1.95k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.95k, False: 57.5k]
  ------------------
 1675|  1.95k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.95k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.95k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.62k, False: 332]
  |  |  |  |  |  Branch (872:49): [True: 1.25k, False: 366]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.25k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.25k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.25k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.25k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.25k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.05k, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 596, False: 459]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    596|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    596|#  define MINBPC(enc) 2
  ------------------
 1679|    596|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    596|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    596|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 402, False: 194]
  |  |  |  |  |  Branch (872:49): [True: 198, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    198|          return ASCII_AMP;
  ------------------
  |  |  105|    198|#define ASCII_AMP 0x26
  ------------------
 1681|    596|      }
 1682|  1.25k|    }
 1683|  1.75k|    break;
 1684|  7.72k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 7.72k, False: 51.7k]
  ------------------
 1685|  7.72k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  7.72k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  7.72k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 489, False: 7.23k]
  |  |  |  |  |  Branch (871:32): [True: 7.41k, False: 304]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.85k|    case ASCII_q:
  ------------------
  |  |   79|  1.85k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.85k, False: 5.87k]
  ------------------
 1687|  1.85k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.85k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.85k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.85k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.85k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.64k, False: 207]
  |  |  |  |  |  Branch (872:49): [True: 1.41k, False: 233]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.41k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.41k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.41k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.41k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.41k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.21k, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 1.00k, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|  1.00k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.00k|#  define MINBPC(enc) 2
  ------------------
 1692|  1.00k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|  1.00k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.00k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 809, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 607, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    607|            return ASCII_QUOT;
  ------------------
  |  |  104|    607|#define ASCII_QUOT 0x22
  ------------------
 1694|  1.00k|        }
 1695|  1.41k|      }
 1696|  1.24k|      break;
 1697|  5.38k|    case ASCII_a:
  ------------------
  |  |   63|  5.38k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 5.38k, False: 2.33k]
  ------------------
 1698|  5.38k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.38k|#  define MINBPC(enc) 2
  ------------------
 1699|  5.38k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  5.38k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.38k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.08k, False: 297]
  |  |  |  |  |  Branch (872:49): [True: 4.42k, False: 660]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  4.42k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.42k|#  define MINBPC(enc) 2
  ------------------
 1701|  4.42k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  4.42k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.42k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.96k, False: 459]
  |  |  |  |  |  Branch (872:49): [True: 3.53k, False: 430]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  3.53k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.53k|#  define MINBPC(enc) 2
  ------------------
 1703|  3.53k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|  3.53k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.53k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 388, False: 3.14k]
  |  |  |  |  |  Branch (872:49): [True: 194, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    194|            return ASCII_APOS;
  ------------------
  |  |  106|    194|#define ASCII_APOS 0x27
  ------------------
 1705|  3.53k|        }
 1706|  4.42k|      }
 1707|  5.18k|      break;
 1708|  7.72k|    }
 1709|  59.4k|  }
 1710|  58.1k|  return 0;
 1711|  59.4k|}
xmltok.c:big2_updatePosition:
 1779|  3.41k|                       POSITION *pos) {
 1780|  4.04M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.04M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.04M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.04M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   353k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 353k, False: 3.69M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 4.04M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 4.04M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  38.4k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  38.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 38.4k, False: 4.00M]
  |  |  ------------------
  |  | 1784|  38.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  38.4k|    pos->columnNumber++;                                                       \
  |  | 1786|  38.4k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  11.2k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 11.2k, False: 4.03M]
  ------------------
 1792|  11.2k|      pos->columnNumber = 0;
 1793|  11.2k|      pos->lineNumber++;
 1794|  11.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.2k|#  define MINBPC(enc) 2
  ------------------
 1795|  11.2k|      break;
 1796|  33.8k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 33.8k, False: 4.01M]
  ------------------
 1797|  33.8k|      pos->lineNumber++;
 1798|  33.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  33.8k|#  define MINBPC(enc) 2
  ------------------
 1799|  33.8k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  33.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  67.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  33.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 33.8k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  33.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  23.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 23.1k, False: 10.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.92k, False: 31.9k]
  ------------------
 1800|  1.92k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.92k|#  define MINBPC(enc) 2
  ------------------
 1801|  33.8k|      pos->columnNumber = 0;
 1802|  33.8k|      break;
 1803|  3.96M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.96M, False: 83.5k]
  ------------------
 1804|  3.96M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.96M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.96M|      pos->columnNumber++;
 1806|  3.96M|      break;
 1807|  4.04M|    }
 1808|  4.04M|  }
 1809|  3.41k|}
xmltok.c:big2_isPublicId:
 1450|  1.62k|                   const char **badPtr) {
 1451|  1.62k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.62k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.62k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.62k|#  define MINBPC(enc) 2
  ------------------
 1453|  7.91k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  7.87k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.91k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.91k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.91k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.89k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.89k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    279|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 279, False: 7.63k]
  ------------------
 1456|    764|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 485, False: 7.42k]
  ------------------
 1457|  1.05k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 289, False: 7.62k]
  ------------------
 1458|  1.33k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 279, False: 7.63k]
  ------------------
 1459|  1.65k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 327, False: 7.58k]
  ------------------
 1460|  2.06k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 403, False: 7.51k]
  ------------------
 1461|  2.26k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 199, False: 7.71k]
  ------------------
 1462|  2.56k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 306, False: 7.60k]
  ------------------
 1463|  2.81k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 252, False: 7.66k]
  ------------------
 1464|  3.01k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 199, False: 7.71k]
  ------------------
 1465|  3.45k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 432, False: 7.48k]
  ------------------
 1466|  3.80k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 356, False: 7.55k]
  ------------------
 1467|  4.21k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 407, False: 7.50k]
  ------------------
 1468|  4.51k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 302, False: 7.61k]
  ------------------
 1469|  4.78k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 266, False: 7.64k]
  ------------------
 1470|  5.26k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 481, False: 7.43k]
  ------------------
 1471|  5.59k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 335, False: 7.57k]
  ------------------
 1472|  5.81k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 213, False: 7.70k]
  ------------------
 1473|  5.81k|#  ifdef XML_NS
 1474|  5.81k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.91k]
  ------------------
 1475|  5.81k|#  endif
 1476|  5.81k|      break;
 1477|    341|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 341, False: 7.57k]
  ------------------
 1478|    341|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    341|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    341|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 341, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 339]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      2|        *badPtr = ptr;
 1480|      2|        return 0;
 1481|      2|      }
 1482|    339|      break;
 1483|    339|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 225, False: 7.68k]
  ------------------
 1484|    664|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 439, False: 7.47k]
  ------------------
 1485|    664|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|    664|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    664|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 664, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 654, False: 10]
  ------------------
 1486|    654|        break;
 1487|       |      /* fall through */
 1488|  1.10k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.09k, False: 6.81k]
  ------------------
 1489|  1.10k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.10k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.10k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.08k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    393|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 393, False: 715]
  ------------------
 1491|  1.06k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 674, False: 434]
  ------------------
 1492|  1.06k|        break;
 1493|     41|      default:
  ------------------
  |  Branch (1493:7): [True: 41, False: 1.06k]
  ------------------
 1494|     41|        *badPtr = ptr;
 1495|     41|        return 0;
 1496|  1.10k|      }
 1497|  1.06k|      break;
 1498|  7.91k|    }
 1499|  7.91k|  }
 1500|  1.58k|  return 1;
 1501|  1.62k|}

XmlGetUtf8InternalEncoding:
   40|  19.2k|NS(XmlGetUtf8InternalEncoding)(void) {
   41|  19.2k|  return &ns(internal_utf8_encoding).enc;
  ------------------
  |  | 1642|  19.2k|#define ns(x) x
  ------------------
   42|  19.2k|}
XmlInitEncoding:
   80|  38.5k|                    const char *name) {
   81|  38.5k|  int i = getEncodingIndex(name);
   82|  38.5k|  if (i == UNKNOWN_ENC)
  ------------------
  |  Branch (82:7): [True: 0, False: 38.5k]
  ------------------
   83|      0|    return 0;
   84|  38.5k|  SET_INIT_ENC_INDEX(p, i);
  ------------------
  |  | 1520|  38.5k|#define SET_INIT_ENC_INDEX(enc, i) ((enc)->initEnc.isUtf16 = (char)i)
  ------------------
   85|  38.5k|  p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
  ------------------
  |  |  130|  38.5k|#define XML_PROLOG_STATE 0
  ------------------
                p->initEnc.scanners[XML_PROLOG_STATE] = NS(initScanProlog);
  ------------------
  |  | 1641|  38.5k|#define NS(x) x
  ------------------
   86|  38.5k|  p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
  ------------------
  |  |  131|  38.5k|#define XML_CONTENT_STATE 1
  ------------------
                p->initEnc.scanners[XML_CONTENT_STATE] = NS(initScanContent);
  ------------------
  |  | 1641|  38.5k|#define NS(x) x
  ------------------
   87|  38.5k|  p->initEnc.updatePosition = initUpdatePosition;
   88|  38.5k|  p->encPtr = encPtr;
   89|  38.5k|  *encPtr = &(p->initEnc);
   90|  38.5k|  return 1;
   91|  38.5k|}
XmlParseXmlDecl:
  116|    297|                    int *standalone) {
  117|    297|  return doParseXmlDecl(NS(findEncoding), isGeneralTextEntity, enc, ptr, end,
  ------------------
  |  | 1641|    297|#define NS(x) x
  ------------------
  118|    297|                        badPtr, versionPtr, versionEndPtr, encodingName,
  119|    297|                        encoding, standalone);
  120|    297|}
xmltok.c:initScanProlog:
   66|  19.2k|                   const char **nextTokPtr) {
   67|  19.2k|  return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE,
  ------------------
  |  | 1641|  19.2k|#define NS(x) x
  ------------------
                return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE,
  ------------------
  |  |  130|  19.2k|#define XML_PROLOG_STATE 0
  ------------------
   68|  19.2k|                  ptr, end, nextTokPtr);
   69|  19.2k|}
xmltok.c:findEncoding:
   94|     38|NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) {
   95|     38|#  define ENCODING_MAX 128
   96|     38|  char buf[ENCODING_MAX] = "";
   97|     38|  char *p = buf;
   98|     38|  int i;
   99|     38|  XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1);
  ------------------
  |  |  276|     38|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
  100|     38|  if (ptr != end)
  ------------------
  |  Branch (100:7): [True: 1, False: 37]
  ------------------
  101|      1|    return 0;
  102|     37|  *p = 0;
  103|     37|  if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2)
  ------------------
  |  Branch (103:7): [True: 1, False: 36]
  |  Branch (103:34): [True: 1, False: 0]
  ------------------
  104|      1|    return enc;
  105|     36|  i = getEncodingIndex(buf);
  106|     36|  if (i == UNKNOWN_ENC)
  ------------------
  |  Branch (106:7): [True: 34, False: 2]
  ------------------
  107|     34|    return 0;
  108|      2|  return NS(encodings)[i];
  ------------------
  |  | 1641|      2|#define NS(x) x
  ------------------
  109|     36|}

