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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.8k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.8k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.8k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.8k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.8k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.8k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.8k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.8k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.8k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.8k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.8k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.8k|  return key;
  152|  19.8k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.8k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.8k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.8k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.8k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.8k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.8k|sip24_final(struct siphash *H) {
  232|  19.8k|  const char left = (char)(H->p - H->buf);
  233|  19.8k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.8k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.8k]
  ------------------
  236|  1.23k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.23k, False: 18.6k]
  ------------------
  237|  1.23k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.99k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.76k, False: 16.0k]
  ------------------
  240|  4.99k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.11k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.11k, False: 18.7k]
  ------------------
  243|  6.11k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  9.91k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.80k, False: 16.0k]
  ------------------
  246|  9.91k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.2k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.32k, False: 18.5k]
  ------------------
  249|  11.2k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.7k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.47k, False: 16.3k]
  ------------------
  252|  14.7k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.9k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.27k, False: 18.5k]
  ------------------
  255|  15.9k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.8k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.87k, False: 15.9k]
  ------------------
  258|  19.8k|    break;
  259|  19.8k|  }
  260|       |
  261|  19.8k|  H->v3 ^= b;
  262|  19.8k|  sip_round(H, 2);
  263|  19.8k|  H->v0 ^= b;
  264|  19.8k|  H->v2 ^= 0xff;
  265|  19.8k|  sip_round(H, 4);
  266|       |
  267|  19.8k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.8k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  45.1M|sip_round(struct siphash *H, const int rounds) {
  168|  45.1M|  int i;
  169|       |
  170|   135M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 90.2M, False: 45.1M]
  ------------------
  171|  90.2M|    H->v0 += H->v1;
  172|  90.2M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  90.2M|    H->v1 ^= H->v0;
  174|  90.2M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  90.2M|    H->v2 += H->v3;
  177|  90.2M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  90.2M|    H->v3 ^= H->v2;
  179|       |
  180|  90.2M|    H->v0 += H->v3;
  181|  90.2M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  90.2M|    H->v3 ^= H->v0;
  183|       |
  184|  90.2M|    H->v2 += H->v1;
  185|  90.2M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  90.2M|    H->v1 ^= H->v2;
  187|  90.2M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  90.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  90.2M|  }
  189|  45.1M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.8k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.8k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.8k|  uint64_t m;
  210|       |
  211|  45.0M|  do {
  212|   405M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   405M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 405M, False: 19.8k]
  |  Branch (212:22): [True: 360M, False: 45.0M]
  ------------------
  213|   360M|      *H->p++ = *p++;
  214|       |
  215|  45.0M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  45.0M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.9k, False: 45.0M]
  ------------------
  216|  15.9k|      break;
  217|       |
  218|  45.0M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  45.0M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  45.0M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  45.0M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  45.0M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  45.0M|    H->v3 ^= m;
  220|  45.0M|    sip_round(H, 2);
  221|  45.0M|    H->v0 ^= m;
  222|       |
  223|  45.0M|    H->p = H->buf;
  224|  45.0M|    H->c += 8;
  225|  45.0M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 45.0M, False: 3.87k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.8k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.8k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.8k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.8k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.8k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.8k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.8k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.8k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.8k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.8k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.8k|  H->p = H->buf;
  199|  19.8k|  H->c = 0;
  200|       |
  201|  19.8k|  return H;
  202|  19.8k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  6.39M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  6.39M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  6.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  6.39M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  6.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  6.39M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  6.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  6.39M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  6.39M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  6.39M|  H->p = H->buf;
  199|  6.39M|  H->c = 0;
  200|       |
  201|  6.39M|  return H;
  202|  6.39M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  6.39M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  6.39M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  6.39M|  uint64_t m;
  210|       |
  211|  7.43M|  do {
  212|  33.6M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  27.2M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 27.2M, False: 6.39M]
  |  Branch (212:22): [True: 26.2M, False: 1.03M]
  ------------------
  213|  26.2M|      *H->p++ = *p++;
  214|       |
  215|  7.43M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  7.43M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 6.38M, False: 1.04M]
  ------------------
  216|  6.38M|      break;
  217|       |
  218|  1.04M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  1.04M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  1.04M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  1.04M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  1.04M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  1.04M|    H->v3 ^= m;
  220|  1.04M|    sip_round(H, 2);
  221|  1.04M|    H->v0 ^= m;
  222|       |
  223|  1.04M|    H->p = H->buf;
  224|  1.04M|    H->c += 8;
  225|  1.04M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 1.03M, False: 8.25k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  6.39M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  13.8M|sip_round(struct siphash *H, const int rounds) {
  168|  13.8M|  int i;
  169|       |
  170|  54.3M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 40.4M, False: 13.8M]
  ------------------
  171|  40.4M|    H->v0 += H->v1;
  172|  40.4M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  40.4M|    H->v1 ^= H->v0;
  174|  40.4M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  40.4M|    H->v2 += H->v3;
  177|  40.4M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  40.4M|    H->v3 ^= H->v2;
  179|       |
  180|  40.4M|    H->v0 += H->v3;
  181|  40.4M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  40.4M|    H->v3 ^= H->v0;
  183|       |
  184|  40.4M|    H->v2 += H->v1;
  185|  40.4M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  40.4M|    H->v1 ^= H->v2;
  187|  40.4M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  40.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  40.4M|  }
  189|  13.8M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  6.39M|sip24_final(struct siphash *H) {
  232|  6.39M|  const char left = (char)(H->p - H->buf);
  233|  6.39M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  6.39M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 6.39M]
  ------------------
  236|  18.3k|  case 7:
  ------------------
  |  Branch (236:3): [True: 18.3k, False: 6.37M]
  ------------------
  237|  18.3k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  2.24M|  case 6:
  ------------------
  |  Branch (239:3): [True: 2.22M, False: 4.17M]
  ------------------
  240|  2.24M|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  2.25M|  case 5:
  ------------------
  |  Branch (242:3): [True: 8.82k, False: 6.38M]
  ------------------
  243|  2.25M|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  2.26M|  case 4:
  ------------------
  |  Branch (245:3): [True: 13.2k, False: 6.38M]
  ------------------
  246|  2.26M|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  2.31M|  case 3:
  ------------------
  |  Branch (248:3): [True: 50.6k, False: 6.34M]
  ------------------
  249|  2.31M|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  2.40M|  case 2:
  ------------------
  |  Branch (251:3): [True: 87.1k, False: 6.31M]
  ------------------
  252|  2.40M|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  6.38M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.98M, False: 2.41M]
  ------------------
  255|  6.38M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  6.39M|  case 0:
  ------------------
  |  Branch (257:3): [True: 8.63k, False: 6.38M]
  ------------------
  258|  6.39M|    break;
  259|  6.39M|  }
  260|       |
  261|  6.39M|  H->v3 ^= b;
  262|  6.39M|  sip_round(H, 2);
  263|  6.39M|  H->v0 ^= b;
  264|  6.39M|  H->v2 ^= 0xff;
  265|  6.39M|  sip_round(H, 4);
  266|       |
  267|  6.39M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  6.39M|} /* sip24_final() */

XML_ParserCreate:
  718|  19.8k|XML_ParserCreate(const XML_Char *encodingName) {
  719|  19.8k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  720|  19.8k|}
XML_ParserCreate_MM:
  969|  19.8k|                    const XML_Char *nameSep) {
  970|  19.8k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  971|  19.8k|}
XML_ParserFree:
 1440|  19.8k|XML_ParserFree(XML_Parser parser) {
 1441|  19.8k|  TAG *tagList;
 1442|  19.8k|  OPEN_INTERNAL_ENTITY *entityList;
 1443|  19.8k|  if (parser == NULL)
  ------------------
  |  Branch (1443:7): [True: 0, False: 19.8k]
  ------------------
 1444|      0|    return;
 1445|       |  /* free m_tagStack and m_freeTagList */
 1446|  19.8k|  tagList = parser->m_tagStack;
 1447|  3.77M|  for (;;) {
 1448|  3.77M|    TAG *p;
 1449|  3.77M|    if (tagList == NULL) {
  ------------------
  |  Branch (1449:9): [True: 20.1k, False: 3.75M]
  ------------------
 1450|  20.1k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1450:11): [True: 19.8k, False: 306]
  ------------------
 1451|  19.8k|        break;
 1452|    306|      tagList = parser->m_freeTagList;
 1453|    306|      parser->m_freeTagList = NULL;
 1454|    306|    }
 1455|  3.75M|    p = tagList;
 1456|  3.75M|    tagList = tagList->parent;
 1457|  3.75M|    FREE(parser, p->buf);
  ------------------
  |  |  715|  3.75M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1458|  3.75M|    destroyBindings(p->bindings, parser);
 1459|  3.75M|    FREE(parser, p);
  ------------------
  |  |  715|  3.75M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1460|  3.75M|  }
 1461|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1462|  19.8k|  entityList = parser->m_openInternalEntities;
 1463|  21.6k|  for (;;) {
 1464|  21.6k|    OPEN_INTERNAL_ENTITY *openEntity;
 1465|  21.6k|    if (entityList == NULL) {
  ------------------
  |  Branch (1465:9): [True: 20.4k, False: 1.23k]
  ------------------
 1466|  20.4k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1466:11): [True: 19.8k, False: 553]
  ------------------
 1467|  19.8k|        break;
 1468|    553|      entityList = parser->m_freeInternalEntities;
 1469|    553|      parser->m_freeInternalEntities = NULL;
 1470|    553|    }
 1471|  1.78k|    openEntity = entityList;
 1472|  1.78k|    entityList = entityList->next;
 1473|  1.78k|    FREE(parser, openEntity);
  ------------------
  |  |  715|  1.78k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1474|  1.78k|  }
 1475|       |
 1476|  19.8k|  destroyBindings(parser->m_freeBindingList, parser);
 1477|  19.8k|  destroyBindings(parser->m_inheritedBindings, parser);
 1478|  19.8k|  poolDestroy(&parser->m_tempPool);
 1479|  19.8k|  poolDestroy(&parser->m_temp2Pool);
 1480|  19.8k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1481|  19.8k|#ifdef XML_DTD
 1482|       |  /* external parameter entity parsers share the DTD structure
 1483|       |     parser->m_dtd with the root parser, so we must not destroy it
 1484|       |  */
 1485|  19.8k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1485:7): [True: 19.8k, False: 0]
  |  Branch (1485:36): [True: 19.8k, False: 0]
  ------------------
 1486|       |#else
 1487|       |  if (parser->m_dtd)
 1488|       |#endif /* XML_DTD */
 1489|  19.8k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1490|  19.8k|               &parser->m_mem);
 1491|  19.8k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1492|       |#ifdef XML_ATTR_INFO
 1493|       |  FREE(parser, (void *)parser->m_attInfo);
 1494|       |#endif
 1495|  19.8k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1496|  19.8k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.8k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.8k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.8k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.8k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1500:7): [True: 0, False: 19.8k]
  ------------------
 1501|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1502|  19.8k|  FREE(parser, parser);
  ------------------
  |  |  715|  19.8k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1503|  19.8k|}
XML_SetElementHandler:
 1595|  19.8k|                      XML_EndElementHandler end) {
 1596|  19.8k|  if (parser == NULL)
  ------------------
  |  Branch (1596:7): [True: 0, False: 19.8k]
  ------------------
 1597|      0|    return;
 1598|  19.8k|  parser->m_startElementHandler = start;
 1599|  19.8k|  parser->m_endElementHandler = end;
 1600|  19.8k|}
XML_SetHashSalt:
 1815|  19.8k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1816|  19.8k|  if (parser == NULL)
  ------------------
  |  Branch (1816:7): [True: 0, False: 19.8k]
  ------------------
 1817|      0|    return 0;
 1818|  19.8k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1818:7): [True: 0, False: 19.8k]
  ------------------
 1819|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1820|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1821|  19.8k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1821:7): [True: 0, False: 19.8k]
  ------------------
 1822|  19.8k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1822:10): [True: 0, False: 19.8k]
  ------------------
 1823|      0|    return 0;
 1824|  19.8k|  parser->m_hash_secret_salt = hash_salt;
 1825|  19.8k|  return 1;
 1826|  19.8k|}
XML_ParseBuffer:
 1983|  19.8k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1984|  19.8k|  const char *start;
 1985|  19.8k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.8k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1986|       |
 1987|  19.8k|  if (parser == NULL)
  ------------------
  |  Branch (1987:7): [True: 0, False: 19.8k]
  ------------------
 1988|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1989|  19.8k|  switch (parser->m_parsingStatus.parsing) {
 1990|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1990:3): [True: 0, False: 19.8k]
  ------------------
 1991|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1992|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1993|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1993:3): [True: 0, False: 19.8k]
  ------------------
 1994|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1995|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1996|  19.8k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1996:3): [True: 19.8k, False: 0]
  ------------------
 1997|       |    /* Has someone called XML_GetBuffer successfully before? */
 1998|  19.8k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 19.8k]
  ------------------
 1999|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2000|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2001|      0|    }
 2002|       |
 2003|  19.8k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2003:9): [True: 19.8k, False: 0]
  |  Branch (2003:43): [True: 0, False: 19.8k]
  ------------------
 2004|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2005|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2006|      0|    }
 2007|       |    /* fall through */
 2008|  19.8k|  default:
  ------------------
  |  Branch (2008:3): [True: 0, False: 19.8k]
  ------------------
 2009|  19.8k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2010|  19.8k|  }
 2011|       |
 2012|  19.8k|  start = parser->m_bufferPtr;
 2013|  19.8k|  parser->m_positionPtr = start;
 2014|  19.8k|  parser->m_bufferEnd += len;
 2015|  19.8k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2016|  19.8k|  parser->m_parseEndByteIndex += len;
 2017|  19.8k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2018|       |
 2019|  19.8k|  parser->m_errorCode = parser->m_processor(
 2020|  19.8k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2021|       |
 2022|  19.8k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2022:7): [True: 7.99k, False: 11.8k]
  ------------------
 2023|  7.99k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2024|  7.99k|    parser->m_processor = errorProcessor;
 2025|  7.99k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.99k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2026|  11.8k|  } else {
 2027|  11.8k|    switch (parser->m_parsingStatus.parsing) {
 2028|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2028:5): [True: 0, False: 11.8k]
  ------------------
 2029|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2030|      0|      break;
 2031|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2031:5): [True: 0, False: 11.8k]
  ------------------
 2032|  11.8k|    case XML_PARSING:
  ------------------
  |  Branch (2032:5): [True: 11.8k, False: 0]
  ------------------
 2033|  11.8k|      if (isFinal) {
  ------------------
  |  Branch (2033:11): [True: 0, False: 11.8k]
  ------------------
 2034|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2035|      0|        return result;
 2036|      0|      }
 2037|  11.8k|    default:; /* should not happen */
  ------------------
  |  Branch (2037:5): [True: 0, False: 11.8k]
  ------------------
 2038|  11.8k|    }
 2039|  11.8k|  }
 2040|       |
 2041|  11.8k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.8k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2042|  11.8k|                    parser->m_bufferPtr, &parser->m_position);
 2043|  11.8k|  parser->m_positionPtr = parser->m_bufferPtr;
 2044|  11.8k|  return result;
 2045|  19.8k|}
XML_GetBuffer:
 2048|  19.8k|XML_GetBuffer(XML_Parser parser, int len) {
 2049|  19.8k|  if (parser == NULL)
  ------------------
  |  Branch (2049:7): [True: 0, False: 19.8k]
  ------------------
 2050|      0|    return NULL;
 2051|  19.8k|  if (len < 0) {
  ------------------
  |  Branch (2051:7): [True: 0, False: 19.8k]
  ------------------
 2052|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2053|      0|    return NULL;
 2054|      0|  }
 2055|  19.8k|  switch (parser->m_parsingStatus.parsing) {
 2056|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2056:3): [True: 0, False: 19.8k]
  ------------------
 2057|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2058|      0|    return NULL;
 2059|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2059:3): [True: 0, False: 19.8k]
  ------------------
 2060|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2061|      0|    return NULL;
 2062|  19.8k|  default:;
  ------------------
  |  Branch (2062:3): [True: 19.8k, False: 0]
  ------------------
 2063|  19.8k|  }
 2064|       |
 2065|  19.8k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  199|  19.8k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.8k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2065:7): [True: 19.8k, False: 0]
  ------------------
 2066|  19.8k|#ifdef XML_CONTEXT_BYTES
 2067|  19.8k|    int keep;
 2068|  19.8k|#endif /* defined XML_CONTEXT_BYTES */
 2069|       |    /* Do not invoke signed arithmetic overflow: */
 2070|  19.8k|    int neededSize = (int)((unsigned)len
 2071|  19.8k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  199|  19.8k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.8k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2072|  19.8k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2073|  19.8k|    if (neededSize < 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 19.8k]
  ------------------
 2074|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2075|      0|      return NULL;
 2076|      0|    }
 2077|  19.8k|#ifdef XML_CONTEXT_BYTES
 2078|  19.8k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  199|  19.8k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.8k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2079|  19.8k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   96|  19.8k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2079:9): [True: 0, False: 19.8k]
  ------------------
 2080|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   96|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2081|       |    /* Detect and prevent integer overflow */
 2082|  19.8k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 19.8k]
  ------------------
 2083|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2084|      0|      return NULL;
 2085|      0|    }
 2086|  19.8k|    neededSize += keep;
 2087|  19.8k|#endif /* defined XML_CONTEXT_BYTES */
 2088|  19.8k|    if (neededSize
  ------------------
  |  Branch (2088:9): [True: 0, False: 19.8k]
  ------------------
 2089|  19.8k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  199|  19.8k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.8k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2090|      0|#ifdef XML_CONTEXT_BYTES
 2091|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2091:11): [True: 0, False: 0]
  ------------------
 2092|      0|        int offset
 2093|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2094|      0|              - keep;
 2095|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2096|       |         * in the buffer */
 2097|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2098|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2099|      0|        parser->m_bufferEnd -= offset;
 2100|      0|        parser->m_bufferPtr -= offset;
 2101|      0|      }
 2102|       |#else
 2103|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2104|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2105|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2106|       |        parser->m_bufferEnd
 2107|       |            = parser->m_buffer
 2108|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2109|       |        parser->m_bufferPtr = parser->m_buffer;
 2110|       |      }
 2111|       |#endif /* not defined XML_CONTEXT_BYTES */
 2112|  19.8k|    } else {
 2113|  19.8k|      char *newBuf;
 2114|  19.8k|      int bufferSize
 2115|  19.8k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  199|  19.8k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.8k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2116|  19.8k|      if (bufferSize == 0)
  ------------------
  |  Branch (2116:11): [True: 19.8k, False: 0]
  ------------------
 2117|  19.8k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  246|  19.8k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2118|  31.2k|      do {
 2119|       |        /* Do not invoke signed arithmetic overflow: */
 2120|  31.2k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2121|  31.2k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2121:16): [True: 11.3k, False: 19.8k]
  |  Branch (2121:43): [True: 11.3k, False: 0]
  ------------------
 2122|  19.8k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2122:11): [True: 0, False: 19.8k]
  ------------------
 2123|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2124|      0|        return NULL;
 2125|      0|      }
 2126|  19.8k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  713|  19.8k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2127|  19.8k|      if (newBuf == 0) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 19.8k]
  ------------------
 2128|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2129|      0|        return NULL;
 2130|      0|      }
 2131|  19.8k|      parser->m_bufferLim = newBuf + bufferSize;
 2132|  19.8k|#ifdef XML_CONTEXT_BYTES
 2133|  19.8k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2133:11): [True: 0, False: 19.8k]
  ------------------
 2134|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2135|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2136|      0|                   + keep);
 2137|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2138|      0|        parser->m_buffer = newBuf;
 2139|      0|        parser->m_bufferEnd
 2140|      0|            = parser->m_buffer
 2141|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2142|      0|              + keep;
 2143|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2144|  19.8k|      } else {
 2145|       |        /* This must be a brand new buffer with no data in it yet */
 2146|  19.8k|        parser->m_bufferEnd = newBuf;
 2147|  19.8k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2148|  19.8k|      }
 2149|       |#else
 2150|       |      if (parser->m_bufferPtr) {
 2151|       |        memcpy(newBuf, parser->m_bufferPtr,
 2152|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2153|       |        FREE(parser, parser->m_buffer);
 2154|       |        parser->m_bufferEnd
 2155|       |            = newBuf
 2156|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2157|       |      } else {
 2158|       |        /* This must be a brand new buffer with no data in it yet */
 2159|       |        parser->m_bufferEnd = newBuf;
 2160|       |      }
 2161|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2162|       |#endif /* not defined XML_CONTEXT_BYTES */
 2163|  19.8k|    }
 2164|  19.8k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2165|  19.8k|    parser->m_positionPtr = NULL;
 2166|  19.8k|  }
 2167|  19.8k|  return parser->m_bufferEnd;
 2168|  19.8k|}
xmlparse.c:parserCreate:
  976|  19.8k|             DTD *dtd) {
  977|  19.8k|  XML_Parser parser;
  978|       |
  979|  19.8k|  if (memsuite) {
  ------------------
  |  Branch (979:7): [True: 0, False: 19.8k]
  ------------------
  980|      0|    XML_Memory_Handling_Suite *mtemp;
  981|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  982|      0|    if (parser != NULL) {
  ------------------
  |  Branch (982:9): [True: 0, False: 0]
  ------------------
  983|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  984|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  985|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  986|      0|      mtemp->free_fcn = memsuite->free_fcn;
  987|      0|    }
  988|  19.8k|  } else {
  989|  19.8k|    XML_Memory_Handling_Suite *mtemp;
  990|  19.8k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  991|  19.8k|    if (parser != NULL) {
  ------------------
  |  Branch (991:9): [True: 19.8k, False: 0]
  ------------------
  992|  19.8k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  993|  19.8k|      mtemp->malloc_fcn = malloc;
  994|  19.8k|      mtemp->realloc_fcn = realloc;
  995|  19.8k|      mtemp->free_fcn = free;
  996|  19.8k|    }
  997|  19.8k|  }
  998|       |
  999|  19.8k|  if (! parser)
  ------------------
  |  Branch (999:7): [True: 0, False: 19.8k]
  ------------------
 1000|      0|    return parser;
 1001|       |
 1002|  19.8k|  parser->m_buffer = NULL;
 1003|  19.8k|  parser->m_bufferLim = NULL;
 1004|       |
 1005|  19.8k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  243|  19.8k|#define INIT_ATTS_SIZE 16
  ------------------
 1006|  19.8k|  parser->m_atts
 1007|  19.8k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  713|  19.8k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1008|  19.8k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 19.8k]
  ------------------
 1009|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1010|      0|    return NULL;
 1011|      0|  }
 1012|       |#ifdef XML_ATTR_INFO
 1013|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1014|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1015|       |  if (parser->m_attInfo == NULL) {
 1016|       |    FREE(parser, parser->m_atts);
 1017|       |    FREE(parser, parser);
 1018|       |    return NULL;
 1019|       |  }
 1020|       |#endif
 1021|  19.8k|  parser->m_dataBuf
 1022|  19.8k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  713|  19.8k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1023|  19.8k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 19.8k]
  ------------------
 1024|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1025|       |#ifdef XML_ATTR_INFO
 1026|       |    FREE(parser, parser->m_attInfo);
 1027|       |#endif
 1028|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1029|      0|    return NULL;
 1030|      0|  }
 1031|  19.8k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  242|  19.8k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1032|       |
 1033|  19.8k|  if (dtd)
  ------------------
  |  Branch (1033:7): [True: 0, False: 19.8k]
  ------------------
 1034|      0|    parser->m_dtd = dtd;
 1035|  19.8k|  else {
 1036|  19.8k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1037|  19.8k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 19.8k]
  ------------------
 1038|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1039|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|       |#ifdef XML_ATTR_INFO
 1041|       |      FREE(parser, parser->m_attInfo);
 1042|       |#endif
 1043|      0|      FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1044|      0|      return NULL;
 1045|      0|    }
 1046|  19.8k|  }
 1047|       |
 1048|  19.8k|  parser->m_freeBindingList = NULL;
 1049|  19.8k|  parser->m_freeTagList = NULL;
 1050|  19.8k|  parser->m_freeInternalEntities = NULL;
 1051|       |
 1052|  19.8k|  parser->m_groupSize = 0;
 1053|  19.8k|  parser->m_groupConnector = NULL;
 1054|       |
 1055|  19.8k|  parser->m_unknownEncodingHandler = NULL;
 1056|  19.8k|  parser->m_unknownEncodingHandlerData = NULL;
 1057|       |
 1058|  19.8k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.8k|#define ASCII_EXCL 0x21
  ------------------
 1059|  19.8k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1060|  19.8k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|       |
 1062|  19.8k|  parser->m_nsAtts = NULL;
 1063|  19.8k|  parser->m_nsAttsVersion = 0;
 1064|  19.8k|  parser->m_nsAttsPower = 0;
 1065|       |
 1066|  19.8k|  parser->m_protocolEncodingName = NULL;
 1067|       |
 1068|  19.8k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1069|  19.8k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1070|  19.8k|  parserInit(parser, encodingName);
 1071|       |
 1072|  19.8k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1072:7): [True: 19.8k, False: 0]
  |  Branch (1072:23): [True: 0, False: 19.8k]
  ------------------
 1073|      0|    if (dtd) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 0]
  ------------------
 1074|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1075|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1076|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1077|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1078|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1079|      0|      parser->m_dtd = NULL;
 1080|      0|    }
 1081|      0|    XML_ParserFree(parser);
 1082|      0|    return NULL;
 1083|      0|  }
 1084|       |
 1085|  19.8k|  if (nameSep) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 19.8k]
  ------------------
 1086|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1087|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  162|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1088|      0|    parser->m_namespaceSeparator = *nameSep;
 1089|  19.8k|  } else {
 1090|  19.8k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  161|  19.8k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1091|  19.8k|  }
 1092|       |
 1093|  19.8k|  return parser;
 1094|  19.8k|}
xmlparse.c:dtdCreate:
 6715|  19.8k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6716|  19.8k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6717|  19.8k|  if (p == NULL)
  ------------------
  |  Branch (6717:7): [True: 0, False: 19.8k]
  ------------------
 6718|      0|    return p;
 6719|  19.8k|  poolInit(&(p->pool), ms);
 6720|  19.8k|  poolInit(&(p->entityValuePool), ms);
 6721|  19.8k|  hashTableInit(&(p->generalEntities), ms);
 6722|  19.8k|  hashTableInit(&(p->elementTypes), ms);
 6723|  19.8k|  hashTableInit(&(p->attributeIds), ms);
 6724|  19.8k|  hashTableInit(&(p->prefixes), ms);
 6725|  19.8k|#ifdef XML_DTD
 6726|  19.8k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6727|  19.8k|  hashTableInit(&(p->paramEntities), ms);
 6728|  19.8k|#endif /* XML_DTD */
 6729|  19.8k|  p->defaultPrefix.name = NULL;
 6730|  19.8k|  p->defaultPrefix.binding = NULL;
 6731|       |
 6732|  19.8k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6733|  19.8k|  p->scaffIndex = NULL;
 6734|  19.8k|  p->scaffold = NULL;
 6735|  19.8k|  p->scaffLevel = 0;
 6736|  19.8k|  p->scaffSize = 0;
 6737|  19.8k|  p->scaffCount = 0;
 6738|  19.8k|  p->contentStringLen = 0;
 6739|       |
 6740|  19.8k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6741|  19.8k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6742|  19.8k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.8k|  return p;
 6744|  19.8k|}
xmlparse.c:hashTableInit:
 7149|  99.3k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7150|  99.3k|  p->power = 0;
 7151|  99.3k|  p->size = 0;
 7152|  99.3k|  p->used = 0;
 7153|  99.3k|  p->v = NULL;
 7154|  99.3k|  p->mem = ms;
 7155|  99.3k|}
xmlparse.c:poolInit:
 7174|  79.4k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7175|  79.4k|  pool->blocks = NULL;
 7176|  79.4k|  pool->freeBlocks = NULL;
 7177|  79.4k|  pool->start = NULL;
 7178|  79.4k|  pool->ptr = NULL;
 7179|  79.4k|  pool->end = NULL;
 7180|  79.4k|  pool->mem = ms;
 7181|  79.4k|}
xmlparse.c:parserInit:
 1097|  19.8k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1098|  19.8k|  parser->m_processor = prologInitProcessor;
 1099|  19.8k|  XmlPrologStateInit(&parser->m_prologState);
 1100|  19.8k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1100:7): [True: 19.8k, False: 0]
  ------------------
 1101|  19.8k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1102|  19.8k|  }
 1103|  19.8k|  parser->m_curBase = NULL;
 1104|  19.8k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1105|  19.8k|  parser->m_userData = NULL;
 1106|  19.8k|  parser->m_handlerArg = NULL;
 1107|  19.8k|  parser->m_startElementHandler = NULL;
 1108|  19.8k|  parser->m_endElementHandler = NULL;
 1109|  19.8k|  parser->m_characterDataHandler = NULL;
 1110|  19.8k|  parser->m_processingInstructionHandler = NULL;
 1111|  19.8k|  parser->m_commentHandler = NULL;
 1112|  19.8k|  parser->m_startCdataSectionHandler = NULL;
 1113|  19.8k|  parser->m_endCdataSectionHandler = NULL;
 1114|  19.8k|  parser->m_defaultHandler = NULL;
 1115|  19.8k|  parser->m_startDoctypeDeclHandler = NULL;
 1116|  19.8k|  parser->m_endDoctypeDeclHandler = NULL;
 1117|  19.8k|  parser->m_unparsedEntityDeclHandler = NULL;
 1118|  19.8k|  parser->m_notationDeclHandler = NULL;
 1119|  19.8k|  parser->m_startNamespaceDeclHandler = NULL;
 1120|  19.8k|  parser->m_endNamespaceDeclHandler = NULL;
 1121|  19.8k|  parser->m_notStandaloneHandler = NULL;
 1122|  19.8k|  parser->m_externalEntityRefHandler = NULL;
 1123|  19.8k|  parser->m_externalEntityRefHandlerArg = parser;
 1124|  19.8k|  parser->m_skippedEntityHandler = NULL;
 1125|  19.8k|  parser->m_elementDeclHandler = NULL;
 1126|  19.8k|  parser->m_attlistDeclHandler = NULL;
 1127|  19.8k|  parser->m_entityDeclHandler = NULL;
 1128|  19.8k|  parser->m_xmlDeclHandler = NULL;
 1129|  19.8k|  parser->m_bufferPtr = parser->m_buffer;
 1130|  19.8k|  parser->m_bufferEnd = parser->m_buffer;
 1131|  19.8k|  parser->m_parseEndByteIndex = 0;
 1132|  19.8k|  parser->m_parseEndPtr = NULL;
 1133|  19.8k|  parser->m_declElementType = NULL;
 1134|  19.8k|  parser->m_declAttributeId = NULL;
 1135|  19.8k|  parser->m_declEntity = NULL;
 1136|  19.8k|  parser->m_doctypeName = NULL;
 1137|  19.8k|  parser->m_doctypeSysid = NULL;
 1138|  19.8k|  parser->m_doctypePubid = NULL;
 1139|  19.8k|  parser->m_declAttributeType = NULL;
 1140|  19.8k|  parser->m_declNotationName = NULL;
 1141|  19.8k|  parser->m_declNotationPublicId = NULL;
 1142|  19.8k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1143|  19.8k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.8k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1145|  19.8k|  parser->m_errorCode = XML_ERROR_NONE;
 1146|  19.8k|  parser->m_eventPtr = NULL;
 1147|  19.8k|  parser->m_eventEndPtr = NULL;
 1148|  19.8k|  parser->m_positionPtr = NULL;
 1149|  19.8k|  parser->m_openInternalEntities = NULL;
 1150|  19.8k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1151|  19.8k|  parser->m_tagLevel = 0;
 1152|  19.8k|  parser->m_tagStack = NULL;
 1153|  19.8k|  parser->m_inheritedBindings = NULL;
 1154|  19.8k|  parser->m_nSpecifiedAtts = 0;
 1155|  19.8k|  parser->m_unknownEncodingMem = NULL;
 1156|  19.8k|  parser->m_unknownEncodingRelease = NULL;
 1157|  19.8k|  parser->m_unknownEncodingData = NULL;
 1158|  19.8k|  parser->m_parentParser = NULL;
 1159|  19.8k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1160|  19.8k|#ifdef XML_DTD
 1161|  19.8k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1162|  19.8k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.8k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1164|  19.8k|#endif
 1165|  19.8k|  parser->m_hash_secret_salt = 0;
 1166|       |
 1167|  19.8k|#ifdef XML_DTD
 1168|  19.8k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1169|  19.8k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1170|  19.8k|  parser->m_accounting.maximumAmplificationFactor
 1171|  19.8k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.8k|  100.0f
  ------------------
 1172|  19.8k|  parser->m_accounting.activationThresholdBytes
 1173|  19.8k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.8k|  8388608 // 8 MiB, 2^23
  ------------------
 1174|       |
 1175|  19.8k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1176|  19.8k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1177|  19.8k|#endif
 1178|  19.8k|}
xmlparse.c:prologInitProcessor:
 4405|  19.8k|                    const char **nextPtr) {
 4406|  19.8k|  enum XML_Error result = initializeEncoding(parser);
 4407|  19.8k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4407:7): [True: 0, False: 19.8k]
  ------------------
 4408|      0|    return result;
 4409|  19.8k|  parser->m_processor = prologProcessor;
 4410|  19.8k|  return prologProcessor(parser, s, end, nextPtr);
 4411|  19.8k|}
xmlparse.c:initializeEncoding:
 4248|  19.8k|initializeEncoding(XML_Parser parser) {
 4249|  19.8k|  const char *s;
 4250|       |#ifdef XML_UNICODE
 4251|       |  char encodingBuf[128];
 4252|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4253|       |  if (! parser->m_protocolEncodingName)
 4254|       |    s = NULL;
 4255|       |  else {
 4256|       |    int i;
 4257|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4258|       |      if (i == sizeof(encodingBuf) - 1
 4259|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4260|       |        encodingBuf[0] = '\0';
 4261|       |        break;
 4262|       |      }
 4263|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4264|       |    }
 4265|       |    encodingBuf[i] = '\0';
 4266|       |    s = encodingBuf;
 4267|       |  }
 4268|       |#else
 4269|  19.8k|  s = parser->m_protocolEncodingName;
 4270|  19.8k|#endif
 4271|  19.8k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4271:7): [True: 19.8k, False: 0]
  |  Branch (4271:8): [True: 0, False: 19.8k]
  ------------------
 4272|  19.8k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4273|  19.8k|    return XML_ERROR_NONE;
 4274|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4275|  19.8k|}
xmlparse.c:prologProcessor:
 4605|  19.8k|                const char **nextPtr) {
 4606|  19.8k|  const char *next = s;
 4607|  19.8k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.8k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.8k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4608|  19.8k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4609|  19.8k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4610|  19.8k|                  XML_ACCOUNT_DIRECT);
 4611|  19.8k|}
xmlparse.c:doProlog:
 4616|  19.8k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4617|  19.8k|#ifdef XML_DTD
 4618|  19.8k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.8k|#define ASCII_HASH 0x23
  ------------------
 4619|  19.8k|#endif /* XML_DTD */
 4620|  19.8k|  static const XML_Char atypeCDATA[]
 4621|  19.8k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.8k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.8k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.8k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.8k|#define ASCII_A 0x41
  ------------------
 4622|  19.8k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.8k|#define ASCII_D 0x44
  ------------------
 4623|  19.8k|  static const XML_Char atypeIDREF[]
 4624|  19.8k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.8k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.8k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.8k|#define ASCII_F 0x46
  ------------------
 4625|  19.8k|  static const XML_Char atypeIDREFS[]
 4626|  19.8k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.8k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.8k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.8k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.8k|#define ASCII_S 0x53
  ------------------
 4627|  19.8k|  static const XML_Char atypeENTITY[]
 4628|  19.8k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.8k|#define ASCII_Y 0x59
  ------------------
 4629|  19.8k|  static const XML_Char atypeENTITIES[]
 4630|  19.8k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
 4631|  19.8k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.8k|#define ASCII_S 0x53
  ------------------
 4632|  19.8k|  static const XML_Char atypeNMTOKEN[]
 4633|  19.8k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.8k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.8k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.8k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
 4634|  19.8k|  static const XML_Char atypeNMTOKENS[]
 4635|  19.8k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.8k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.8k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.8k|#define ASCII_K 0x4B
  ------------------
 4636|  19.8k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.8k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.8k|#define ASCII_S 0x53
  ------------------
 4637|  19.8k|  static const XML_Char notationPrefix[]
 4638|  19.8k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.8k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.8k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.8k|#define ASCII_T 0x54
  ------------------
 4639|  19.8k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.8k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.8k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.8k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.8k|#define ASCII_LPAREN 0x28
  ------------------
 4640|  19.8k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.8k|#define ASCII_PIPE 0x7C
  ------------------
 4641|  19.8k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.8k|#define ASCII_LPAREN 0x28
  ------------------
 4642|       |
 4643|       |#ifndef XML_DTD
 4644|       |  UNUSED_P(account);
 4645|       |#endif
 4646|       |
 4647|       |  /* save one level of indirection */
 4648|  19.8k|  DTD *const dtd = parser->m_dtd;
 4649|       |
 4650|  19.8k|  const char **eventPP;
 4651|  19.8k|  const char **eventEndPP;
 4652|  19.8k|  enum XML_Content_Quant quant;
 4653|       |
 4654|  19.8k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4654:7): [True: 19.8k, False: 0]
  ------------------
 4655|  19.8k|    eventPP = &parser->m_eventPtr;
 4656|  19.8k|    eventEndPP = &parser->m_eventEndPtr;
 4657|  19.8k|  } else {
 4658|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4659|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4660|      0|  }
 4661|       |
 4662|  5.22M|  for (;;) {
 4663|  5.22M|    int role;
 4664|  5.22M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  5.22M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4665|  5.22M|    *eventPP = s;
 4666|  5.22M|    *eventEndPP = next;
 4667|  5.22M|    if (tok <= 0) {
  ------------------
  |  Branch (4667:9): [True: 6.65k, False: 5.21M]
  ------------------
 4668|  6.65k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.65k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4668:11): [True: 6.65k, False: 0]
  |  Branch (4668:23): [True: 4.68k, False: 1.97k]
  ------------------
 4669|  4.68k|        *nextPtr = s;
 4670|  4.68k|        return XML_ERROR_NONE;
 4671|  4.68k|      }
 4672|  1.97k|      switch (tok) {
 4673|  1.97k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.97k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4673:7): [True: 1.97k, False: 0]
  ------------------
 4674|  1.97k|        *eventPP = next;
 4675|  1.97k|        return XML_ERROR_INVALID_TOKEN;
 4676|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4676:7): [True: 0, False: 1.97k]
  ------------------
 4677|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4678|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4678:7): [True: 0, False: 1.97k]
  ------------------
 4679|      0|        return XML_ERROR_PARTIAL_CHAR;
 4680|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4680:7): [True: 0, False: 1.97k]
  ------------------
 4681|      0|        tok = -tok;
 4682|      0|        break;
 4683|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4683:7): [True: 0, False: 1.97k]
  ------------------
 4684|      0|#ifdef XML_DTD
 4685|       |        /* for internal PE NOT referenced between declarations */
 4686|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4686:13): [True: 0, False: 0]
  ------------------
 4687|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4687:16): [True: 0, False: 0]
  ------------------
 4688|      0|          *nextPtr = s;
 4689|      0|          return XML_ERROR_NONE;
 4690|      0|        }
 4691|       |        /* WFC: PE Between Declarations - must check that PE contains
 4692|       |           complete markup, not only for external PEs, but also for
 4693|       |           internal PEs if the reference occurs between declarations.
 4694|       |        */
 4695|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4695:13): [True: 0, False: 0]
  |  Branch (4695:40): [True: 0, False: 0]
  ------------------
 4696|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4696:15): [True: 0, False: 0]
  ------------------
 4697|      0|              == XML_ROLE_ERROR)
 4698|      0|            return XML_ERROR_INCOMPLETE_PE;
 4699|      0|          *nextPtr = s;
 4700|      0|          return XML_ERROR_NONE;
 4701|      0|        }
 4702|      0|#endif /* XML_DTD */
 4703|      0|        return XML_ERROR_NO_ELEMENTS;
 4704|      0|      default:
  ------------------
  |  Branch (4704:7): [True: 0, False: 1.97k]
  ------------------
 4705|      0|        tok = -tok;
 4706|      0|        next = end;
 4707|      0|        break;
 4708|  1.97k|      }
 4709|  1.97k|    }
 4710|  5.21M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  5.21M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4711|  5.21M|#ifdef XML_DTD
 4712|  5.21M|    switch (role) {
 4713|  11.4k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4713:5): [True: 11.4k, False: 5.20M]
  ------------------
 4714|  11.7k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4714:5): [True: 344, False: 5.21M]
  ------------------
 4715|  11.7k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 0, False: 5.21M]
  ------------------
 4716|  11.7k|      break;
 4717|  5.20M|    default:
  ------------------
  |  Branch (4717:5): [True: 5.20M, False: 11.7k]
  ------------------
 4718|  5.20M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4718:11): [True: 1, False: 5.20M]
  ------------------
 4719|      1|        accountingOnAbort(parser);
 4720|      1|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4721|      1|      }
 4722|  5.21M|    }
 4723|  5.21M|#endif
 4724|  5.21M|    switch (role) {
  ------------------
  |  Branch (4724:13): [True: 0, False: 5.21M]
  ------------------
 4725|    344|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4725:5): [True: 344, False: 5.21M]
  ------------------
 4726|    344|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4727|    344|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4727:11): [True: 255, False: 89]
  ------------------
 4728|    255|        return result;
 4729|     89|      enc = parser->m_encoding;
 4730|     89|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     89|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4731|     89|    } break;
 4732|  6.00k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4732:5): [True: 6.00k, False: 5.21M]
  ------------------
 4733|  6.00k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4733:11): [True: 0, False: 6.00k]
  ------------------
 4734|      0|        parser->m_doctypeName
 4735|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4736|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4736:13): [True: 0, False: 0]
  ------------------
 4737|      0|          return XML_ERROR_NO_MEMORY;
 4738|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4739|      0|        parser->m_doctypePubid = NULL;
 4740|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4741|      0|      }
 4742|  6.00k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4743|  6.00k|      break;
 4744|  5.17k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4744:5): [True: 5.17k, False: 5.21M]
  ------------------
 4745|  5.17k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4745:11): [True: 0, False: 5.17k]
  ------------------
 4746|      0|        parser->m_startDoctypeDeclHandler(
 4747|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4748|      0|            parser->m_doctypePubid, 1);
 4749|      0|        parser->m_doctypeName = NULL;
 4750|      0|        poolClear(&parser->m_tempPool);
 4751|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4752|      0|      }
 4753|  5.17k|      break;
 4754|      0|#ifdef XML_DTD
 4755|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4755:5): [True: 0, False: 5.21M]
  ------------------
 4756|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4757|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4757:11): [True: 0, False: 0]
  ------------------
 4758|      0|        return result;
 4759|      0|      enc = parser->m_encoding;
 4760|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4761|      0|    } break;
 4762|      0|#endif /* XML_DTD */
 4763|    720|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4763:5): [True: 720, False: 5.21M]
  ------------------
 4764|    720|#ifdef XML_DTD
 4765|    720|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    720|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4766|    720|      parser->m_declEntity = (ENTITY *)lookup(
 4767|    720|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4768|    720|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4768:11): [True: 0, False: 720]
  ------------------
 4769|      0|        return XML_ERROR_NO_MEMORY;
 4770|    720|#endif /* XML_DTD */
 4771|    720|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    720|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4772|    720|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4772:11): [True: 0, False: 720]
  ------------------
 4773|      0|        XML_Char *pubId;
 4774|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4774:13): [True: 0, False: 0]
  ------------------
 4775|      0|          return XML_ERROR_PUBLICID;
 4776|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4777|      0|                                s + enc->minBytesPerChar,
 4778|      0|                                next - enc->minBytesPerChar);
 4779|      0|        if (! pubId)
  ------------------
  |  Branch (4779:13): [True: 0, False: 0]
  ------------------
 4780|      0|          return XML_ERROR_NO_MEMORY;
 4781|      0|        normalizePublicId(pubId);
 4782|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4783|      0|        parser->m_doctypePubid = pubId;
 4784|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4785|      0|        goto alreadyChecked;
 4786|      0|      }
 4787|       |      /* fall through */
 4788|  2.47k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4788:5): [True: 1.75k, False: 5.21M]
  ------------------
 4789|  2.47k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.47k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4789:11): [True: 84, False: 2.39k]
  ------------------
 4790|     84|        return XML_ERROR_PUBLICID;
 4791|  2.39k|    alreadyChecked:
 4792|  2.39k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4792:11): [True: 2.18k, False: 211]
  |  Branch (4792:34): [True: 833, False: 1.35k]
  ------------------
 4793|    833|        XML_Char *tem
 4794|    833|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4795|    833|                              next - enc->minBytesPerChar);
 4796|    833|        if (! tem)
  ------------------
  |  Branch (4796:13): [True: 0, False: 833]
  ------------------
 4797|      0|          return XML_ERROR_NO_MEMORY;
 4798|    833|        normalizePublicId(tem);
 4799|    833|        parser->m_declEntity->publicId = tem;
 4800|    833|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    833|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4801|       |        /* Don't suppress the default handler if we fell through from
 4802|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4803|       |         */
 4804|    833|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4804:13): [True: 0, False: 833]
  |  Branch (4804:44): [True: 0, False: 0]
  ------------------
 4805|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4806|    833|      }
 4807|  2.39k|      break;
 4808|  2.39k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4808:5): [True: 2.24k, False: 5.21M]
  ------------------
 4809|  2.24k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.24k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4809:11): [True: 0, False: 2.24k]
  ------------------
 4810|       |        /* Must not close doctype from within expanded parameter entities */
 4811|      0|        return XML_ERROR_INVALID_TOKEN;
 4812|      0|      }
 4813|       |
 4814|  2.24k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4814:11): [True: 0, False: 2.24k]
  ------------------
 4815|      0|        parser->m_startDoctypeDeclHandler(
 4816|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4817|      0|            parser->m_doctypePubid, 0);
 4818|      0|        poolClear(&parser->m_tempPool);
 4819|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4820|      0|      }
 4821|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4822|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4823|       |         was not set, indicating an external subset
 4824|       |      */
 4825|  2.24k|#ifdef XML_DTD
 4826|  2.24k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4826:11): [True: 11, False: 2.23k]
  |  Branch (4826:37): [True: 0, False: 2.23k]
  ------------------
 4827|     11|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4828|     11|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     11|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4829|     11|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4829:13): [True: 0, False: 11]
  ------------------
 4830|     11|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4830:16): [True: 0, False: 0]
  ------------------
 4831|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4832|      0|                                            externalSubsetName, sizeof(ENTITY));
 4833|      0|          if (! entity) {
  ------------------
  |  Branch (4833:15): [True: 0, False: 0]
  ------------------
 4834|       |            /* The external subset name "#" will have already been
 4835|       |             * inserted into the hash table at the start of the
 4836|       |             * external entity parsing, so no allocation will happen
 4837|       |             * and lookup() cannot fail.
 4838|       |             */
 4839|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4840|      0|          }
 4841|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4841:15): [True: 0, False: 0]
  ------------------
 4842|      0|            entity->base = parser->m_curBase;
 4843|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4844|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4844:15): [True: 0, False: 0]
  ------------------
 4845|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4846|      0|                  entity->systemId, entity->publicId))
 4847|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4848|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4848:15): [True: 0, False: 0]
  ------------------
 4849|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4849:17): [True: 0, False: 0]
  |  Branch (4849:38): [True: 0, False: 0]
  ------------------
 4850|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4850:20): [True: 0, False: 0]
  ------------------
 4851|      0|              return XML_ERROR_NOT_STANDALONE;
 4852|      0|          }
 4853|       |          /* if we didn't read the foreign DTD then this means that there
 4854|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4855|       |          */
 4856|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4856:20): [True: 0, False: 0]
  ------------------
 4857|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4858|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4859|      0|        }
 4860|     11|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     11|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4861|     11|      }
 4862|  2.24k|#endif /* XML_DTD */
 4863|  2.24k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4863:11): [True: 0, False: 2.24k]
  ------------------
 4864|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4865|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4866|      0|      }
 4867|  2.24k|      break;
 4868|  11.4k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4868:5): [True: 11.4k, False: 5.20M]
  ------------------
 4869|  11.4k|#ifdef XML_DTD
 4870|       |      /* if there is no DOCTYPE declaration then now is the
 4871|       |         last chance to read the foreign DTD
 4872|       |      */
 4873|  11.4k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4873:11): [True: 0, False: 11.4k]
  ------------------
 4874|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4875|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4876|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4876:13): [True: 0, False: 0]
  ------------------
 4877|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4877:16): [True: 0, False: 0]
  ------------------
 4878|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4879|      0|                                            externalSubsetName, sizeof(ENTITY));
 4880|      0|          if (! entity)
  ------------------
  |  Branch (4880:15): [True: 0, False: 0]
  ------------------
 4881|      0|            return XML_ERROR_NO_MEMORY;
 4882|      0|          entity->base = parser->m_curBase;
 4883|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4884|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4884:15): [True: 0, False: 0]
  ------------------
 4885|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4886|      0|                  entity->systemId, entity->publicId))
 4887|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4888|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4888:15): [True: 0, False: 0]
  ------------------
 4889|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4889:17): [True: 0, False: 0]
  |  Branch (4889:38): [True: 0, False: 0]
  ------------------
 4890|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4890:20): [True: 0, False: 0]
  ------------------
 4891|      0|              return XML_ERROR_NOT_STANDALONE;
 4892|      0|          }
 4893|       |          /* if we didn't read the foreign DTD then this means that there
 4894|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4895|       |          */
 4896|      0|          else
 4897|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4898|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4899|      0|        }
 4900|      0|      }
 4901|  11.4k|#endif /* XML_DTD */
 4902|  11.4k|      parser->m_processor = contentProcessor;
 4903|  11.4k|      return contentProcessor(parser, s, end, nextPtr);
 4904|  10.6k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4904:5): [True: 10.6k, False: 5.20M]
  ------------------
 4905|  10.6k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4906|  10.6k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4906:11): [True: 0, False: 10.6k]
  ------------------
 4907|      0|        return XML_ERROR_NO_MEMORY;
 4908|  10.6k|      goto checkAttListDeclHandler;
 4909|  34.4k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4909:5): [True: 34.4k, False: 5.18M]
  ------------------
 4910|  34.4k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4911|  34.4k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4911:11): [True: 0, False: 34.4k]
  ------------------
 4912|      0|        return XML_ERROR_NO_MEMORY;
 4913|  34.4k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  34.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4914|  34.4k|      parser->m_declAttributeType = NULL;
 4915|  34.4k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  34.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4916|  34.4k|      goto checkAttListDeclHandler;
 4917|    284|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4917:5): [True: 284, False: 5.21M]
  ------------------
 4918|    284|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    284|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4919|    284|      parser->m_declAttributeType = atypeCDATA;
 4920|    284|      goto checkAttListDeclHandler;
 4921|  7.76k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4921:5): [True: 7.76k, False: 5.20M]
  ------------------
 4922|  7.76k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  7.76k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4923|  7.76k|      parser->m_declAttributeType = atypeID;
 4924|  7.76k|      goto checkAttListDeclHandler;
 4925|    682|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4925:5): [True: 682, False: 5.21M]
  ------------------
 4926|    682|      parser->m_declAttributeType = atypeIDREF;
 4927|    682|      goto checkAttListDeclHandler;
 4928|    368|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4928:5): [True: 368, False: 5.21M]
  ------------------
 4929|    368|      parser->m_declAttributeType = atypeIDREFS;
 4930|    368|      goto checkAttListDeclHandler;
 4931|    558|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4931:5): [True: 558, False: 5.21M]
  ------------------
 4932|    558|      parser->m_declAttributeType = atypeENTITY;
 4933|    558|      goto checkAttListDeclHandler;
 4934|  1.00k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4934:5): [True: 1.00k, False: 5.21M]
  ------------------
 4935|  1.00k|      parser->m_declAttributeType = atypeENTITIES;
 4936|  1.00k|      goto checkAttListDeclHandler;
 4937|    261|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4937:5): [True: 261, False: 5.21M]
  ------------------
 4938|    261|      parser->m_declAttributeType = atypeNMTOKEN;
 4939|    261|      goto checkAttListDeclHandler;
 4940|    220|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4940:5): [True: 220, False: 5.21M]
  ------------------
 4941|    220|      parser->m_declAttributeType = atypeNMTOKENS;
 4942|  56.2k|    checkAttListDeclHandler:
 4943|  56.2k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4943:11): [True: 54.8k, False: 1.43k]
  |  Branch (4943:34): [True: 0, False: 54.8k]
  ------------------
 4944|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4945|  56.2k|      break;
 4946|  27.7k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4946:5): [True: 27.7k, False: 5.18M]
  ------------------
 4947|  28.7k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4947:5): [True: 985, False: 5.21M]
  ------------------
 4948|  28.7k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4948:11): [True: 27.9k, False: 855]
  |  Branch (4948:34): [True: 0, False: 27.9k]
  ------------------
 4949|      0|        const XML_Char *prefix;
 4950|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4950:13): [True: 0, False: 0]
  ------------------
 4951|      0|          prefix = enumValueSep;
 4952|      0|        } else {
 4953|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4953:21): [True: 0, False: 0]
  ------------------
 4954|      0|                                                              : enumValueStart);
 4955|      0|        }
 4956|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4956:13): [True: 0, False: 0]
  ------------------
 4957|      0|          return XML_ERROR_NO_MEMORY;
 4958|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4958:13): [True: 0, False: 0]
  ------------------
 4959|      0|          return XML_ERROR_NO_MEMORY;
 4960|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4961|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4962|      0|      }
 4963|  28.7k|      break;
 4964|  28.7k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4964:5): [True: 22.8k, False: 5.19M]
  ------------------
 4965|  24.2k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 1.39k, False: 5.21M]
  ------------------
 4966|  24.2k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4966:11): [True: 23.8k, False: 413]
  ------------------
 4967|  23.8k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4967:13): [True: 0, False: 23.8k]
  ------------------
 4968|  23.8k|                              parser->m_declAttributeId,
 4969|  23.8k|                              parser->m_declAttributeIsCdata,
 4970|  23.8k|                              parser->m_declAttributeIsId, 0, parser))
 4971|      0|          return XML_ERROR_NO_MEMORY;
 4972|  23.8k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4972:13): [True: 0, False: 23.8k]
  |  Branch (4972:45): [True: 0, False: 0]
  ------------------
 4973|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4973:15): [True: 0, False: 0]
  ------------------
 4974|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:19): [True: 0, False: 0]
  ------------------
 4975|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:22): [True: 0, False: 0]
  ------------------
 4976|       |            /* Enumerated or Notation type */
 4977|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4977:17): [True: 0, False: 0]
  ------------------
 4978|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:20): [True: 0, False: 0]
  ------------------
 4979|      0|              return XML_ERROR_NO_MEMORY;
 4980|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4981|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4982|      0|          }
 4983|      0|          *eventEndPP = s;
 4984|      0|          parser->m_attlistDeclHandler(
 4985|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4986|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4987|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4988|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4989|      0|        }
 4990|  23.8k|      }
 4991|  24.2k|      poolClear(&parser->m_tempPool);
 4992|  24.2k|      break;
 4993|  7.58k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4993:5): [True: 7.58k, False: 5.20M]
  ------------------
 4994|  9.73k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 2.14k, False: 5.21M]
  ------------------
 4995|  9.73k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4995:11): [True: 9.25k, False: 476]
  ------------------
 4996|  9.25k|        const XML_Char *attVal;
 4997|  9.25k|        enum XML_Error result = storeAttributeValue(
 4998|  9.25k|            parser, enc, parser->m_declAttributeIsCdata,
 4999|  9.25k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5000|  9.25k|            XML_ACCOUNT_NONE);
 5001|  9.25k|        if (result)
  ------------------
  |  Branch (5001:13): [True: 14, False: 9.24k]
  ------------------
 5002|     14|          return result;
 5003|  9.24k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  595|  9.24k|#define poolStart(pool) ((pool)->start)
  ------------------
 5004|  9.24k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  9.24k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5005|       |        /* ID attributes aren't allowed to have a default */
 5006|  9.24k|        if (! defineAttribute(
  ------------------
  |  Branch (5006:13): [True: 0, False: 9.24k]
  ------------------
 5007|  9.24k|                parser->m_declElementType, parser->m_declAttributeId,
 5008|  9.24k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  9.24k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5009|      0|          return XML_ERROR_NO_MEMORY;
 5010|  9.24k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 9.24k]
  |  Branch (5010:45): [True: 0, False: 0]
  ------------------
 5011|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5011:15): [True: 0, False: 0]
  ------------------
 5012|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:19): [True: 0, False: 0]
  ------------------
 5013|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:22): [True: 0, False: 0]
  ------------------
 5014|       |            /* Enumerated or Notation type */
 5015|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5015:17): [True: 0, False: 0]
  ------------------
 5016|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:20): [True: 0, False: 0]
  ------------------
 5017|      0|              return XML_ERROR_NO_MEMORY;
 5018|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5019|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5020|      0|          }
 5021|      0|          *eventEndPP = s;
 5022|      0|          parser->m_attlistDeclHandler(
 5023|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5024|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5025|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5026|      0|          poolClear(&parser->m_tempPool);
 5027|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5028|      0|        }
 5029|  9.24k|      }
 5030|  9.71k|      break;
 5031|  9.71k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5031:5): [True: 8.45k, False: 5.20M]
  ------------------
 5032|  8.45k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5032:11): [True: 7.97k, False: 483]
  ------------------
 5033|  7.97k|        enum XML_Error result
 5034|  7.97k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5035|  7.97k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5036|  7.97k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5036:13): [True: 4.08k, False: 3.88k]
  ------------------
 5037|  4.08k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  595|  4.08k|#define poolStart(pool) ((pool)->start)
  ------------------
 5038|  4.08k|          parser->m_declEntity->textLen
 5039|  4.08k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  596|  4.08k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5040|  4.08k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  600|  4.08k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5041|  4.08k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5041:15): [True: 0, False: 4.08k]
  ------------------
 5042|      0|            *eventEndPP = s;
 5043|      0|            parser->m_entityDeclHandler(
 5044|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5045|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5046|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5047|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5048|      0|          }
 5049|  4.08k|        } else
 5050|  3.88k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  599|  3.88k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5051|  7.97k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5051:13): [True: 66, False: 7.90k]
  ------------------
 5052|     66|          return result;
 5053|  7.97k|      }
 5054|  8.38k|      break;
 5055|  8.38k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5055:5): [True: 49, False: 5.21M]
  ------------------
 5056|     49|#ifdef XML_DTD
 5057|     49|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     49|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5058|     49|#endif /* XML_DTD */
 5059|     49|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     49|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5060|     49|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5060:11): [True: 0, False: 49]
  ------------------
 5061|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5062|      0|                                                 s + enc->minBytesPerChar,
 5063|      0|                                                 next - enc->minBytesPerChar);
 5064|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5064:13): [True: 0, False: 0]
  ------------------
 5065|      0|          return XML_ERROR_NO_MEMORY;
 5066|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5067|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5068|      0|      }
 5069|     49|#ifdef XML_DTD
 5070|     49|      else
 5071|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5072|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5073|     49|        parser->m_doctypeSysid = externalSubsetName;
 5074|     49|#endif /* XML_DTD */
 5075|     49|      if (! dtd->standalone
  ------------------
  |  Branch (5075:11): [True: 48, False: 1]
  ------------------
 5076|     49|#ifdef XML_DTD
 5077|     49|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5077:14): [True: 48, False: 0]
  ------------------
 5078|     49|#endif /* XML_DTD */
 5079|     49|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5079:14): [True: 0, False: 48]
  ------------------
 5080|     49|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5080:14): [True: 0, False: 0]
  ------------------
 5081|      0|        return XML_ERROR_NOT_STANDALONE;
 5082|       |#ifndef XML_DTD
 5083|       |      break;
 5084|       |#else  /* XML_DTD */
 5085|     49|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5085:11): [True: 7, False: 42]
  ------------------
 5086|      7|        parser->m_declEntity = (ENTITY *)lookup(
 5087|      7|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5088|      7|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5088:13): [True: 0, False: 7]
  ------------------
 5089|      0|          return XML_ERROR_NO_MEMORY;
 5090|      7|        parser->m_declEntity->publicId = NULL;
 5091|      7|      }
 5092|     49|#endif /* XML_DTD */
 5093|       |      /* fall through */
 5094|  3.72k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5094:5): [True: 3.67k, False: 5.21M]
  ------------------
 5095|  3.72k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5095:11): [True: 3.18k, False: 542]
  |  Branch (5095:34): [True: 475, False: 2.70k]
  ------------------
 5096|    475|        parser->m_declEntity->systemId
 5097|    475|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5098|    475|                              next - enc->minBytesPerChar);
 5099|    475|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5099:13): [True: 0, False: 475]
  ------------------
 5100|      0|          return XML_ERROR_NO_MEMORY;
 5101|    475|        parser->m_declEntity->base = parser->m_curBase;
 5102|    475|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    475|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5103|       |        /* Don't suppress the default handler if we fell through from
 5104|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5105|       |         */
 5106|    475|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5106:13): [True: 0, False: 475]
  |  Branch (5106:44): [True: 0, False: 0]
  ------------------
 5107|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5108|    475|      }
 5109|  3.72k|      break;
 5110|  3.72k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5110:5): [True: 2.94k, False: 5.21M]
  ------------------
 5111|  2.94k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5111:11): [True: 2.47k, False: 475]
  |  Branch (5111:34): [True: 333, False: 2.13k]
  ------------------
 5112|  2.94k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5112:14): [True: 0, False: 333]
  ------------------
 5113|      0|        *eventEndPP = s;
 5114|      0|        parser->m_entityDeclHandler(
 5115|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5116|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5117|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5118|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5119|      0|      }
 5120|  2.94k|      break;
 5121|    701|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5121:5): [True: 701, False: 5.21M]
  ------------------
 5122|    701|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5122:11): [True: 635, False: 66]
  |  Branch (5122:34): [True: 76, False: 559]
  ------------------
 5123|     76|        parser->m_declEntity->notation
 5124|     76|            = poolStoreString(&dtd->pool, enc, s, next);
 5125|     76|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5125:13): [True: 0, False: 76]
  ------------------
 5126|      0|          return XML_ERROR_NO_MEMORY;
 5127|     76|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|     76|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5128|     76|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5128:13): [True: 0, False: 76]
  ------------------
 5129|      0|          *eventEndPP = s;
 5130|      0|          parser->m_unparsedEntityDeclHandler(
 5131|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5132|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5133|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5134|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5135|     76|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5135:20): [True: 0, False: 76]
  ------------------
 5136|      0|          *eventEndPP = s;
 5137|      0|          parser->m_entityDeclHandler(
 5138|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5139|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5140|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5141|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5142|      0|        }
 5143|     76|      }
 5144|    701|      break;
 5145|  8.59k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5145:5): [True: 8.59k, False: 5.20M]
  ------------------
 5146|  8.59k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  8.59k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 227, False: 8.37k]
  |  |  ------------------
  ------------------
 5147|    227|        parser->m_declEntity = NULL;
 5148|    227|        break;
 5149|    227|      }
 5150|  8.37k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5150:11): [True: 7.61k, False: 760]
  ------------------
 5151|  7.61k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5152|  7.61k|        if (! name)
  ------------------
  |  Branch (5152:13): [True: 0, False: 7.61k]
  ------------------
 5153|      0|          return XML_ERROR_NO_MEMORY;
 5154|  7.61k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5155|  7.61k|                                                name, sizeof(ENTITY));
 5156|  7.61k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5156:13): [True: 0, False: 7.61k]
  ------------------
 5157|      0|          return XML_ERROR_NO_MEMORY;
 5158|  7.61k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5158:13): [True: 3.35k, False: 4.25k]
  ------------------
 5159|  3.35k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.35k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5160|  3.35k|          parser->m_declEntity = NULL;
 5161|  4.25k|        } else {
 5162|  4.25k|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|  4.25k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5163|  4.25k|          parser->m_declEntity->publicId = NULL;
 5164|  4.25k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  4.25k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5165|       |          /* if we have a parent parser or are reading an internal parameter
 5166|       |             entity, then the entity declaration is not considered "internal"
 5167|       |          */
 5168|  4.25k|          parser->m_declEntity->is_internal
 5169|  4.25k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5169:20): [True: 0, False: 4.25k]
  |  Branch (5169:46): [True: 0, False: 4.25k]
  ------------------
 5170|  4.25k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5170:15): [True: 0, False: 4.25k]
  ------------------
 5171|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5172|  4.25k|        }
 5173|  7.61k|      } else {
 5174|    760|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    760|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5175|    760|        parser->m_declEntity = NULL;
 5176|    760|      }
 5177|  8.37k|    } break;
 5178|  8.37k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5178:5): [True: 3.71k, False: 5.21M]
  ------------------
 5179|  3.71k|#ifdef XML_DTD
 5180|  3.71k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5180:11): [True: 3.42k, False: 288]
  ------------------
 5181|  3.42k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5182|  3.42k|        if (! name)
  ------------------
  |  Branch (5182:13): [True: 0, False: 3.42k]
  ------------------
 5183|      0|          return XML_ERROR_NO_MEMORY;
 5184|  3.42k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5185|  3.42k|                                                name, sizeof(ENTITY));
 5186|  3.42k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5186:13): [True: 0, False: 3.42k]
  ------------------
 5187|      0|          return XML_ERROR_NO_MEMORY;
 5188|  3.42k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5188:13): [True: 3.07k, False: 354]
  ------------------
 5189|  3.07k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.07k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5190|  3.07k|          parser->m_declEntity = NULL;
 5191|  3.07k|        } else {
 5192|    354|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|    354|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5193|    354|          parser->m_declEntity->publicId = NULL;
 5194|    354|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    354|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5195|       |          /* if we have a parent parser or are reading an internal parameter
 5196|       |             entity, then the entity declaration is not considered "internal"
 5197|       |          */
 5198|    354|          parser->m_declEntity->is_internal
 5199|    354|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5199:20): [True: 0, False: 354]
  |  Branch (5199:46): [True: 0, False: 354]
  ------------------
 5200|    354|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5200:15): [True: 0, False: 354]
  ------------------
 5201|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5202|    354|        }
 5203|  3.42k|      } else {
 5204|    288|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    288|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5205|    288|        parser->m_declEntity = NULL;
 5206|    288|      }
 5207|       |#else  /* not XML_DTD */
 5208|       |      parser->m_declEntity = NULL;
 5209|       |#endif /* XML_DTD */
 5210|  3.71k|      break;
 5211|  3.71k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5211:5): [True: 1.72k, False: 5.21M]
  ------------------
 5212|  1.72k|      parser->m_declNotationPublicId = NULL;
 5213|  1.72k|      parser->m_declNotationName = NULL;
 5214|  1.72k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5214:11): [True: 0, False: 1.72k]
  ------------------
 5215|      0|        parser->m_declNotationName
 5216|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5217|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5217:13): [True: 0, False: 0]
  ------------------
 5218|      0|          return XML_ERROR_NO_MEMORY;
 5219|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5220|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5221|      0|      }
 5222|  1.72k|      break;
 5223|  1.72k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5223:5): [True: 1.41k, False: 5.21M]
  ------------------
 5224|  1.41k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.41k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5224:11): [True: 1, False: 1.40k]
  ------------------
 5225|      1|        return XML_ERROR_PUBLICID;
 5226|  1.40k|      if (parser
  ------------------
  |  Branch (5226:11): [True: 0, False: 1.40k]
  ------------------
 5227|  1.40k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5228|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5229|      0|                                        s + enc->minBytesPerChar,
 5230|      0|                                        next - enc->minBytesPerChar);
 5231|      0|        if (! tem)
  ------------------
  |  Branch (5231:13): [True: 0, False: 0]
  ------------------
 5232|      0|          return XML_ERROR_NO_MEMORY;
 5233|      0|        normalizePublicId(tem);
 5234|      0|        parser->m_declNotationPublicId = tem;
 5235|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5236|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5237|      0|      }
 5238|  1.40k|      break;
 5239|  1.40k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5239:5): [True: 838, False: 5.21M]
  ------------------
 5240|    838|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5240:11): [True: 0, False: 838]
  |  Branch (5240:41): [True: 0, False: 0]
  ------------------
 5241|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5242|      0|                                                   s + enc->minBytesPerChar,
 5243|      0|                                                   next - enc->minBytesPerChar);
 5244|      0|        if (! systemId)
  ------------------
  |  Branch (5244:13): [True: 0, False: 0]
  ------------------
 5245|      0|          return XML_ERROR_NO_MEMORY;
 5246|      0|        *eventEndPP = s;
 5247|      0|        parser->m_notationDeclHandler(
 5248|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5249|      0|            systemId, parser->m_declNotationPublicId);
 5250|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5251|      0|      }
 5252|    838|      poolClear(&parser->m_tempPool);
 5253|    838|      break;
 5254|    842|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5254:5): [True: 842, False: 5.21M]
  ------------------
 5255|    842|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5255:11): [True: 0, False: 842]
  |  Branch (5255:45): [True: 0, False: 0]
  ------------------
 5256|      0|        *eventEndPP = s;
 5257|      0|        parser->m_notationDeclHandler(
 5258|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5259|      0|            0, parser->m_declNotationPublicId);
 5260|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5261|      0|      }
 5262|    842|      poolClear(&parser->m_tempPool);
 5263|    842|      break;
 5264|  1.36k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5264:5): [True: 1.36k, False: 5.21M]
  ------------------
 5265|  1.36k|      switch (tok) {
 5266|      4|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      4|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5266:7): [True: 4, False: 1.36k]
  ------------------
 5267|       |        /* PE references in internal subset are
 5268|       |           not allowed within declarations. */
 5269|      4|        return XML_ERROR_PARAM_ENTITY_REF;
 5270|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5270:7): [True: 1, False: 1.36k]
  ------------------
 5271|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5272|  1.36k|      default:
  ------------------
  |  Branch (5272:7): [True: 1.36k, False: 5]
  ------------------
 5273|  1.36k|        return XML_ERROR_SYNTAX;
 5274|  1.36k|      }
 5275|      0|#ifdef XML_DTD
 5276|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5276:5): [True: 0, False: 5.21M]
  ------------------
 5277|      0|      enum XML_Error result;
 5278|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5278:11): [True: 0, False: 0]
  ------------------
 5279|      0|        reportDefault(parser, enc, s, next);
 5280|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5281|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5282|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5282:11): [True: 0, False: 0]
  ------------------
 5283|      0|        return result;
 5284|      0|      else if (! next) {
  ------------------
  |  Branch (5284:16): [True: 0, False: 0]
  ------------------
 5285|      0|        parser->m_processor = ignoreSectionProcessor;
 5286|      0|        return result;
 5287|      0|      }
 5288|      0|    } break;
 5289|      0|#endif /* XML_DTD */
 5290|  4.48M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5290:5): [True: 4.48M, False: 733k]
  ------------------
 5291|  4.48M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5291:11): [True: 1.27k, False: 4.48M]
  ------------------
 5292|  1.27k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5292:13): [True: 486, False: 784]
  ------------------
 5293|    486|          {
 5294|       |            /* Detect and prevent integer overflow */
 5295|    486|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5295:17): [True: 0, False: 486]
  ------------------
 5296|      0|              return XML_ERROR_NO_MEMORY;
 5297|      0|            }
 5298|       |
 5299|    486|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  714|    486|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5300|    486|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5301|    486|            if (new_connector == NULL) {
  ------------------
  |  Branch (5301:17): [True: 0, False: 486]
  ------------------
 5302|      0|              parser->m_groupSize /= 2;
 5303|      0|              return XML_ERROR_NO_MEMORY;
 5304|      0|            }
 5305|    486|            parser->m_groupConnector = new_connector;
 5306|    486|          }
 5307|       |
 5308|    486|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5308:15): [True: 0, False: 486]
  ------------------
 5309|       |            /* Detect and prevent integer overflow.
 5310|       |             * The preprocessor guard addresses the "always false" warning
 5311|       |             * from -Wtype-limits on platforms where
 5312|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5313|       |#if UINT_MAX >= SIZE_MAX
 5314|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5315|       |              return XML_ERROR_NO_MEMORY;
 5316|       |            }
 5317|       |#endif
 5318|       |
 5319|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5320|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5321|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5321:17): [True: 0, False: 0]
  ------------------
 5322|      0|              return XML_ERROR_NO_MEMORY;
 5323|      0|            dtd->scaffIndex = new_scaff_index;
 5324|      0|          }
 5325|    784|        } else {
 5326|    784|          parser->m_groupConnector
 5327|    784|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  713|    784|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5328|    784|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5328:15): [True: 0, False: 784]
  ------------------
 5329|      0|            parser->m_groupSize = 0;
 5330|      0|            return XML_ERROR_NO_MEMORY;
 5331|      0|          }
 5332|    784|        }
 5333|  1.27k|      }
 5334|  4.48M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5335|  4.48M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5335:11): [True: 0, False: 4.48M]
  ------------------
 5336|      0|        int myindex = nextScaffoldPart(parser);
 5337|      0|        if (myindex < 0)
  ------------------
  |  Branch (5337:13): [True: 0, False: 0]
  ------------------
 5338|      0|          return XML_ERROR_NO_MEMORY;
 5339|      0|        assert(dtd->scaffIndex != NULL);
 5340|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5341|      0|        dtd->scaffLevel++;
 5342|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5343|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5343:13): [True: 0, False: 0]
  ------------------
 5344|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5345|      0|      }
 5346|  4.48M|      break;
 5347|  4.48M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5347:5): [True: 5.76k, False: 5.21M]
  ------------------
 5348|  5.76k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  5.76k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5348:11): [True: 1, False: 5.76k]
  ------------------
 5349|      1|        return XML_ERROR_SYNTAX;
 5350|  5.76k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  5.76k|#define ASCII_COMMA 0x2C
  ------------------
 5351|  5.76k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5351:11): [True: 0, False: 5.76k]
  |  Branch (5351:29): [True: 0, False: 0]
  ------------------
 5352|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5353|  5.76k|      break;
 5354|  11.8k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5354:5): [True: 11.8k, False: 5.20M]
  ------------------
 5355|  11.8k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  11.8k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5355:11): [True: 1, False: 11.8k]
  ------------------
 5356|      1|        return XML_ERROR_SYNTAX;
 5357|  11.8k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5357:11): [True: 0, False: 11.8k]
  ------------------
 5358|  11.8k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5358:14): [True: 0, False: 0]
  ------------------
 5359|  11.8k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|      0|              != XML_CTYPE_MIXED)) {
 5361|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5362|      0|            = XML_CTYPE_CHOICE;
 5363|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5363:13): [True: 0, False: 0]
  ------------------
 5364|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5365|      0|      }
 5366|  11.8k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  11.8k|#define ASCII_PIPE 0x7C
  ------------------
 5367|  11.8k|      break;
 5368|  4.19k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5368:5): [True: 4.19k, False: 5.21M]
  ------------------
 5369|  4.19k|#ifdef XML_DTD
 5370|  4.19k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5370:5): [True: 0, False: 5.21M]
  ------------------
 5371|  4.19k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  4.19k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5372|  4.19k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5372:11): [True: 4.19k, False: 0]
  ------------------
 5373|  4.19k|        dtd->keepProcessing = dtd->standalone;
 5374|      0|      else {
 5375|      0|        const XML_Char *name;
 5376|      0|        ENTITY *entity;
 5377|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5378|      0|                               next - enc->minBytesPerChar);
 5379|      0|        if (! name)
  ------------------
  |  Branch (5379:13): [True: 0, False: 0]
  ------------------
 5380|      0|          return XML_ERROR_NO_MEMORY;
 5381|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5382|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5383|       |        /* first, determine if a check for an existing declaration is needed;
 5384|       |           if yes, check that the entity exists, and that it is internal,
 5385|       |           otherwise call the skipped entity handler
 5386|       |        */
 5387|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5387:13): [True: 0, False: 0]
  ------------------
 5388|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5388:16): [True: 0, False: 0]
  |  Branch (5388:17): [True: 0, False: 0]
  ------------------
 5389|      0|                                : ! dtd->hasParamEntityRefs)) {
 5390|      0|          if (! entity)
  ------------------
  |  Branch (5390:15): [True: 0, False: 0]
  ------------------
 5391|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5392|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5392:20): [True: 0, False: 0]
  ------------------
 5393|       |            /* It's hard to exhaustively search the code to be sure,
 5394|       |             * but there doesn't seem to be a way of executing the
 5395|       |             * following line.  There are two cases:
 5396|       |             *
 5397|       |             * If 'standalone' is false, the DTD must have no
 5398|       |             * parameter entities or we wouldn't have passed the outer
 5399|       |             * 'if' statement.  That means the only entity in the hash
 5400|       |             * table is the external subset name "#" which cannot be
 5401|       |             * given as a parameter entity name in XML syntax, so the
 5402|       |             * lookup must have returned NULL and we don't even reach
 5403|       |             * the test for an internal entity.
 5404|       |             *
 5405|       |             * If 'standalone' is true, it does not seem to be
 5406|       |             * possible to create entities taking this code path that
 5407|       |             * are not internal entities, so fail the test above.
 5408|       |             *
 5409|       |             * Because this analysis is very uncertain, the code is
 5410|       |             * being left in place and merely removed from the
 5411|       |             * coverage test statistics.
 5412|       |             */
 5413|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5414|      0|          }
 5415|      0|        } else if (! entity) {
  ------------------
  |  Branch (5415:20): [True: 0, False: 0]
  ------------------
 5416|      0|          dtd->keepProcessing = dtd->standalone;
 5417|       |          /* cannot report skipped entities in declarations */
 5418|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5418:15): [True: 0, False: 0]
  ------------------
 5419|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5419:18): [True: 0, False: 0]
  ------------------
 5420|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5421|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5422|      0|          }
 5423|      0|          break;
 5424|      0|        }
 5425|      0|        if (entity->open)
  ------------------
  |  Branch (5425:13): [True: 0, False: 0]
  ------------------
 5426|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5427|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5427:13): [True: 0, False: 0]
  ------------------
 5428|      0|          enum XML_Error result;
 5429|      0|          XML_Bool betweenDecl
 5430|      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 (5430:18): [True: 0, False: 0]
  ------------------
 5431|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5432|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5432:15): [True: 0, False: 0]
  ------------------
 5433|      0|            return result;
 5434|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5435|      0|          break;
 5436|      0|        }
 5437|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5437:13): [True: 0, False: 0]
  ------------------
 5438|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5439|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5440|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5441|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5441:15): [True: 0, False: 0]
  ------------------
 5442|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5443|      0|                  entity->systemId, entity->publicId)) {
 5444|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5445|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5446|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5447|      0|          }
 5448|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5449|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5450|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5451:15): [True: 0, False: 0]
  ------------------
 5452|      0|            dtd->keepProcessing = dtd->standalone;
 5453|      0|            break;
 5454|      0|          }
 5455|      0|        } else {
 5456|      0|          dtd->keepProcessing = dtd->standalone;
 5457|      0|          break;
 5458|      0|        }
 5459|      0|      }
 5460|  4.19k|#endif /* XML_DTD */
 5461|  4.19k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5461:11): [True: 3.99k, False: 202]
  |  Branch (5461:32): [True: 0, False: 3.99k]
  ------------------
 5462|  4.19k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5462:14): [True: 0, False: 0]
  ------------------
 5463|      0|        return XML_ERROR_NOT_STANDALONE;
 5464|  4.19k|      break;
 5465|       |
 5466|       |      /* Element declaration stuff */
 5467|       |
 5468|  6.18k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5468:5): [True: 6.18k, False: 5.21M]
  ------------------
 5469|  6.18k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5469:11): [True: 0, False: 6.18k]
  ------------------
 5470|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5471|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          return XML_ERROR_NO_MEMORY;
 5473|      0|        dtd->scaffLevel = 0;
 5474|      0|        dtd->scaffCount = 0;
 5475|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5476|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5477|      0|      }
 5478|  6.18k|      break;
 5479|       |
 5480|  6.18k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5480:5): [True: 365, False: 5.21M]
  ------------------
 5481|    433|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5481:5): [True: 68, False: 5.21M]
  ------------------
 5482|    433|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5482:11): [True: 0, False: 433]
  ------------------
 5483|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5483:13): [True: 0, False: 0]
  ------------------
 5484|      0|          XML_Content *content
 5485|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5486|      0|          if (! content)
  ------------------
  |  Branch (5486:15): [True: 0, False: 0]
  ------------------
 5487|      0|            return XML_ERROR_NO_MEMORY;
 5488|      0|          content->quant = XML_CQUANT_NONE;
 5489|      0|          content->name = NULL;
 5490|      0|          content->numchildren = 0;
 5491|      0|          content->children = NULL;
 5492|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5492:28): [True: 0, False: 0]
  ------------------
 5493|      0|                                                          : XML_CTYPE_EMPTY);
 5494|      0|          *eventEndPP = s;
 5495|      0|          parser->m_elementDeclHandler(
 5496|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5497|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5498|      0|        }
 5499|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5500|      0|      }
 5501|    433|      break;
 5502|       |
 5503|  2.76k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5503:5): [True: 2.76k, False: 5.21M]
  ------------------
 5504|  2.76k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5504:11): [True: 0, False: 2.76k]
  ------------------
 5505|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5506|      0|            = XML_CTYPE_MIXED;
 5507|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5507:13): [True: 0, False: 0]
  ------------------
 5508|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5509|      0|      }
 5510|  2.76k|      break;
 5511|       |
 5512|  19.5k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5512:5): [True: 19.5k, False: 5.19M]
  ------------------
 5513|  19.5k|      quant = XML_CQUANT_NONE;
 5514|  19.5k|      goto elementContent;
 5515|  1.31k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5515:5): [True: 1.31k, False: 5.21M]
  ------------------
 5516|  1.31k|      quant = XML_CQUANT_OPT;
 5517|  1.31k|      goto elementContent;
 5518|  1.33k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5518:5): [True: 1.33k, False: 5.21M]
  ------------------
 5519|  1.33k|      quant = XML_CQUANT_REP;
 5520|  1.33k|      goto elementContent;
 5521|  2.02k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5521:5): [True: 2.02k, False: 5.21M]
  ------------------
 5522|  2.02k|      quant = XML_CQUANT_PLUS;
 5523|  24.2k|    elementContent:
 5524|  24.2k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5524:11): [True: 0, False: 24.2k]
  ------------------
 5525|      0|        ELEMENT_TYPE *el;
 5526|      0|        const XML_Char *name;
 5527|      0|        size_t nameLen;
 5528|      0|        const char *nxt
 5529|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5529:16): [True: 0, False: 0]
  ------------------
 5530|      0|        int myindex = nextScaffoldPart(parser);
 5531|      0|        if (myindex < 0)
  ------------------
  |  Branch (5531:13): [True: 0, False: 0]
  ------------------
 5532|      0|          return XML_ERROR_NO_MEMORY;
 5533|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5534|      0|        dtd->scaffold[myindex].quant = quant;
 5535|      0|        el = getElementType(parser, enc, s, nxt);
 5536|      0|        if (! el)
  ------------------
  |  Branch (5536:13): [True: 0, False: 0]
  ------------------
 5537|      0|          return XML_ERROR_NO_MEMORY;
 5538|      0|        name = el->name;
 5539|      0|        dtd->scaffold[myindex].name = name;
 5540|      0|        nameLen = 0;
 5541|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5541:16): [True: 0, False: 0]
  ------------------
 5542|      0|          ;
 5543|       |
 5544|       |        /* Detect and prevent integer overflow */
 5545|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5545:13): [True: 0, False: 0]
  ------------------
 5546|      0|          return XML_ERROR_NO_MEMORY;
 5547|      0|        }
 5548|       |
 5549|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5550|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5550:13): [True: 0, False: 0]
  ------------------
 5551|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5552|      0|      }
 5553|  24.2k|      break;
 5554|       |
 5555|  66.1k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5555:5): [True: 66.1k, False: 5.15M]
  ------------------
 5556|  66.1k|      quant = XML_CQUANT_NONE;
 5557|  66.1k|      goto closeGroup;
 5558|  2.07k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5558:5): [True: 2.07k, False: 5.21M]
  ------------------
 5559|  2.07k|      quant = XML_CQUANT_OPT;
 5560|  2.07k|      goto closeGroup;
 5561|  7.28k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5561:5): [True: 7.28k, False: 5.20M]
  ------------------
 5562|  7.28k|      quant = XML_CQUANT_REP;
 5563|  7.28k|      goto closeGroup;
 5564|  48.1k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5564:5): [True: 48.1k, False: 5.16M]
  ------------------
 5565|  48.1k|      quant = XML_CQUANT_PLUS;
 5566|   123k|    closeGroup:
 5567|   123k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 123k]
  ------------------
 5568|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5568:13): [True: 0, False: 0]
  ------------------
 5569|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5570|      0|        dtd->scaffLevel--;
 5571|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5572|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5572:13): [True: 0, False: 0]
  ------------------
 5573|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5573:15): [True: 0, False: 0]
  ------------------
 5574|      0|            XML_Content *model = build_model(parser);
 5575|      0|            if (! model)
  ------------------
  |  Branch (5575:17): [True: 0, False: 0]
  ------------------
 5576|      0|              return XML_ERROR_NO_MEMORY;
 5577|      0|            *eventEndPP = s;
 5578|      0|            parser->m_elementDeclHandler(
 5579|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5580|      0|          }
 5581|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5582|      0|          dtd->contentStringLen = 0;
 5583|      0|        }
 5584|      0|      }
 5585|   123k|      break;
 5586|       |      /* End element declaration stuff */
 5587|       |
 5588|   123k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5588:5): [True: 4.82k, False: 5.21M]
  ------------------
 5589|  4.82k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5589:11): [True: 0, False: 4.82k]
  ------------------
 5590|      0|        return XML_ERROR_NO_MEMORY;
 5591|  4.82k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  4.82k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5592|  4.82k|      break;
 5593|  1.34k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5593:5): [True: 1.34k, False: 5.21M]
  ------------------
 5594|  1.34k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5594:11): [True: 0, False: 1.34k]
  ------------------
 5595|      0|        return XML_ERROR_NO_MEMORY;
 5596|  1.34k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.34k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5597|  1.34k|      break;
 5598|  8.21k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5598:5): [True: 8.21k, False: 5.20M]
  ------------------
 5599|  8.21k|      switch (tok) {
  ------------------
  |  Branch (5599:15): [True: 6.45k, False: 1.76k]
  ------------------
 5600|  1.76k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  1.76k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5600:7): [True: 1.76k, False: 6.45k]
  ------------------
 5601|  1.76k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.76k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5602|  1.76k|        break;
 5603|  8.21k|      }
 5604|  8.21k|      break;
 5605|  17.5k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5605:5): [True: 17.5k, False: 5.19M]
  ------------------
 5606|  17.5k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5606:11): [True: 0, False: 17.5k]
  ------------------
 5607|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5608|  17.5k|      break;
 5609|  68.2k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5609:5): [True: 68.2k, False: 5.14M]
  ------------------
 5610|  68.2k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5610:11): [True: 62.3k, False: 5.92k]
  |  Branch (5610:34): [True: 0, False: 62.3k]
  ------------------
 5611|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5612|  68.2k|      break;
 5613|  10.5k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5613:5): [True: 10.5k, False: 5.20M]
  ------------------
 5614|  10.5k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5614:11): [True: 0, False: 10.5k]
  ------------------
 5615|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5616|  10.5k|      break;
 5617|   193k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5617:5): [True: 193k, False: 5.02M]
  ------------------
 5618|   193k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5618:11): [True: 189k, False: 4.28k]
  |  Branch (5618:34): [True: 0, False: 189k]
  ------------------
 5619|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5620|   193k|      break;
 5621|  69.1k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5621:5): [True: 69.1k, False: 5.14M]
  ------------------
 5622|  69.1k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5622:11): [True: 0, False: 69.1k]
  ------------------
 5623|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5624|  69.1k|      break;
 5625|  5.21M|    } /* end of big switch */
 5626|       |
 5627|  5.20M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5627:9): [True: 5.19M, False: 8.02k]
  |  Branch (5627:26): [True: 0, False: 5.19M]
  ------------------
 5628|      0|      reportDefault(parser, enc, s, next);
 5629|       |
 5630|  5.20M|    switch (parser->m_parsingStatus.parsing) {
 5631|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5631:5): [True: 0, False: 5.20M]
  ------------------
 5632|      0|      *nextPtr = next;
 5633|      0|      return XML_ERROR_NONE;
 5634|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5634:5): [True: 0, False: 5.20M]
  ------------------
 5635|      0|      return XML_ERROR_ABORTED;
 5636|  5.20M|    default:
  ------------------
  |  Branch (5636:5): [True: 5.20M, False: 0]
  ------------------
 5637|  5.20M|      s = next;
 5638|  5.20M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  5.20M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.20M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5639|  5.20M|    }
 5640|  5.20M|  }
 5641|       |  /* not reached */
 5642|  19.8k|}
xmlparse.c:accountingDiffTolerated:
 7736|  48.2M|                        enum XML_Account account) {
 7737|       |  /* Note: We need to check the token type *first* to be sure that
 7738|       |   *       we can even access variable <after>, safely.
 7739|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7740|  48.2M|  switch (tok) {
  ------------------
  |  Branch (7740:11): [True: 45.8M, False: 2.41M]
  ------------------
 7741|  2.28k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.28k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7741:3): [True: 2.28k, False: 48.2M]
  ------------------
 7742|  4.83k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.83k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7742:3): [True: 2.54k, False: 48.2M]
  ------------------
 7743|  5.26k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.26k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7743:3): [True: 434, False: 48.2M]
  ------------------
 7744|  2.41M|  case XML_TOK_NONE:
  ------------------
  |  |   51|  2.41M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7744:3): [True: 2.41M, False: 45.8M]
  ------------------
 7745|  2.41M|    return XML_TRUE;
  ------------------
  |  |   55|  2.41M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7746|  48.2M|  }
 7747|       |
 7748|  45.8M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7748:7): [True: 1.36M, False: 44.5M]
  ------------------
 7749|  1.36M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.36M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7750|       |
 7751|  44.5M|  unsigned int levelsAwayFromRootParser;
 7752|  44.5M|  const XML_Parser rootParser
 7753|  44.5M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7754|  44.5M|  assert(! rootParser->m_parentParser);
 7755|       |
 7756|  44.5M|  const int isDirect
 7757|  44.5M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7757:9): [True: 6.80M, False: 37.7M]
  |  Branch (7757:44): [True: 6.80M, False: 0]
  ------------------
 7758|  44.5M|  const ptrdiff_t bytesMore = after - before;
 7759|       |
 7760|  44.5M|  XmlBigCount *const additionTarget
 7761|  44.5M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7761:9): [True: 6.80M, False: 37.7M]
  ------------------
 7762|  44.5M|                 : &rootParser->m_accounting.countBytesIndirect;
 7763|       |
 7764|       |  /* Detect and avoid integer overflow */
 7765|  44.5M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7765:7): [True: 0, False: 44.5M]
  ------------------
 7766|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7767|  44.5M|  *additionTarget += bytesMore;
 7768|       |
 7769|  44.5M|  const XmlBigCount countBytesOutput
 7770|  44.5M|      = rootParser->m_accounting.countBytesDirect
 7771|  44.5M|        + rootParser->m_accounting.countBytesIndirect;
 7772|  44.5M|  const float amplificationFactor
 7773|  44.5M|      = accountingGetCurrentAmplification(rootParser);
 7774|  44.5M|  const XML_Bool tolerated
 7775|  44.5M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7775:9): [True: 33.3M, False: 11.1M]
  ------------------
 7776|  44.5M|        || (amplificationFactor
  ------------------
  |  Branch (7776:12): [True: 11.1M, False: 47]
  ------------------
 7777|  11.1M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7778|       |
 7779|  44.5M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7779:7): [True: 0, False: 44.5M]
  ------------------
 7780|      0|    accountingReportStats(rootParser, "");
 7781|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7782|      0|                         bytesMore, source_line, account);
 7783|      0|  }
 7784|       |
 7785|  44.5M|  return tolerated;
 7786|  44.5M|}
xmlparse.c:getRootParserOf:
 7851|  49.3M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7852|  49.3M|  XML_Parser rootParser = parser;
 7853|  49.3M|  unsigned int stepsTakenUpwards = 0;
 7854|  49.3M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7854:10): [True: 0, False: 49.3M]
  ------------------
 7855|      0|    rootParser = rootParser->m_parentParser;
 7856|      0|    stepsTakenUpwards++;
 7857|      0|  }
 7858|  49.3M|  assert(! rootParser->m_parentParser);
 7859|  49.3M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7859:7): [True: 44.5M, False: 4.79M]
  ------------------
 7860|  44.5M|    *outLevelDiff = stepsTakenUpwards;
 7861|  44.5M|  }
 7862|  49.3M|  return rootParser;
 7863|  49.3M|}
xmlparse.c:accountingGetCurrentAmplification:
 7659|  44.5M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7660|  44.5M|  const XmlBigCount countBytesOutput
 7661|  44.5M|      = rootParser->m_accounting.countBytesDirect
 7662|  44.5M|        + rootParser->m_accounting.countBytesIndirect;
 7663|  44.5M|  const float amplificationFactor
 7664|  44.5M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7664:9): [True: 44.5M, False: 0]
  ------------------
 7665|  44.5M|            ? (countBytesOutput
 7666|  44.5M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7667|  44.5M|            : 1.0f;
 7668|  44.5M|  assert(! rootParser->m_parentParser);
 7669|  44.5M|  return amplificationFactor;
 7670|  44.5M|}
xmlparse.c:accountingReportStats:
 7673|     46|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7674|     46|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7675|     46|  assert(! rootParser->m_parentParser);
 7676|       |
 7677|     46|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7677:7): [True: 46, False: 0]
  ------------------
 7678|     46|    return;
 7679|     46|  }
 7680|       |
 7681|      0|  const float amplificationFactor
 7682|      0|      = accountingGetCurrentAmplification(rootParser);
 7683|      0|  fprintf(stderr,
 7684|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7685|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7686|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7687|      0|          rootParser->m_accounting.countBytesIndirect,
 7688|      0|          (double)amplificationFactor, epilog);
 7689|      0|}
xmlparse.c:accountingOnAbort:
 7692|     46|accountingOnAbort(XML_Parser originParser) {
 7693|     46|  accountingReportStats(originParser, " ABORTING\n");
 7694|     46|}
xmlparse.c:processXmlDecl:
 4279|    344|               const char *next) {
 4280|    344|  const char *encodingName = NULL;
 4281|    344|  const XML_Char *storedEncName = NULL;
 4282|    344|  const ENCODING *newEncoding = NULL;
 4283|    344|  const char *version = NULL;
 4284|    344|  const char *versionend = NULL;
 4285|    344|  const XML_Char *storedversion = NULL;
 4286|    344|  int standalone = -1;
 4287|       |
 4288|    344|#ifdef XML_DTD
 4289|    344|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    344|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4289:7): [True: 0, False: 344]
  ------------------
 4290|    344|                                XML_ACCOUNT_DIRECT)) {
 4291|      0|    accountingOnAbort(parser);
 4292|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4293|      0|  }
 4294|    344|#endif
 4295|       |
 4296|    344|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4296:7): [True: 255, False: 89]
  |  Branch (4296:10): [True: 0, False: 344]
  ------------------
 4297|    344|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4298|    344|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4299|    255|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4299:9): [True: 0, False: 255]
  ------------------
 4300|      0|      return XML_ERROR_TEXT_DECL;
 4301|    255|    else
 4302|    255|      return XML_ERROR_XML_DECL;
 4303|    255|  }
 4304|     89|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4304:7): [True: 89, False: 0]
  |  Branch (4304:32): [True: 27, False: 62]
  ------------------
 4305|     27|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     27|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4306|     27|#ifdef XML_DTD
 4307|     27|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4307:9): [True: 0, False: 27]
  ------------------
 4308|     27|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4309|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4310|     27|#endif /* XML_DTD */
 4311|     27|  }
 4312|     89|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4312:7): [True: 0, False: 89]
  ------------------
 4313|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4313:9): [True: 0, False: 0]
  ------------------
 4314|      0|      storedEncName = poolStoreString(
 4315|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4316|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4317|      0|      if (! storedEncName)
  ------------------
  |  Branch (4317:11): [True: 0, False: 0]
  ------------------
 4318|      0|        return XML_ERROR_NO_MEMORY;
 4319|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4320|      0|    }
 4321|      0|    if (version) {
  ------------------
  |  Branch (4321:9): [True: 0, False: 0]
  ------------------
 4322|      0|      storedversion
 4323|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4324|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4325|      0|      if (! storedversion)
  ------------------
  |  Branch (4325:11): [True: 0, False: 0]
  ------------------
 4326|      0|        return XML_ERROR_NO_MEMORY;
 4327|      0|    }
 4328|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4329|      0|                             standalone);
 4330|     89|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4330:14): [True: 0, False: 89]
  ------------------
 4331|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4332|     89|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4332:7): [True: 0, False: 89]
  ------------------
 4333|      0|    if (newEncoding) {
  ------------------
  |  Branch (4333:9): [True: 0, False: 0]
  ------------------
 4334|       |      /* Check that the specified encoding does not conflict with what
 4335|       |       * the parser has already deduced.  Do we have the same number
 4336|       |       * of bytes in the smallest representation of a character?  If
 4337|       |       * this is UTF-16, is it the same endianness?
 4338|       |       */
 4339|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4339:11): [True: 0, False: 0]
  ------------------
 4340|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4340:15): [True: 0, False: 0]
  ------------------
 4341|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4341:18): [True: 0, False: 0]
  ------------------
 4342|      0|        parser->m_eventPtr = encodingName;
 4343|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4344|      0|      }
 4345|      0|      parser->m_encoding = newEncoding;
 4346|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4346:16): [True: 0, False: 0]
  ------------------
 4347|      0|      enum XML_Error result;
 4348|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4348:11): [True: 0, False: 0]
  ------------------
 4349|      0|        storedEncName = poolStoreString(
 4350|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4351|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4352|      0|        if (! storedEncName)
  ------------------
  |  Branch (4352:13): [True: 0, False: 0]
  ------------------
 4353|      0|          return XML_ERROR_NO_MEMORY;
 4354|      0|      }
 4355|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4356|      0|      poolClear(&parser->m_temp2Pool);
 4357|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4357:11): [True: 0, False: 0]
  ------------------
 4358|      0|        parser->m_eventPtr = encodingName;
 4359|      0|      return result;
 4360|      0|    }
 4361|      0|  }
 4362|       |
 4363|     89|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4363:7): [True: 0, False: 89]
  |  Branch (4363:24): [True: 0, False: 89]
  ------------------
 4364|      0|    poolClear(&parser->m_temp2Pool);
 4365|       |
 4366|     89|  return XML_ERROR_NONE;
 4367|     89|}
xmlparse.c:poolStoreString:
 7283|  2.65M|                const char *end) {
 7284|  2.65M|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7284:7): [True: 0, False: 2.65M]
  ------------------
 7285|      0|    return NULL;
 7286|  2.65M|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7286:7): [True: 424, False: 2.65M]
  |  Branch (7286:33): [True: 0, False: 424]
  ------------------
 7287|      0|    return NULL;
 7288|  2.65M|  *(pool->ptr)++ = 0;
 7289|  2.65M|  return pool->start;
 7290|  2.65M|}
xmlparse.c:lookup:
 7042|  6.40M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7043|  6.40M|  size_t i;
 7044|  6.40M|  if (table->size == 0) {
  ------------------
  |  Branch (7044:7): [True: 38.5k, False: 6.36M]
  ------------------
 7045|  38.5k|    size_t tsize;
 7046|  38.5k|    if (! createSize)
  ------------------
  |  Branch (7046:9): [True: 21.1k, False: 17.3k]
  ------------------
 7047|  21.1k|      return NULL;
 7048|  17.3k|    table->power = INIT_POWER;
  ------------------
  |  | 7006|  17.3k|#define INIT_POWER 6
  ------------------
 7049|       |    /* table->size is a power of 2 */
 7050|  17.3k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7006|  17.3k|#define INIT_POWER 6
  ------------------
 7051|  17.3k|    tsize = table->size * sizeof(NAMED *);
 7052|  17.3k|    table->v = table->mem->malloc_fcn(tsize);
 7053|  17.3k|    if (! table->v) {
  ------------------
  |  Branch (7053:9): [True: 0, False: 17.3k]
  ------------------
 7054|      0|      table->size = 0;
 7055|      0|      return NULL;
 7056|      0|    }
 7057|  17.3k|    memset(table->v, 0, tsize);
 7058|  17.3k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7059|  6.36M|  } else {
 7060|  6.36M|    unsigned long h = hash(parser, name);
 7061|  6.36M|    unsigned long mask = (unsigned long)table->size - 1;
 7062|  6.36M|    unsigned char step = 0;
 7063|  6.36M|    i = h & mask;
 7064|  6.95M|    while (table->v[i]) {
  ------------------
  |  Branch (7064:12): [True: 6.92M, False: 31.5k]
  ------------------
 7065|  6.92M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7065:11): [True: 6.33M, False: 594k]
  ------------------
 7066|  6.33M|        return table->v[i];
 7067|   594k|      if (! step)
  ------------------
  |  Branch (7067:11): [True: 585k, False: 8.58k]
  ------------------
 7068|   585k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  234|   585k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|   585k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7069|   594k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7069:7): [True: 32.9k, False: 561k]
  ------------------
 7070|   594k|    }
 7071|  31.5k|    if (! createSize)
  ------------------
  |  Branch (7071:9): [True: 9.40k, False: 22.1k]
  ------------------
 7072|  9.40k|      return NULL;
 7073|       |
 7074|       |    /* check for overflow (table is half full) */
 7075|  22.1k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7075:9): [True: 269, False: 21.9k]
  ------------------
 7076|    269|      unsigned char newPower = table->power + 1;
 7077|       |
 7078|       |      /* Detect and prevent invalid shift */
 7079|    269|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7079:11): [True: 0, False: 269]
  ------------------
 7080|      0|        return NULL;
 7081|      0|      }
 7082|       |
 7083|    269|      size_t newSize = (size_t)1 << newPower;
 7084|    269|      unsigned long newMask = (unsigned long)newSize - 1;
 7085|       |
 7086|       |      /* Detect and prevent integer overflow */
 7087|    269|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7087:11): [True: 0, False: 269]
  ------------------
 7088|      0|        return NULL;
 7089|      0|      }
 7090|       |
 7091|    269|      size_t tsize = newSize * sizeof(NAMED *);
 7092|    269|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7093|    269|      if (! newV)
  ------------------
  |  Branch (7093:11): [True: 0, False: 269]
  ------------------
 7094|      0|        return NULL;
 7095|    269|      memset(newV, 0, tsize);
 7096|  35.2k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7096:19): [True: 35.0k, False: 269]
  ------------------
 7097|  35.0k|        if (table->v[i]) {
  ------------------
  |  Branch (7097:13): [True: 17.5k, False: 17.5k]
  ------------------
 7098|  17.5k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7099|  17.5k|          size_t j = newHash & newMask;
 7100|  17.5k|          step = 0;
 7101|  20.5k|          while (newV[j]) {
  ------------------
  |  Branch (7101:18): [True: 3.03k, False: 17.5k]
  ------------------
 7102|  3.03k|            if (! step)
  ------------------
  |  Branch (7102:17): [True: 2.42k, False: 607]
  ------------------
 7103|  2.42k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  234|  2.42k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|  2.42k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7104|  3.03k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7104:13): [True: 397, False: 2.63k]
  ------------------
 7105|  3.03k|          }
 7106|  17.5k|          newV[j] = table->v[i];
 7107|  17.5k|        }
 7108|    269|      table->mem->free_fcn(table->v);
 7109|    269|      table->v = newV;
 7110|    269|      table->power = newPower;
 7111|    269|      table->size = newSize;
 7112|    269|      i = h & newMask;
 7113|    269|      step = 0;
 7114|    420|      while (table->v[i]) {
  ------------------
  |  Branch (7114:14): [True: 151, False: 269]
  ------------------
 7115|    151|        if (! step)
  ------------------
  |  Branch (7115:13): [True: 82, False: 69]
  ------------------
 7116|     82|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  234|     82|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|     82|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7117|    151|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7117:9): [True: 24, False: 127]
  ------------------
 7118|    151|      }
 7119|    269|    }
 7120|  22.1k|  }
 7121|  39.5k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7122|  39.5k|  if (! table->v[i])
  ------------------
  |  Branch (7122:7): [True: 0, False: 39.5k]
  ------------------
 7123|      0|    return NULL;
 7124|  39.5k|  memset(table->v[i], 0, createSize);
 7125|  39.5k|  table->v[i]->name = name;
 7126|  39.5k|  (table->used)++;
 7127|  39.5k|  return table->v[i];
 7128|  39.5k|}
xmlparse.c:hash:
 7031|  6.39M|hash(XML_Parser parser, KEY s) {
 7032|  6.39M|  struct siphash state;
 7033|  6.39M|  struct sipkey key;
 7034|  6.39M|  (void)sip24_valid;
 7035|  6.39M|  copy_salt_to_sipkey(parser, &key);
 7036|  6.39M|  sip24_init(&state, &key);
 7037|  6.39M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7038|  6.39M|  return (unsigned long)sip24_final(&state);
 7039|  6.39M|}
xmlparse.c:copy_salt_to_sipkey:
 7025|  6.39M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7026|  6.39M|  key->k[0] = 0;
 7027|  6.39M|  key->k[1] = get_hash_secret_salt(parser);
 7028|  6.39M|}
xmlparse.c:get_hash_secret_salt:
  946|  6.39M|get_hash_secret_salt(XML_Parser parser) {
  947|  6.39M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (947:7): [True: 0, False: 6.39M]
  ------------------
  948|      0|    return get_hash_secret_salt(parser->m_parentParser);
  949|  6.39M|  return parser->m_hash_secret_salt;
  950|  6.39M|}
xmlparse.c:keylen:
 7017|  6.39M|keylen(KEY s) {
 7018|  6.39M|  size_t len = 0;
 7019|  32.6M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7019:10): [True: 26.2M, False: 6.39M]
  ------------------
 7020|  26.2M|    ;
 7021|  6.39M|  return len;
 7022|  6.39M|}
xmlparse.c:keyeq:
 7009|  6.92M|keyeq(KEY s1, KEY s2) {
 7010|  26.8M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7010:10): [True: 26.2M, False: 594k]
  ------------------
 7011|  26.2M|    if (*s1 == 0)
  ------------------
  |  Branch (7011:9): [True: 6.33M, False: 19.9M]
  ------------------
 7012|  6.33M|      return XML_TRUE;
  ------------------
  |  |   55|  6.33M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7013|   594k|  return XML_FALSE;
  ------------------
  |  |   56|   594k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7014|  6.92M|}
xmlparse.c:normalizePublicId:
 6694|    833|normalizePublicId(XML_Char *publicId) {
 6695|    833|  XML_Char *p = publicId;
 6696|    833|  XML_Char *s;
 6697|  18.9k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6697:22): [True: 18.0k, False: 833]
  ------------------
 6698|  18.0k|    switch (*s) {
 6699|    763|    case 0x20:
  ------------------
  |  Branch (6699:5): [True: 763, False: 17.3k]
  ------------------
 6700|  1.99k|    case 0xD:
  ------------------
  |  Branch (6700:5): [True: 1.22k, False: 16.8k]
  ------------------
 6701|  3.08k|    case 0xA:
  ------------------
  |  Branch (6701:5): [True: 1.09k, False: 16.9k]
  ------------------
 6702|  3.08k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6702:11): [True: 1.54k, False: 1.54k]
  |  Branch (6702:28): [True: 824, False: 720]
  ------------------
 6703|    824|        *p++ = 0x20;
 6704|  3.08k|      break;
 6705|  14.9k|    default:
  ------------------
  |  Branch (6705:5): [True: 14.9k, False: 3.08k]
  ------------------
 6706|  14.9k|      *p++ = *s;
 6707|  18.0k|    }
 6708|  18.0k|  }
 6709|    833|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6709:7): [True: 651, False: 182]
  |  Branch (6709:24): [True: 57, False: 594]
  ------------------
 6710|     57|    --p;
 6711|    833|  *p = XML_T('\0');
  ------------------
  |  |  190|    833|#  define XML_T(x) x
  ------------------
 6712|    833|}
xmlparse.c:contentProcessor:
 2621|  11.4k|                 const char **endPtr) {
 2622|  11.4k|  enum XML_Error result = doContent(
 2623|  11.4k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2624|  11.4k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2625|  11.4k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2625:7): [True: 7.18k, False: 4.22k]
  ------------------
 2626|  7.18k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2626:9): [True: 0, False: 7.18k]
  ------------------
 2627|      0|      return XML_ERROR_NO_MEMORY;
 2628|  7.18k|  }
 2629|  11.4k|  return result;
 2630|  11.4k|}
xmlparse.c:doContent:
 2751|   383k|          XML_Bool haveMore, enum XML_Account account) {
 2752|       |  /* save one level of indirection */
 2753|   383k|  DTD *const dtd = parser->m_dtd;
 2754|       |
 2755|   383k|  const char **eventPP;
 2756|   383k|  const char **eventEndPP;
 2757|   383k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2757:7): [True: 11.4k, False: 372k]
  ------------------
 2758|  11.4k|    eventPP = &parser->m_eventPtr;
 2759|  11.4k|    eventEndPP = &parser->m_eventEndPtr;
 2760|   372k|  } else {
 2761|   372k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2762|   372k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2763|   372k|  }
 2764|   383k|  *eventPP = s;
 2765|       |
 2766|  5.96M|  for (;;) {
 2767|  5.96M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2768|  5.96M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  5.96M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.96M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2769|  5.96M|#ifdef XML_DTD
 2770|  5.96M|    const char *accountAfter
 2771|  5.96M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  5.96M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  5.94M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2771:12): [True: 23.5k, False: 5.94M]
  |  Branch (2771:46): [True: 51, False: 5.94M]
  ------------------
 2772|  5.96M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2772:18): [True: 84, False: 23.5k]
  ------------------
 2773|  5.96M|              : next;
 2774|  5.96M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2774:9): [True: 6, False: 5.96M]
  ------------------
 2775|  5.96M|                                  account)) {
 2776|      6|      accountingOnAbort(parser);
 2777|      6|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2778|      6|    }
 2779|  5.96M|#endif
 2780|  5.96M|    *eventEndPP = next;
 2781|  5.96M|    switch (tok) {
 2782|     51|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     51|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2782:5): [True: 51, False: 5.96M]
  ------------------
 2783|     51|      if (haveMore) {
  ------------------
  |  Branch (2783:11): [True: 51, False: 0]
  ------------------
 2784|     51|        *nextPtr = s;
 2785|     51|        return XML_ERROR_NONE;
 2786|     51|      }
 2787|      0|      *eventEndPP = end;
 2788|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2788:11): [True: 0, False: 0]
  ------------------
 2789|      0|        XML_Char c = 0xA;
 2790|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2791|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2791:18): [True: 0, False: 0]
  ------------------
 2792|      0|        reportDefault(parser, enc, s, end);
 2793|       |      /* We are at the end of the final buffer, should we check for
 2794|       |         XML_SUSPENDED, XML_FINISHED?
 2795|       |      */
 2796|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2796:11): [True: 0, False: 0]
  ------------------
 2797|      0|        return XML_ERROR_NO_ELEMENTS;
 2798|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2798:11): [True: 0, False: 0]
  ------------------
 2799|      0|        return XML_ERROR_ASYNC_ENTITY;
 2800|      0|      *nextPtr = end;
 2801|      0|      return XML_ERROR_NONE;
 2802|   351k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   351k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2802:5): [True: 351k, False: 5.61M]
  ------------------
 2803|   351k|      if (haveMore) {
  ------------------
  |  Branch (2803:11): [True: 3.88k, False: 347k]
  ------------------
 2804|  3.88k|        *nextPtr = s;
 2805|  3.88k|        return XML_ERROR_NONE;
 2806|  3.88k|      }
 2807|   347k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2807:11): [True: 347k, False: 0]
  ------------------
 2808|   347k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2808:13): [True: 83, False: 347k]
  ------------------
 2809|     83|          return XML_ERROR_ASYNC_ENTITY;
 2810|   347k|        *nextPtr = s;
 2811|   347k|        return XML_ERROR_NONE;
 2812|   347k|      }
 2813|      0|      return XML_ERROR_NO_ELEMENTS;
 2814|  2.11k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.11k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2814:5): [True: 2.11k, False: 5.96M]
  ------------------
 2815|  2.11k|      *eventPP = next;
 2816|  2.11k|      return XML_ERROR_INVALID_TOKEN;
 2817|  2.38k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.38k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2817:5): [True: 2.38k, False: 5.96M]
  ------------------
 2818|  2.38k|      if (haveMore) {
  ------------------
  |  Branch (2818:11): [True: 2.20k, False: 176]
  ------------------
 2819|  2.20k|        *nextPtr = s;
 2820|  2.20k|        return XML_ERROR_NONE;
 2821|  2.20k|      }
 2822|    176|      return XML_ERROR_UNCLOSED_TOKEN;
 2823|    305|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    305|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2823:5): [True: 305, False: 5.96M]
  ------------------
 2824|    305|      if (haveMore) {
  ------------------
  |  Branch (2824:11): [True: 305, False: 0]
  ------------------
 2825|    305|        *nextPtr = s;
 2826|    305|        return XML_ERROR_NONE;
 2827|    305|      }
 2828|      0|      return XML_ERROR_PARTIAL_CHAR;
 2829|   410k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   410k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2829:5): [True: 410k, False: 5.55M]
  ------------------
 2830|   410k|      const XML_Char *name;
 2831|   410k|      ENTITY *entity;
 2832|   410k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   410k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2833|   410k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2834|   410k|      if (ch) {
  ------------------
  |  Branch (2834:11): [True: 23.6k, False: 386k]
  ------------------
 2835|  23.6k|#ifdef XML_DTD
 2836|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2837|       |         *       so there is no amplification and hence recording without
 2838|       |         *       protection. */
 2839|  23.6k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2840|  23.6k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2841|  23.6k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2842|  23.6k|#endif /* XML_DTD */
 2843|  23.6k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2843:13): [True: 0, False: 23.6k]
  ------------------
 2844|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2845|  23.6k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2845:18): [True: 0, False: 23.6k]
  ------------------
 2846|      0|          reportDefault(parser, enc, s, next);
 2847|  23.6k|        break;
 2848|  23.6k|      }
 2849|   386k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2850|   386k|                             next - enc->minBytesPerChar);
 2851|   386k|      if (! name)
  ------------------
  |  Branch (2851:11): [True: 0, False: 386k]
  ------------------
 2852|      0|        return XML_ERROR_NO_MEMORY;
 2853|   386k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2854|   386k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   386k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2855|       |      /* First, determine if a check for an existing declaration is needed;
 2856|       |         if yes, check that the entity exists, and that it is internal,
 2857|       |         otherwise call the skipped entity or default handler.
 2858|       |      */
 2859|   386k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2859:11): [True: 370k, False: 16.3k]
  |  Branch (2859:40): [True: 196, False: 16.1k]
  ------------------
 2860|   370k|        if (! entity)
  ------------------
  |  Branch (2860:13): [True: 379, False: 369k]
  ------------------
 2861|    379|          return XML_ERROR_UNDEFINED_ENTITY;
 2862|   369k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2862:18): [True: 0, False: 369k]
  ------------------
 2863|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2864|   370k|      } else if (! entity) {
  ------------------
  |  Branch (2864:18): [True: 13.8k, False: 2.28k]
  ------------------
 2865|  13.8k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2865:13): [True: 0, False: 13.8k]
  ------------------
 2866|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2867|  13.8k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2867:18): [True: 0, False: 13.8k]
  ------------------
 2868|      0|          reportDefault(parser, enc, s, next);
 2869|  13.8k|        break;
 2870|  13.8k|      }
 2871|   372k|      if (entity->open)
  ------------------
  |  Branch (2871:11): [True: 3, False: 372k]
  ------------------
 2872|      3|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2873|   372k|      if (entity->notation)
  ------------------
  |  Branch (2873:11): [True: 1, False: 372k]
  ------------------
 2874|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2875|   372k|      if (entity->textPtr) {
  ------------------
  |  Branch (2875:11): [True: 372k, False: 200]
  ------------------
 2876|   372k|        enum XML_Error result;
 2877|   372k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2877:13): [True: 0, False: 372k]
  ------------------
 2878|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2878:15): [True: 0, False: 0]
  ------------------
 2879|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2880|      0|                                           0);
 2881|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2881:20): [True: 0, False: 0]
  ------------------
 2882|      0|            reportDefault(parser, enc, s, next);
 2883|      0|          break;
 2884|      0|        }
 2885|   372k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   372k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2886|   372k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2886:13): [True: 905, False: 371k]
  ------------------
 2887|    905|          return result;
 2888|   372k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2888:18): [True: 0, False: 200]
  ------------------
 2889|      0|        const XML_Char *context;
 2890|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2891|      0|        context = getContext(parser);
 2892|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2893|      0|        if (! context)
  ------------------
  |  Branch (2893:13): [True: 0, False: 0]
  ------------------
 2894|      0|          return XML_ERROR_NO_MEMORY;
 2895|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2895:13): [True: 0, False: 0]
  ------------------
 2896|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2897|      0|                entity->systemId, entity->publicId))
 2898|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2899|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2900|    200|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2900:18): [True: 0, False: 200]
  ------------------
 2901|      0|        reportDefault(parser, enc, s, next);
 2902|   371k|      break;
 2903|   372k|    }
 2904|  3.77M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  3.77M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2904:5): [True: 3.77M, False: 2.19M]
  ------------------
 2905|       |      /* fall through */
 2906|  3.79M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  3.79M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2906:5): [True: 18.4k, False: 5.94M]
  ------------------
 2907|  3.79M|      TAG *tag;
 2908|  3.79M|      enum XML_Error result;
 2909|  3.79M|      XML_Char *toPtr;
 2910|  3.79M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2910:11): [True: 33.1k, False: 3.75M]
  ------------------
 2911|  33.1k|        tag = parser->m_freeTagList;
 2912|  33.1k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2913|  3.75M|      } else {
 2914|  3.75M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  713|  3.75M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2915|  3.75M|        if (! tag)
  ------------------
  |  Branch (2915:13): [True: 0, False: 3.75M]
  ------------------
 2916|      0|          return XML_ERROR_NO_MEMORY;
 2917|  3.75M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  713|  3.75M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2918|  3.75M|        if (! tag->buf) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 3.75M]
  ------------------
 2919|      0|          FREE(parser, tag);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2920|      0|          return XML_ERROR_NO_MEMORY;
 2921|      0|        }
 2922|  3.75M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  241|  3.75M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2923|  3.75M|      }
 2924|  3.79M|      tag->bindings = NULL;
 2925|  3.79M|      tag->parent = parser->m_tagStack;
 2926|  3.79M|      parser->m_tagStack = tag;
 2927|  3.79M|      tag->name.localPart = NULL;
 2928|  3.79M|      tag->name.prefix = NULL;
 2929|  3.79M|      tag->rawName = s + enc->minBytesPerChar;
 2930|  3.79M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  3.79M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2931|  3.79M|      ++parser->m_tagLevel;
 2932|  3.79M|      {
 2933|  3.79M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2934|  3.79M|        const char *fromPtr = tag->rawName;
 2935|  3.79M|        toPtr = (XML_Char *)tag->buf;
 2936|  3.79M|        for (;;) {
 2937|  3.79M|          int bufSize;
 2938|  3.79M|          int convLen;
 2939|  3.79M|          const enum XML_Convert_Result convert_res
 2940|  3.79M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  160|  3.79M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.79M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2941|  3.79M|                           (ICHAR *)tag->bufEnd - 1);
 2942|  3.79M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2943|  3.79M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2943:15): [True: 3.79M, False: 3.32k]
  ------------------
 2944|  3.79M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2944:18): [True: 0, False: 3.32k]
  ------------------
 2945|  3.79M|            tag->name.strLen = convLen;
 2946|  3.79M|            break;
 2947|  3.79M|          }
 2948|  3.32k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2949|  3.32k|          {
 2950|  3.32k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  3.32k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2951|  3.32k|            if (temp == NULL)
  ------------------
  |  Branch (2951:17): [True: 0, False: 3.32k]
  ------------------
 2952|      0|              return XML_ERROR_NO_MEMORY;
 2953|  3.32k|            tag->buf = temp;
 2954|  3.32k|            tag->bufEnd = temp + bufSize;
 2955|  3.32k|            toPtr = (XML_Char *)temp + convLen;
 2956|  3.32k|          }
 2957|  3.32k|        }
 2958|  3.79M|      }
 2959|  3.79M|      tag->name.str = (XML_Char *)tag->buf;
 2960|  3.79M|      *toPtr = XML_T('\0');
  ------------------
  |  |  190|  3.79M|#  define XML_T(x) x
  ------------------
 2961|  3.79M|      result
 2962|  3.79M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2963|  3.79M|      if (result)
  ------------------
  |  Branch (2963:11): [True: 671, False: 3.79M]
  ------------------
 2964|    671|        return result;
 2965|  3.79M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2965:11): [True: 3.79M, False: 0]
  ------------------
 2966|  3.79M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2967|  3.79M|                                      (const XML_Char **)parser->m_atts);
 2968|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2968:16): [True: 0, False: 0]
  ------------------
 2969|      0|        reportDefault(parser, enc, s, next);
 2970|  3.79M|      poolClear(&parser->m_tempPool);
 2971|  3.79M|      break;
 2972|  3.79M|    }
 2973|  5.07k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  5.07k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2973:5): [True: 5.07k, False: 5.95M]
  ------------------
 2974|       |      /* fall through */
 2975|  36.3k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  36.3k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2975:5): [True: 31.3k, False: 5.93M]
  ------------------
 2976|  36.3k|      const char *rawName = s + enc->minBytesPerChar;
 2977|  36.3k|      enum XML_Error result;
 2978|  36.3k|      BINDING *bindings = NULL;
 2979|  36.3k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  36.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2980|  36.3k|      TAG_NAME name;
 2981|  36.3k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2982|  36.3k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  36.3k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2983|  36.3k|      if (! name.str)
  ------------------
  |  Branch (2983:11): [True: 0, False: 36.3k]
  ------------------
 2984|      0|        return XML_ERROR_NO_MEMORY;
 2985|  36.3k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  36.3k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2986|  36.3k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2987|  36.3k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2988|  36.3k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2988:11): [True: 45, False: 36.3k]
  ------------------
 2989|     45|        freeBindings(parser, bindings);
 2990|     45|        return result;
 2991|     45|      }
 2992|  36.3k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  36.3k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2993|  36.3k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2993:11): [True: 36.3k, False: 0]
  ------------------
 2994|  36.3k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2995|  36.3k|                                      (const XML_Char **)parser->m_atts);
 2996|  36.3k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  36.3k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2997|  36.3k|      }
 2998|  36.3k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2998:11): [True: 36.3k, False: 0]
  ------------------
 2999|  36.3k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (2999:13): [True: 36.3k, False: 0]
  ------------------
 3000|  36.3k|          *eventPP = *eventEndPP;
 3001|  36.3k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3002|  36.3k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  36.3k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3003|  36.3k|      }
 3004|  36.3k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3004:11): [True: 0, False: 36.3k]
  |  Branch (3004:28): [True: 0, False: 0]
  ------------------
 3005|      0|        reportDefault(parser, enc, s, next);
 3006|  36.3k|      poolClear(&parser->m_tempPool);
 3007|  36.3k|      freeBindings(parser, bindings);
 3008|  36.3k|    }
 3009|  36.3k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3009:11): [True: 123, False: 36.2k]
  ------------------
 3010|  36.3k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3010:14): [True: 123, False: 0]
  ------------------
 3011|    123|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3011:13): [True: 0, False: 123]
  ------------------
 3012|      0|          parser->m_processor = epilogProcessor;
 3013|    123|        else
 3014|    123|          return epilogProcessor(parser, next, end, nextPtr);
 3015|    123|      }
 3016|  36.2k|      break;
 3017|  36.2k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  33.8k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3017:5): [True: 33.8k, False: 5.93M]
  ------------------
 3018|  33.8k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3018:11): [True: 2, False: 33.8k]
  ------------------
 3019|      2|        return XML_ERROR_ASYNC_ENTITY;
 3020|  33.8k|      else {
 3021|  33.8k|        int len;
 3022|  33.8k|        const char *rawName;
 3023|  33.8k|        TAG *tag = parser->m_tagStack;
 3024|  33.8k|        rawName = s + enc->minBytesPerChar * 2;
 3025|  33.8k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  33.8k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3026|  33.8k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3026:13): [True: 29, False: 33.8k]
  ------------------
 3027|  33.8k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3027:16): [True: 188, False: 33.6k]
  ------------------
 3028|    217|          *eventPP = rawName;
 3029|    217|          return XML_ERROR_TAG_MISMATCH;
 3030|    217|        }
 3031|  33.6k|        parser->m_tagStack = tag->parent;
 3032|  33.6k|        tag->parent = parser->m_freeTagList;
 3033|  33.6k|        parser->m_freeTagList = tag;
 3034|  33.6k|        --parser->m_tagLevel;
 3035|  33.6k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3035:13): [True: 33.6k, False: 0]
  ------------------
 3036|  33.6k|          const XML_Char *localPart;
 3037|  33.6k|          const XML_Char *prefix;
 3038|  33.6k|          XML_Char *uri;
 3039|  33.6k|          localPart = tag->name.localPart;
 3040|  33.6k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3040:15): [True: 0, False: 33.6k]
  |  Branch (3040:31): [True: 0, False: 0]
  ------------------
 3041|       |            /* localPart and prefix may have been overwritten in
 3042|       |               tag->name.str, since this points to the binding->uri
 3043|       |               buffer which gets re-used; so we have to add them again
 3044|       |            */
 3045|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3046|       |            /* don't need to check for space - already done in storeAtts() */
 3047|      0|            while (*localPart)
  ------------------
  |  Branch (3047:20): [True: 0, False: 0]
  ------------------
 3048|      0|              *uri++ = *localPart++;
 3049|      0|            prefix = tag->name.prefix;
 3050|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3050:17): [True: 0, False: 0]
  |  Branch (3050:42): [True: 0, False: 0]
  ------------------
 3051|      0|              *uri++ = parser->m_namespaceSeparator;
 3052|      0|              while (*prefix)
  ------------------
  |  Branch (3052:22): [True: 0, False: 0]
  ------------------
 3053|      0|                *uri++ = *prefix++;
 3054|      0|            }
 3055|      0|            *uri = XML_T('\0');
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
 3056|      0|          }
 3057|  33.6k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3058|  33.6k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3058:20): [True: 0, False: 0]
  ------------------
 3059|      0|          reportDefault(parser, enc, s, next);
 3060|  33.6k|        while (tag->bindings) {
  ------------------
  |  Branch (3060:16): [True: 0, False: 33.6k]
  ------------------
 3061|      0|          BINDING *b = tag->bindings;
 3062|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3062:15): [True: 0, False: 0]
  ------------------
 3063|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3064|      0|                                              b->prefix->name);
 3065|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3066|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3067|      0|          parser->m_freeBindingList = b;
 3068|      0|          b->prefix->binding = b->prevPrefixBinding;
 3069|      0|        }
 3070|  33.6k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3070:13): [True: 37, False: 33.6k]
  ------------------
 3071|  33.6k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3071:16): [True: 37, False: 0]
  ------------------
 3072|     37|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3072:15): [True: 0, False: 37]
  ------------------
 3073|      0|            parser->m_processor = epilogProcessor;
 3074|     37|          else
 3075|     37|            return epilogProcessor(parser, next, end, nextPtr);
 3076|     37|        }
 3077|  33.6k|      }
 3078|  33.6k|      break;
 3079|  33.6k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.24k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3079:5): [True: 8.24k, False: 5.95M]
  ------------------
 3080|  8.24k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.24k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3081|  8.24k|      if (n < 0)
  ------------------
  |  Branch (3081:11): [True: 222, False: 8.01k]
  ------------------
 3082|    222|        return XML_ERROR_BAD_CHAR_REF;
 3083|  8.01k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3083:11): [True: 0, False: 8.01k]
  ------------------
 3084|      0|        XML_Char buf[XML_ENCODE_MAX];
 3085|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3086|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  163|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3087|  8.01k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3087:18): [True: 0, False: 8.01k]
  ------------------
 3088|      0|        reportDefault(parser, enc, s, next);
 3089|  8.01k|    } break;
 3090|      2|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      2|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3090:5): [True: 2, False: 5.96M]
  ------------------
 3091|      2|      return XML_ERROR_MISPLACED_XML_PI;
 3092|   419k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   419k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3092:5): [True: 419k, False: 5.54M]
  ------------------
 3093|   419k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3093:11): [True: 0, False: 419k]
  ------------------
 3094|      0|        XML_Char c = 0xA;
 3095|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3096|   419k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3096:18): [True: 0, False: 419k]
  ------------------
 3097|      0|        reportDefault(parser, enc, s, next);
 3098|   419k|      break;
 3099|  2.70k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.70k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3099:5): [True: 2.70k, False: 5.96M]
  ------------------
 3100|  2.70k|      enum XML_Error result;
 3101|  2.70k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3101:11): [True: 0, False: 2.70k]
  ------------------
 3102|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3103|       |      /* BEGIN disabled code */
 3104|       |      /* Suppose you doing a transformation on a document that involves
 3105|       |         changing only the character data.  You set up a defaultHandler
 3106|       |         and a characterDataHandler.  The defaultHandler simply copies
 3107|       |         characters through.  The characterDataHandler does the
 3108|       |         transformation and writes the characters out escaping them as
 3109|       |         necessary.  This case will fail to work if we leave out the
 3110|       |         following two lines (because & and < inside CDATA sections will
 3111|       |         be incorrectly escaped).
 3112|       |
 3113|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3114|       |         easier to let the user deal with this.
 3115|       |      */
 3116|  2.70k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3116:16): [Folded - Ignored]
  |  Branch (3116:23): [True: 0, False: 0]
  ------------------
 3117|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3118|      0|                                       0);
 3119|       |      /* END disabled code */
 3120|  2.70k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3120:16): [True: 0, False: 2.70k]
  ------------------
 3121|      0|        reportDefault(parser, enc, s, next);
 3122|  2.70k|      result
 3123|  2.70k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3124|  2.70k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3124:11): [True: 203, False: 2.50k]
  ------------------
 3125|    203|        return result;
 3126|  2.50k|      else if (! next) {
  ------------------
  |  Branch (3126:16): [True: 630, False: 1.87k]
  ------------------
 3127|    630|        parser->m_processor = cdataSectionProcessor;
 3128|    630|        return result;
 3129|    630|      }
 3130|  2.70k|    } break;
 3131|  23.5k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|  23.5k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3131:5): [True: 23.5k, False: 5.94M]
  ------------------
 3132|  23.5k|      if (haveMore) {
  ------------------
  |  Branch (3132:11): [True: 33, False: 23.5k]
  ------------------
 3133|     33|        *nextPtr = s;
 3134|     33|        return XML_ERROR_NONE;
 3135|     33|      }
 3136|  23.5k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3136:11): [True: 0, False: 23.5k]
  ------------------
 3137|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3138|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3139|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3140|      0|          parser->m_characterDataHandler(
 3141|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3142|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3143|      0|        } else
 3144|      0|          parser->m_characterDataHandler(
 3145|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3146|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3147|  23.5k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3147:18): [True: 0, False: 23.5k]
  ------------------
 3148|      0|        reportDefault(parser, enc, s, end);
 3149|       |      /* We are at the end of the final buffer, should we check for
 3150|       |         XML_SUSPENDED, XML_FINISHED?
 3151|       |      */
 3152|  23.5k|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3152:11): [True: 0, False: 23.5k]
  ------------------
 3153|      0|        *eventPP = end;
 3154|      0|        return XML_ERROR_NO_ELEMENTS;
 3155|      0|      }
 3156|  23.5k|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3156:11): [True: 22, False: 23.5k]
  ------------------
 3157|     22|        *eventPP = end;
 3158|     22|        return XML_ERROR_ASYNC_ENTITY;
 3159|     22|      }
 3160|  23.5k|      *nextPtr = end;
 3161|  23.5k|      return XML_ERROR_NONE;
 3162|   864k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   864k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3162:5): [True: 864k, False: 5.10M]
  ------------------
 3163|   864k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3164|   864k|      if (charDataHandler) {
  ------------------
  |  Branch (3164:11): [True: 0, False: 864k]
  ------------------
 3165|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3166|      0|          for (;;) {
 3167|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3168|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3169|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3170|      0|            *eventEndPP = s;
 3171|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3172|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3173|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3173:17): [True: 0, False: 0]
  ------------------
 3174|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3174:20): [True: 0, False: 0]
  ------------------
 3175|      0|              break;
 3176|      0|            *eventPP = s;
 3177|      0|          }
 3178|      0|        } else
 3179|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3180|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3181|   864k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3181:18): [True: 0, False: 864k]
  ------------------
 3182|      0|        reportDefault(parser, enc, s, next);
 3183|   864k|    } break;
 3184|  16.7k|    case XML_TOK_PI:
  ------------------
  |  |   76|  16.7k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3184:5): [True: 16.7k, False: 5.94M]
  ------------------
 3185|  16.7k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3185:11): [True: 0, False: 16.7k]
  ------------------
 3186|      0|        return XML_ERROR_NO_MEMORY;
 3187|  16.7k|      break;
 3188|  16.7k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.16k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3188:5): [True: 1.16k, False: 5.96M]
  ------------------
 3189|  1.16k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3189:11): [True: 0, False: 1.16k]
  ------------------
 3190|      0|        return XML_ERROR_NO_MEMORY;
 3191|  1.16k|      break;
 3192|  1.16k|    default:
  ------------------
  |  Branch (3192:5): [True: 0, False: 5.96M]
  ------------------
 3193|       |      /* All of the tokens produced by XmlContentTok() have their own
 3194|       |       * explicit cases, so this default is not strictly necessary.
 3195|       |       * However it is a useful safety net, so we retain the code and
 3196|       |       * simply exclude it from the coverage tests.
 3197|       |       *
 3198|       |       * LCOV_EXCL_START
 3199|       |       */
 3200|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3200:11): [True: 0, False: 0]
  ------------------
 3201|      0|        reportDefault(parser, enc, s, next);
 3202|      0|      break;
 3203|       |      /* LCOV_EXCL_STOP */
 3204|  5.96M|    }
 3205|  5.58M|    *eventPP = s = next;
 3206|  5.58M|    switch (parser->m_parsingStatus.parsing) {
 3207|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3207:5): [True: 0, False: 5.58M]
  ------------------
 3208|      0|      *nextPtr = next;
 3209|      0|      return XML_ERROR_NONE;
 3210|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3210:5): [True: 0, False: 5.58M]
  ------------------
 3211|      0|      return XML_ERROR_ABORTED;
 3212|  5.58M|    default:;
  ------------------
  |  Branch (3212:5): [True: 5.58M, False: 0]
  ------------------
 3213|  5.58M|    }
 3214|  5.58M|  }
 3215|       |  /* not reached */
 3216|   383k|}
xmlparse.c:hashTableIterInit:
 7158|  19.8k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7159|  19.8k|  iter->p = table->v;
 7160|  19.8k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7160:15): [True: 10.4k, False: 9.38k]
  ------------------
 7161|  19.8k|}
xmlparse.c:hashTableIterNext:
 7164|  42.9k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7165|   713k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7165:10): [True: 693k, False: 19.8k]
  ------------------
 7166|   693k|    NAMED *tem = *(iter->p)++;
 7167|   693k|    if (tem)
  ------------------
  |  Branch (7167:9): [True: 23.0k, False: 670k]
  ------------------
 7168|  23.0k|      return tem;
 7169|   693k|  }
 7170|  19.8k|  return NULL;
 7171|  42.9k|}
xmlparse.c:storeAtts:
 3253|  3.82M|          enum XML_Account account) {
 3254|  3.82M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3255|  3.82M|  ELEMENT_TYPE *elementType;
 3256|  3.82M|  int nDefaultAtts;
 3257|  3.82M|  const XML_Char **appAtts; /* the attribute list for the application */
 3258|  3.82M|  int attIndex = 0;
 3259|  3.82M|  int prefixLen;
 3260|  3.82M|  int i;
 3261|  3.82M|  int n;
 3262|  3.82M|  XML_Char *uri;
 3263|  3.82M|  int nPrefixes = 0;
 3264|  3.82M|  BINDING *binding;
 3265|  3.82M|  const XML_Char *localPart;
 3266|       |
 3267|       |  /* lookup the element type name */
 3268|  3.82M|  elementType
 3269|  3.82M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3270|  3.82M|  if (! elementType) {
  ------------------
  |  Branch (3270:7): [True: 15.3k, False: 3.81M]
  ------------------
 3271|  15.3k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3272|  15.3k|    if (! name)
  ------------------
  |  Branch (3272:9): [True: 0, False: 15.3k]
  ------------------
 3273|      0|      return XML_ERROR_NO_MEMORY;
 3274|  15.3k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3275|  15.3k|                                         sizeof(ELEMENT_TYPE));
 3276|  15.3k|    if (! elementType)
  ------------------
  |  Branch (3276:9): [True: 0, False: 15.3k]
  ------------------
 3277|      0|      return XML_ERROR_NO_MEMORY;
 3278|  15.3k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3278:9): [True: 0, False: 15.3k]
  |  Branch (3278:25): [True: 0, False: 0]
  ------------------
 3279|      0|      return XML_ERROR_NO_MEMORY;
 3280|  15.3k|  }
 3281|  3.82M|  nDefaultAtts = elementType->nDefaultAtts;
 3282|       |
 3283|       |  /* get the attributes from the tokenizer */
 3284|  3.82M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  3.82M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3285|       |
 3286|       |  /* Detect and prevent integer overflow */
 3287|  3.82M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3287:7): [True: 0, False: 3.82M]
  ------------------
 3288|      0|    return XML_ERROR_NO_MEMORY;
 3289|      0|  }
 3290|       |
 3291|  3.82M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3291:7): [True: 423, False: 3.82M]
  ------------------
 3292|    423|    int oldAttsSize = parser->m_attsSize;
 3293|    423|    ATTRIBUTE *temp;
 3294|       |#ifdef XML_ATTR_INFO
 3295|       |    XML_AttrInfo *temp2;
 3296|       |#endif
 3297|       |
 3298|       |    /* Detect and prevent integer overflow */
 3299|    423|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  243|    423|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3299:9): [True: 0, False: 423]
  ------------------
 3300|    423|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  243|    423|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:12): [True: 0, False: 423]
  ------------------
 3301|      0|      return XML_ERROR_NO_MEMORY;
 3302|      0|    }
 3303|       |
 3304|    423|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  243|    423|#define INIT_ATTS_SIZE 16
  ------------------
 3305|       |
 3306|       |    /* Detect and prevent integer overflow.
 3307|       |     * The preprocessor guard addresses the "always false" warning
 3308|       |     * from -Wtype-limits on platforms where
 3309|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3310|       |#if UINT_MAX >= SIZE_MAX
 3311|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3312|       |      parser->m_attsSize = oldAttsSize;
 3313|       |      return XML_ERROR_NO_MEMORY;
 3314|       |    }
 3315|       |#endif
 3316|       |
 3317|    423|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  714|    423|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3318|    423|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3319|    423|    if (temp == NULL) {
  ------------------
  |  Branch (3319:9): [True: 0, False: 423]
  ------------------
 3320|      0|      parser->m_attsSize = oldAttsSize;
 3321|      0|      return XML_ERROR_NO_MEMORY;
 3322|      0|    }
 3323|    423|    parser->m_atts = temp;
 3324|       |#ifdef XML_ATTR_INFO
 3325|       |    /* Detect and prevent integer overflow.
 3326|       |     * The preprocessor guard addresses the "always false" warning
 3327|       |     * from -Wtype-limits on platforms where
 3328|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3329|       |#  if UINT_MAX >= SIZE_MAX
 3330|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3331|       |      parser->m_attsSize = oldAttsSize;
 3332|       |      return XML_ERROR_NO_MEMORY;
 3333|       |    }
 3334|       |#  endif
 3335|       |
 3336|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3337|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3338|       |    if (temp2 == NULL) {
 3339|       |      parser->m_attsSize = oldAttsSize;
 3340|       |      return XML_ERROR_NO_MEMORY;
 3341|       |    }
 3342|       |    parser->m_attInfo = temp2;
 3343|       |#endif
 3344|    423|    if (n > oldAttsSize)
  ------------------
  |  Branch (3344:9): [True: 406, False: 17]
  ------------------
 3345|    406|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    406|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3346|    423|  }
 3347|       |
 3348|  3.82M|  appAtts = (const XML_Char **)parser->m_atts;
 3349|  3.90M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3349:15): [True: 81.3k, False: 3.82M]
  ------------------
 3350|  81.3k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3351|       |#ifdef XML_ATTR_INFO
 3352|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3353|       |#endif
 3354|       |    /* add the name and value to the attribute list */
 3355|  81.3k|    ATTRIBUTE_ID *attId
 3356|  81.3k|        = getAttributeId(parser, enc, currAtt->name,
 3357|  81.3k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  81.3k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3358|  81.3k|    if (! attId)
  ------------------
  |  Branch (3358:9): [True: 0, False: 81.3k]
  ------------------
 3359|      0|      return XML_ERROR_NO_MEMORY;
 3360|       |#ifdef XML_ATTR_INFO
 3361|       |    currAttInfo->nameStart
 3362|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3363|       |    currAttInfo->nameEnd
 3364|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3365|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3366|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3367|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3368|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3369|       |#endif
 3370|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3371|       |       namespace processing is turned on and different prefixes for the same
 3372|       |       namespace are used. For this case we have a check further down.
 3373|       |    */
 3374|  81.3k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3374:9): [True: 472, False: 80.9k]
  ------------------
 3375|    472|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3375:11): [True: 471, False: 1]
  ------------------
 3376|    471|        parser->m_eventPtr = parser->m_atts[i].name;
 3377|    472|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3378|    472|    }
 3379|  80.9k|    (attId->name)[-1] = 1;
 3380|  80.9k|    appAtts[attIndex++] = attId->name;
 3381|  80.9k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3381:9): [True: 14.8k, False: 66.0k]
  ------------------
 3382|  14.8k|      enum XML_Error result;
 3383|  14.8k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  14.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3384|       |
 3385|       |      /* figure out whether declared as other than CDATA */
 3386|  14.8k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3386:11): [True: 1.20k, False: 13.6k]
  ------------------
 3387|  1.20k|        int j;
 3388|  40.4k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3388:21): [True: 40.0k, False: 398]
  ------------------
 3389|  40.0k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3389:15): [True: 809, False: 39.2k]
  ------------------
 3390|    809|            isCdata = elementType->defaultAtts[j].isCdata;
 3391|    809|            break;
 3392|    809|          }
 3393|  40.0k|        }
 3394|  1.20k|      }
 3395|       |
 3396|       |      /* normalize the attribute value */
 3397|  14.8k|      result = storeAttributeValue(
 3398|  14.8k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3399|  14.8k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3400|  14.8k|      if (result)
  ------------------
  |  Branch (3400:11): [True: 244, False: 14.5k]
  ------------------
 3401|    244|        return result;
 3402|  14.5k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|  14.5k|#define poolStart(pool) ((pool)->start)
  ------------------
 3403|  14.5k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  14.5k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3404|  66.0k|    } else {
 3405|       |      /* the value did not need normalizing */
 3406|  66.0k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3407|  66.0k|                                          parser->m_atts[i].valuePtr,
 3408|  66.0k|                                          parser->m_atts[i].valueEnd);
 3409|  66.0k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3409:11): [True: 0, False: 66.0k]
  ------------------
 3410|      0|        return XML_ERROR_NO_MEMORY;
 3411|  66.0k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  66.0k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3412|  66.0k|    }
 3413|       |    /* handle prefixed attribute names */
 3414|  80.6k|    if (attId->prefix) {
  ------------------
  |  Branch (3414:9): [True: 0, False: 80.6k]
  ------------------
 3415|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3415:11): [True: 0, False: 0]
  ------------------
 3416|       |        /* deal with namespace declarations here */
 3417|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3418|      0|                                           appAtts[attIndex], bindingsPtr);
 3419|      0|        if (result)
  ------------------
  |  Branch (3419:13): [True: 0, False: 0]
  ------------------
 3420|      0|          return result;
 3421|      0|        --attIndex;
 3422|      0|      } else {
 3423|       |        /* deal with other prefixed names later */
 3424|      0|        attIndex++;
 3425|      0|        nPrefixes++;
 3426|      0|        (attId->name)[-1] = 2;
 3427|      0|      }
 3428|      0|    } else
 3429|  80.6k|      attIndex++;
 3430|  80.6k|  }
 3431|       |
 3432|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3433|  3.82M|  parser->m_nSpecifiedAtts = attIndex;
 3434|  3.82M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3434:7): [True: 799, False: 3.82M]
  |  Branch (3434:29): [True: 594, False: 205]
  ------------------
 3435|    796|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3435:17): [True: 796, False: 0]
  ------------------
 3436|    796|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3436:11): [True: 594, False: 202]
  ------------------
 3437|    594|        parser->m_idAttIndex = i;
 3438|    594|        break;
 3439|    594|      }
 3440|    594|  } else
 3441|  3.82M|    parser->m_idAttIndex = -1;
 3442|       |
 3443|       |  /* do attribute defaulting */
 3444|  3.88M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3444:15): [True: 61.9k, False: 3.82M]
  ------------------
 3445|  61.9k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3446|  61.9k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3446:9): [True: 60.8k, False: 1.11k]
  |  Branch (3446:33): [True: 620, False: 60.2k]
  ------------------
 3447|    620|      if (da->id->prefix) {
  ------------------
  |  Branch (3447:11): [True: 0, False: 620]
  ------------------
 3448|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3448:13): [True: 0, False: 0]
  ------------------
 3449|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3450|      0|                                             da->value, bindingsPtr);
 3451|      0|          if (result)
  ------------------
  |  Branch (3451:15): [True: 0, False: 0]
  ------------------
 3452|      0|            return result;
 3453|      0|        } else {
 3454|      0|          (da->id->name)[-1] = 2;
 3455|      0|          nPrefixes++;
 3456|      0|          appAtts[attIndex++] = da->id->name;
 3457|      0|          appAtts[attIndex++] = da->value;
 3458|      0|        }
 3459|    620|      } else {
 3460|    620|        (da->id->name)[-1] = 1;
 3461|    620|        appAtts[attIndex++] = da->id->name;
 3462|    620|        appAtts[attIndex++] = da->value;
 3463|    620|      }
 3464|    620|    }
 3465|  61.9k|  }
 3466|  3.82M|  appAtts[attIndex] = 0;
 3467|       |
 3468|       |  /* expand prefixed attribute names, check for duplicates,
 3469|       |     and clear flags that say whether attributes were specified */
 3470|  3.82M|  i = 0;
 3471|  3.82M|  if (nPrefixes) {
  ------------------
  |  Branch (3471:7): [True: 0, False: 3.82M]
  ------------------
 3472|      0|    int j; /* hash table index */
 3473|      0|    unsigned long version = parser->m_nsAttsVersion;
 3474|       |
 3475|       |    /* Detect and prevent invalid shift */
 3476|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3476:9): [True: 0, False: 0]
  ------------------
 3477|      0|      return XML_ERROR_NO_MEMORY;
 3478|      0|    }
 3479|       |
 3480|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3481|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3482|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3483|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3483:9): [True: 0, False: 0]
  ------------------
 3484|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3485|      0|      NS_ATT *temp;
 3486|       |      /* hash table size must also be a power of 2 and >= 8 */
 3487|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3487:14): [True: 0, False: 0]
  ------------------
 3488|      0|        ;
 3489|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3489:11): [True: 0, False: 0]
  ------------------
 3490|      0|        parser->m_nsAttsPower = 3;
 3491|       |
 3492|       |      /* Detect and prevent invalid shift */
 3493|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3493:11): [True: 0, False: 0]
  ------------------
 3494|       |        /* Restore actual size of memory in m_nsAtts */
 3495|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3496|      0|        return XML_ERROR_NO_MEMORY;
 3497|      0|      }
 3498|       |
 3499|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3500|       |
 3501|       |      /* Detect and prevent integer overflow.
 3502|       |       * The preprocessor guard addresses the "always false" warning
 3503|       |       * from -Wtype-limits on platforms where
 3504|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3505|       |#if UINT_MAX >= SIZE_MAX
 3506|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3507|       |        /* Restore actual size of memory in m_nsAtts */
 3508|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3509|       |        return XML_ERROR_NO_MEMORY;
 3510|       |      }
 3511|       |#endif
 3512|       |
 3513|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3514|      0|                               nsAttsSize * sizeof(NS_ATT));
 3515|      0|      if (! temp) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 0]
  ------------------
 3516|       |        /* Restore actual size of memory in m_nsAtts */
 3517|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3518|      0|        return XML_ERROR_NO_MEMORY;
 3519|      0|      }
 3520|      0|      parser->m_nsAtts = temp;
 3521|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3522|      0|    }
 3523|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3524|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3524:9): [True: 0, False: 0]
  ------------------
 3525|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  244|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3526|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3526:28): [True: 0, False: 0]
  ------------------
 3527|      0|        parser->m_nsAtts[--j].version = version;
 3528|      0|    }
 3529|      0|    parser->m_nsAttsVersion = --version;
 3530|       |
 3531|       |    /* expand prefixed names and check for duplicates */
 3532|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3532:12): [True: 0, False: 0]
  ------------------
 3533|      0|      const XML_Char *s = appAtts[i];
 3534|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3534:11): [True: 0, False: 0]
  ------------------
 3535|      0|        ATTRIBUTE_ID *id;
 3536|      0|        const BINDING *b;
 3537|      0|        unsigned long uriHash;
 3538|      0|        struct siphash sip_state;
 3539|      0|        struct sipkey sip_key;
 3540|       |
 3541|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3542|      0|        sip24_init(&sip_state, &sip_key);
 3543|       |
 3544|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3545|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3546|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3546:13): [True: 0, False: 0]
  |  Branch (3546:21): [True: 0, False: 0]
  ------------------
 3547|       |          /* This code is walking through the appAtts array, dealing
 3548|       |           * with (in this case) a prefixed attribute name.  To be in
 3549|       |           * the array, the attribute must have already been bound, so
 3550|       |           * has to have passed through the hash table lookup once
 3551|       |           * already.  That implies that an entry for it already
 3552|       |           * exists, so the lookup above will return a pointer to
 3553|       |           * already allocated memory.  There is no opportunaity for
 3554|       |           * the allocator to fail, so the condition above cannot be
 3555|       |           * fulfilled.
 3556|       |           *
 3557|       |           * Since it is difficult to be certain that the above
 3558|       |           * analysis is complete, we retain the test and merely
 3559|       |           * remove the code from coverage tests.
 3560|       |           */
 3561|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3562|      0|        }
 3563|      0|        b = id->prefix->binding;
 3564|      0|        if (! b)
  ------------------
  |  Branch (3564:13): [True: 0, False: 0]
  ------------------
 3565|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3566|       |
 3567|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3567:21): [True: 0, False: 0]
  ------------------
 3568|      0|          const XML_Char c = b->uri[j];
 3569|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3569:15): [True: 0, False: 0]
  ------------------
 3570|      0|            return XML_ERROR_NO_MEMORY;
 3571|      0|        }
 3572|       |
 3573|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3574|       |
 3575|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3575:16): [True: 0, False: 0]
  ------------------
 3576|      0|          ;
 3577|       |
 3578|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3579|       |
 3580|      0|        do { /* copies null terminator */
 3581|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3581:15): [True: 0, False: 0]
  ------------------
 3582|      0|            return XML_ERROR_NO_MEMORY;
 3583|      0|        } while (*s++);
  ------------------
  |  Branch (3583:18): [True: 0, False: 0]
  ------------------
 3584|       |
 3585|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3586|       |
 3587|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3588|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3589|       |          */
 3590|      0|          unsigned char step = 0;
 3591|      0|          unsigned long mask = nsAttsSize - 1;
 3592|      0|          j = uriHash & mask; /* index into hash table */
 3593|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3593:18): [True: 0, False: 0]
  ------------------
 3594|       |            /* for speed we compare stored hash values first */
 3595|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3595:17): [True: 0, False: 0]
  ------------------
 3596|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3597|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3598|       |              /* s1 is null terminated, but not s2 */
 3599|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3599:22): [True: 0, False: 0]
  |  Branch (3599:36): [True: 0, False: 0]
  ------------------
 3600|      0|                ;
 3601|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3601:19): [True: 0, False: 0]
  ------------------
 3602|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3603|      0|            }
 3604|      0|            if (! step)
  ------------------
  |  Branch (3604:17): [True: 0, False: 0]
  ------------------
 3605|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  234|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3606|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3606:13): [True: 0, False: 0]
  ------------------
 3607|      0|          }
 3608|      0|        }
 3609|       |
 3610|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3610:13): [True: 0, False: 0]
  ------------------
 3611|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3612|      0|          s = b->prefix->name;
 3613|      0|          do {
 3614|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3614:17): [True: 0, False: 0]
  ------------------
 3615|      0|              return XML_ERROR_NO_MEMORY;
 3616|      0|          } while (*s++);
  ------------------
  |  Branch (3616:20): [True: 0, False: 0]
  ------------------
 3617|      0|        }
 3618|       |
 3619|       |        /* store expanded name in attribute list */
 3620|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3621|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3622|      0|        appAtts[i] = s;
 3623|       |
 3624|       |        /* fill empty slot with new version, uriName and hash value */
 3625|      0|        parser->m_nsAtts[j].version = version;
 3626|      0|        parser->m_nsAtts[j].hash = uriHash;
 3627|      0|        parser->m_nsAtts[j].uriName = s;
 3628|       |
 3629|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3629:13): [True: 0, False: 0]
  ------------------
 3630|      0|          i += 2;
 3631|      0|          break;
 3632|      0|        }
 3633|      0|      } else                     /* not prefixed */
 3634|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3635|      0|    }
 3636|      0|  }
 3637|       |  /* clear flags for the remaining attributes */
 3638|  3.90M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3638:10): [True: 80.3k, False: 3.82M]
  ------------------
 3639|  80.3k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3640|  3.82M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3640:32): [True: 0, False: 3.82M]
  ------------------
 3641|      0|    binding->attId->name[-1] = 0;
 3642|       |
 3643|  3.82M|  if (! parser->m_ns)
  ------------------
  |  Branch (3643:7): [True: 3.82M, False: 0]
  ------------------
 3644|  3.82M|    return XML_ERROR_NONE;
 3645|       |
 3646|       |  /* expand the element type name */
 3647|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3647:7): [True: 0, False: 0]
  ------------------
 3648|      0|    binding = elementType->prefix->binding;
 3649|      0|    if (! binding)
  ------------------
  |  Branch (3649:9): [True: 0, False: 0]
  ------------------
 3650|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3651|      0|    localPart = tagNamePtr->str;
 3652|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3652:12): [True: 0, False: 0]
  ------------------
 3653|      0|      ;
 3654|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3654:14): [True: 0, False: 0]
  ------------------
 3655|      0|    binding = dtd->defaultPrefix.binding;
 3656|      0|    localPart = tagNamePtr->str;
 3657|      0|  } else
 3658|      0|    return XML_ERROR_NONE;
 3659|      0|  prefixLen = 0;
 3660|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3660:7): [True: 0, False: 0]
  |  Branch (3660:32): [True: 0, False: 0]
  ------------------
 3661|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3661:12): [True: 0, False: 0]
  ------------------
 3662|      0|      ; /* prefixLen includes null terminator */
 3663|      0|  }
 3664|      0|  tagNamePtr->localPart = localPart;
 3665|      0|  tagNamePtr->uriLen = binding->uriLen;
 3666|      0|  tagNamePtr->prefix = binding->prefix->name;
 3667|      0|  tagNamePtr->prefixLen = prefixLen;
 3668|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3668:15): [True: 0, False: 0]
  ------------------
 3669|      0|    ; /* i includes null terminator */
 3670|       |
 3671|       |  /* Detect and prevent integer overflow */
 3672|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3672:7): [True: 0, False: 0]
  ------------------
 3673|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3673:10): [True: 0, False: 0]
  ------------------
 3674|      0|    return XML_ERROR_NO_MEMORY;
 3675|      0|  }
 3676|       |
 3677|      0|  n = i + binding->uriLen + prefixLen;
 3678|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3678:7): [True: 0, False: 0]
  ------------------
 3679|      0|    TAG *p;
 3680|       |
 3681|       |    /* Detect and prevent integer overflow */
 3682|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3682:9): [True: 0, False: 0]
  ------------------
 3683|      0|      return XML_ERROR_NO_MEMORY;
 3684|      0|    }
 3685|       |    /* Detect and prevent integer overflow.
 3686|       |     * The preprocessor guard addresses the "always false" warning
 3687|       |     * from -Wtype-limits on platforms where
 3688|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3689|       |#if UINT_MAX >= SIZE_MAX
 3690|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3691|       |      return XML_ERROR_NO_MEMORY;
 3692|       |    }
 3693|       |#endif
 3694|       |
 3695|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3696|      0|    if (! uri)
  ------------------
  |  Branch (3696:9): [True: 0, False: 0]
  ------------------
 3697|      0|      return XML_ERROR_NO_MEMORY;
 3698|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
 3699|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3700|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3700:34): [True: 0, False: 0]
  ------------------
 3701|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3701:11): [True: 0, False: 0]
  ------------------
 3702|      0|        p->name.str = uri;
 3703|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3704|      0|    binding->uri = uri;
 3705|      0|  }
 3706|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3707|      0|  uri = binding->uri + binding->uriLen;
 3708|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3709|       |  /* we always have a namespace separator between localPart and prefix */
 3710|      0|  if (prefixLen) {
  ------------------
  |  Branch (3710:7): [True: 0, False: 0]
  ------------------
 3711|      0|    uri += i - 1;
 3712|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3713|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3714|      0|  }
 3715|      0|  tagNamePtr->str = binding->uri;
 3716|      0|  return XML_ERROR_NONE;
 3717|      0|}
xmlparse.c:setElementTypePrefix:
 6446|  7.69k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6447|  7.69k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6448|  7.69k|  const XML_Char *name;
 6449|   124k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6449:34): [True: 121k, False: 3.20k]
  ------------------
 6450|   121k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|   121k|#  define XML_T(x) x
  ------------------
  |  Branch (6450:9): [True: 4.48k, False: 116k]
  ------------------
 6451|  4.48k|      PREFIX *prefix;
 6452|  4.48k|      const XML_Char *s;
 6453|  96.8k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6453:35): [True: 92.3k, False: 4.48k]
  ------------------
 6454|  92.3k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  602|  92.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 116, False: 92.2k]
  |  |  |  Branch (602:35): [True: 0, False: 116]
  |  |  ------------------
  |  |  603|  92.3k|       ? 0                                                                     \
  |  |  604|  92.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6454:13): [True: 0, False: 92.3k]
  ------------------
 6455|      0|          return 0;
 6456|  92.3k|      }
 6457|  4.48k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  4.48k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 23, False: 4.46k]
  |  |  |  Branch (602:35): [True: 0, False: 23]
  |  |  ------------------
  |  |  603|  4.48k|       ? 0                                                                     \
  |  |  604|  4.48k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6457:11): [True: 0, False: 4.48k]
  ------------------
 6458|      0|        return 0;
 6459|  4.48k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  595|  4.48k|#define poolStart(pool) ((pool)->start)
  ------------------
 6460|  4.48k|                                sizeof(PREFIX));
 6461|  4.48k|      if (! prefix)
  ------------------
  |  Branch (6461:11): [True: 0, False: 4.48k]
  ------------------
 6462|      0|        return 0;
 6463|  4.48k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|  4.48k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6463:11): [True: 3.70k, False: 781]
  ------------------
 6464|  3.70k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.70k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6465|    781|      else
 6466|    781|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    781|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6467|  4.48k|      elementType->prefix = prefix;
 6468|  4.48k|      break;
 6469|  4.48k|    }
 6470|   121k|  }
 6471|  7.69k|  return 1;
 6472|  7.69k|}
xmlparse.c:freeBindings:
 3223|  36.3k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3224|  36.3k|  while (bindings) {
  ------------------
  |  Branch (3224:10): [True: 0, False: 36.3k]
  ------------------
 3225|      0|    BINDING *b = bindings;
 3226|       |
 3227|       |    /* m_startNamespaceDeclHandler will have been called for this
 3228|       |     * binding in addBindings(), so call the end handler now.
 3229|       |     */
 3230|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3230:9): [True: 0, False: 0]
  ------------------
 3231|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3232|       |
 3233|      0|    bindings = bindings->nextTagBinding;
 3234|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3235|      0|    parser->m_freeBindingList = b;
 3236|      0|    b->prefix->binding = b->prevPrefixBinding;
 3237|      0|  }
 3238|  36.3k|}
xmlparse.c:epilogProcessor:
 5646|    160|                const char **nextPtr) {
 5647|    160|  parser->m_processor = epilogProcessor;
 5648|    160|  parser->m_eventPtr = s;
 5649|  1.17k|  for (;;) {
 5650|  1.17k|    const char *next = NULL;
 5651|  1.17k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.17k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.17k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5652|  1.17k|#ifdef XML_DTD
 5653|  1.17k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5653:9): [True: 0, False: 1.17k]
  ------------------
 5654|  1.17k|                                  XML_ACCOUNT_DIRECT)) {
 5655|      0|      accountingOnAbort(parser);
 5656|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5657|      0|    }
 5658|  1.17k|#endif
 5659|  1.17k|    parser->m_eventEndPtr = next;
 5660|  1.17k|    switch (tok) {
 5661|       |    /* report partial linebreak - it might be the last token */
 5662|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5662:5): [True: 1, False: 1.17k]
  ------------------
 5663|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5663:11): [True: 0, False: 1]
  ------------------
 5664|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5665|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5665:13): [True: 0, False: 0]
  ------------------
 5666|      0|          return XML_ERROR_ABORTED;
 5667|      0|      }
 5668|      1|      *nextPtr = next;
 5669|      1|      return XML_ERROR_NONE;
 5670|     67|    case XML_TOK_NONE:
  ------------------
  |  |   51|     67|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5670:5): [True: 67, False: 1.11k]
  ------------------
 5671|     67|      *nextPtr = s;
 5672|     67|      return XML_ERROR_NONE;
 5673|    355|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    355|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5673:5): [True: 355, False: 823]
  ------------------
 5674|    355|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5674:11): [True: 0, False: 355]
  ------------------
 5675|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5676|    355|      break;
 5677|    469|    case XML_TOK_PI:
  ------------------
  |  |   76|    469|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5677:5): [True: 469, False: 709]
  ------------------
 5678|    469|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5678:11): [True: 0, False: 469]
  ------------------
 5679|      0|        return XML_ERROR_NO_MEMORY;
 5680|    469|      break;
 5681|    469|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5681:5): [True: 194, False: 984]
  ------------------
 5682|    194|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5682:11): [True: 0, False: 194]
  ------------------
 5683|      0|        return XML_ERROR_NO_MEMORY;
 5684|    194|      break;
 5685|    194|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5685:5): [True: 14, False: 1.16k]
  ------------------
 5686|     14|      parser->m_eventPtr = next;
 5687|     14|      return XML_ERROR_INVALID_TOKEN;
 5688|      5|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5688:5): [True: 5, False: 1.17k]
  ------------------
 5689|      5|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5689:11): [True: 5, False: 0]
  ------------------
 5690|      5|        *nextPtr = s;
 5691|      5|        return XML_ERROR_NONE;
 5692|      5|      }
 5693|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5694|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5694:5): [True: 1, False: 1.17k]
  ------------------
 5695|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5695:11): [True: 1, False: 0]
  ------------------
 5696|      1|        *nextPtr = s;
 5697|      1|        return XML_ERROR_NONE;
 5698|      1|      }
 5699|      0|      return XML_ERROR_PARTIAL_CHAR;
 5700|     72|    default:
  ------------------
  |  Branch (5700:5): [True: 72, False: 1.10k]
  ------------------
 5701|     72|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5702|  1.17k|    }
 5703|  1.01k|    parser->m_eventPtr = s = next;
 5704|  1.01k|    switch (parser->m_parsingStatus.parsing) {
 5705|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5705:5): [True: 0, False: 1.01k]
  ------------------
 5706|      0|      *nextPtr = next;
 5707|      0|      return XML_ERROR_NONE;
 5708|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5708:5): [True: 0, False: 1.01k]
  ------------------
 5709|      0|      return XML_ERROR_ABORTED;
 5710|  1.01k|    default:;
  ------------------
  |  Branch (5710:5): [True: 1.01k, False: 0]
  ------------------
 5711|  1.01k|    }
 5712|  1.01k|  }
 5713|    160|}
xmlparse.c:doCdataSection:
 4026|  2.70k|               enum XML_Account account) {
 4027|  2.70k|  const char *s = *startPtr;
 4028|  2.70k|  const char **eventPP;
 4029|  2.70k|  const char **eventEndPP;
 4030|  2.70k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4030:7): [True: 1.80k, False: 903]
  ------------------
 4031|  1.80k|    eventPP = &parser->m_eventPtr;
 4032|  1.80k|    *eventPP = s;
 4033|  1.80k|    eventEndPP = &parser->m_eventEndPtr;
 4034|  1.80k|  } else {
 4035|    903|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4036|    903|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4037|    903|  }
 4038|  2.70k|  *eventPP = s;
 4039|  2.70k|  *startPtr = NULL;
 4040|       |
 4041|   239k|  for (;;) {
 4042|   239k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4043|   239k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   239k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   239k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4044|   239k|#ifdef XML_DTD
 4045|   239k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4045:9): [True: 1, False: 239k]
  ------------------
 4046|      1|      accountingOnAbort(parser);
 4047|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4048|      1|    }
 4049|       |#else
 4050|       |    UNUSED_P(account);
 4051|       |#endif
 4052|   239k|    *eventEndPP = next;
 4053|   239k|    switch (tok) {
 4054|  1.87k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  1.87k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4054:5): [True: 1.87k, False: 237k]
  ------------------
 4055|  1.87k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4055:11): [True: 0, False: 1.87k]
  ------------------
 4056|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4057|       |      /* BEGIN disabled code */
 4058|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4059|  1.87k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4059:16): [Folded - Ignored]
  |  Branch (4059:23): [True: 0, False: 0]
  ------------------
 4060|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4061|      0|                                       0);
 4062|       |      /* END disabled code */
 4063|  1.87k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4063:16): [True: 0, False: 1.87k]
  ------------------
 4064|      0|        reportDefault(parser, enc, s, next);
 4065|  1.87k|      *startPtr = next;
 4066|  1.87k|      *nextPtr = next;
 4067|  1.87k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4067:11): [True: 0, False: 1.87k]
  ------------------
 4068|      0|        return XML_ERROR_ABORTED;
 4069|  1.87k|      else
 4070|  1.87k|        return XML_ERROR_NONE;
 4071|   104k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   104k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4071:5): [True: 104k, False: 135k]
  ------------------
 4072|   104k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4072:11): [True: 0, False: 104k]
  ------------------
 4073|      0|        XML_Char c = 0xA;
 4074|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4075|   104k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4075:18): [True: 0, False: 104k]
  ------------------
 4076|      0|        reportDefault(parser, enc, s, next);
 4077|   104k|      break;
 4078|   132k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   132k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4078:5): [True: 132k, False: 106k]
  ------------------
 4079|   132k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4080|   132k|      if (charDataHandler) {
  ------------------
  |  Branch (4080:11): [True: 0, False: 132k]
  ------------------
 4081|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4082|      0|          for (;;) {
 4083|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4084|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4085|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4086|      0|            *eventEndPP = next;
 4087|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4088|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4089|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4089:17): [True: 0, False: 0]
  ------------------
 4090|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4090:20): [True: 0, False: 0]
  ------------------
 4091|      0|              break;
 4092|      0|            *eventPP = s;
 4093|      0|          }
 4094|      0|        } else
 4095|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4096|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4097|   132k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4097:18): [True: 0, False: 132k]
  ------------------
 4098|      0|        reportDefault(parser, enc, s, next);
 4099|   132k|    } break;
 4100|    137|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    137|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4100:5): [True: 137, False: 239k]
  ------------------
 4101|    137|      *eventPP = next;
 4102|    137|      return XML_ERROR_INVALID_TOKEN;
 4103|    128|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    128|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4103:5): [True: 128, False: 239k]
  ------------------
 4104|    128|      if (haveMore) {
  ------------------
  |  Branch (4104:11): [True: 128, False: 0]
  ------------------
 4105|    128|        *nextPtr = s;
 4106|    128|        return XML_ERROR_NONE;
 4107|    128|      }
 4108|      0|      return XML_ERROR_PARTIAL_CHAR;
 4109|    106|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|    106|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4109:5): [True: 106, False: 239k]
  ------------------
 4110|    567|    case XML_TOK_NONE:
  ------------------
  |  |   51|    567|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4110:5): [True: 461, False: 239k]
  ------------------
 4111|    567|      if (haveMore) {
  ------------------
  |  Branch (4111:11): [True: 502, False: 65]
  ------------------
 4112|    502|        *nextPtr = s;
 4113|    502|        return XML_ERROR_NONE;
 4114|    502|      }
 4115|     65|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4116|      0|    default:
  ------------------
  |  Branch (4116:5): [True: 0, False: 239k]
  ------------------
 4117|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4118|       |       * explicit case, so this default case will never be executed.
 4119|       |       * We retain it as a safety net and exclude it from the coverage
 4120|       |       * statistics.
 4121|       |       *
 4122|       |       * LCOV_EXCL_START
 4123|       |       */
 4124|      0|      *eventPP = next;
 4125|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4126|       |      /* LCOV_EXCL_STOP */
 4127|   239k|    }
 4128|       |
 4129|   237k|    *eventPP = s = next;
 4130|   237k|    switch (parser->m_parsingStatus.parsing) {
 4131|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4131:5): [True: 0, False: 237k]
  ------------------
 4132|      0|      *nextPtr = next;
 4133|      0|      return XML_ERROR_NONE;
 4134|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4134:5): [True: 0, False: 237k]
  ------------------
 4135|      0|      return XML_ERROR_ABORTED;
 4136|   237k|    default:;
  ------------------
  |  Branch (4136:5): [True: 237k, False: 0]
  ------------------
 4137|   237k|    }
 4138|   237k|  }
 4139|       |  /* not reached */
 4140|  2.70k|}
xmlparse.c:storeRawNames:
 2571|  7.18k|storeRawNames(XML_Parser parser) {
 2572|  7.18k|  TAG *tag = parser->m_tagStack;
 2573|  68.5k|  while (tag) {
  ------------------
  |  Branch (2573:10): [True: 61.3k, False: 7.18k]
  ------------------
 2574|  61.3k|    int bufSize;
 2575|  61.3k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2576|  61.3k|    size_t rawNameLen;
 2577|  61.3k|    char *rawNameBuf = tag->buf + nameLen;
 2578|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2579|       |       at the first entry that has already been copied; everything
 2580|       |       below it in the stack is already been accounted for in a
 2581|       |       previous call to this function.
 2582|       |    */
 2583|  61.3k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2583:9): [True: 0, False: 61.3k]
  ------------------
 2584|      0|      break;
 2585|       |    /* For re-use purposes we need to ensure that the
 2586|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2587|       |    */
 2588|  61.3k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  196|  61.3k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2589|       |    /* Detect and prevent integer overflow. */
 2590|  61.3k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2590:9): [True: 0, False: 61.3k]
  ------------------
 2591|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2592|  61.3k|    bufSize = nameLen + (int)rawNameLen;
 2593|  61.3k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2593:9): [True: 1.19k, False: 60.1k]
  ------------------
 2594|  1.19k|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  1.19k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2595|  1.19k|      if (temp == NULL)
  ------------------
  |  Branch (2595:11): [True: 0, False: 1.19k]
  ------------------
 2596|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2597|       |      /* if tag->name.str points to tag->buf (only when namespace
 2598|       |         processing is off) then we have to update it
 2599|       |      */
 2600|  1.19k|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2600:11): [True: 1.19k, False: 0]
  ------------------
 2601|  1.19k|        tag->name.str = (XML_Char *)temp;
 2602|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2603|       |         then update it as well, since it will always point into tag->buf
 2604|       |      */
 2605|  1.19k|      if (tag->name.localPart)
  ------------------
  |  Branch (2605:11): [True: 0, False: 1.19k]
  ------------------
 2606|      0|        tag->name.localPart
 2607|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2608|  1.19k|      tag->buf = temp;
 2609|  1.19k|      tag->bufEnd = temp + bufSize;
 2610|  1.19k|      rawNameBuf = temp + nameLen;
 2611|  1.19k|    }
 2612|  61.3k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2613|  61.3k|    tag->rawName = rawNameBuf;
 2614|  61.3k|    tag = tag->parent;
 2615|  61.3k|  }
 2616|  7.18k|  return XML_TRUE;
  ------------------
  |  |   55|  7.18k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2617|  7.18k|}
xmlparse.c:getElementType:
 7614|  10.6k|               const char *end) {
 7615|  10.6k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7616|  10.6k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7617|  10.6k|  ELEMENT_TYPE *ret;
 7618|       |
 7619|  10.6k|  if (! name)
  ------------------
  |  Branch (7619:7): [True: 0, False: 10.6k]
  ------------------
 7620|      0|    return NULL;
 7621|  10.6k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7622|  10.6k|                               sizeof(ELEMENT_TYPE));
 7623|  10.6k|  if (! ret)
  ------------------
  |  Branch (7623:7): [True: 0, False: 10.6k]
  ------------------
 7624|      0|    return NULL;
 7625|  10.6k|  if (ret->name != name)
  ------------------
  |  Branch (7625:7): [True: 2.95k, False: 7.69k]
  ------------------
 7626|  2.95k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  2.95k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7627|  7.69k|  else {
 7628|  7.69k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.69k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7629|  7.69k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7629:9): [True: 0, False: 7.69k]
  ------------------
 7630|      0|      return NULL;
 7631|  7.69k|  }
 7632|  10.6k|  return ret;
 7633|  10.6k|}
xmlparse.c:getAttributeId:
 6476|   115k|               const char *end) {
 6477|   115k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6478|   115k|  ATTRIBUTE_ID *id;
 6479|   115k|  const XML_Char *name;
 6480|   115k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|   115k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 351, False: 115k]
  |  |  |  Branch (602:35): [True: 0, False: 351]
  |  |  ------------------
  |  |  603|   115k|       ? 0                                                                     \
  |  |  604|   115k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6480:7): [True: 0, False: 115k]
  ------------------
 6481|      0|    return NULL;
 6482|   115k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6483|   115k|  if (! name)
  ------------------
  |  Branch (6483:7): [True: 0, False: 115k]
  ------------------
 6484|      0|    return NULL;
 6485|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6486|   115k|  ++name;
 6487|   115k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6488|   115k|                              sizeof(ATTRIBUTE_ID));
 6489|   115k|  if (! id)
  ------------------
  |  Branch (6489:7): [True: 0, False: 115k]
  ------------------
 6490|      0|    return NULL;
 6491|   115k|  if (id->name != name)
  ------------------
  |  Branch (6491:7): [True: 108k, False: 7.42k]
  ------------------
 6492|   108k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   108k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6493|  7.42k|  else {
 6494|  7.42k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.42k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6495|  7.42k|    if (! parser->m_ns)
  ------------------
  |  Branch (6495:9): [True: 7.42k, False: 0]
  ------------------
 6496|  7.42k|      ;
 6497|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6497:14): [True: 0, False: 0]
  |  Branch (6497:43): [True: 0, False: 0]
  ------------------
 6498|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:17): [True: 0, False: 0]
  |  Branch (6498:46): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  ------------------
 6500|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:18): [True: 0, False: 0]
  |  Branch (6500:44): [True: 0, False: 0]
  ------------------
 6501|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:11): [True: 0, False: 0]
  ------------------
 6502|      0|        id->prefix = &dtd->defaultPrefix;
 6503|      0|      else
 6504|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6505|      0|                                      sizeof(PREFIX));
 6506|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6507|      0|    } else {
 6508|      0|      int i;
 6509|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6509:19): [True: 0, False: 0]
  ------------------
 6510|       |        /* attributes without prefix are *not* in the default namespace */
 6511|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6511:13): [True: 0, False: 0]
  ------------------
 6512|      0|          int j;
 6513|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6513:23): [True: 0, False: 0]
  ------------------
 6514|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6514:17): [True: 0, False: 0]
  ------------------
 6515|      0|              return NULL;
 6516|      0|          }
 6517|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6517:15): [True: 0, False: 0]
  ------------------
 6518|      0|            return NULL;
 6519|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6520|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6521|      0|          if (! id->prefix)
  ------------------
  |  Branch (6521:15): [True: 0, False: 0]
  ------------------
 6522|      0|            return NULL;
 6523|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6523:15): [True: 0, False: 0]
  ------------------
 6524|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6525|      0|          else
 6526|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6527|      0|          break;
 6528|      0|        }
 6529|      0|      }
 6530|      0|    }
 6531|  7.42k|  }
 6532|   115k|  return id;
 6533|   115k|}
xmlparse.c:poolAppend:
 7220|  13.5M|           const char *end) {
 7221|  13.5M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7221:7): [True: 56.8k, False: 13.5M]
  |  Branch (7221:22): [True: 0, False: 56.8k]
  ------------------
 7222|      0|    return NULL;
 7223|  13.5M|  for (;;) {
 7224|  13.5M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|  13.5M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  13.5M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7225|  13.5M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7226|  13.5M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7226:9): [True: 13.5M, False: 11.3k]
  ------------------
 7227|  13.5M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7227:12): [True: 0, False: 11.3k]
  ------------------
 7228|  13.5M|      break;
 7229|  11.3k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7229:9): [True: 0, False: 11.3k]
  ------------------
 7230|      0|      return NULL;
 7231|  11.3k|  }
 7232|  13.5M|  return pool->start;
 7233|  13.5M|}
xmlparse.c:defineAttribute:
 6386|  33.0k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6387|  33.0k|  DEFAULT_ATTRIBUTE *att;
 6388|  33.0k|  if (value || isId) {
  ------------------
  |  Branch (6388:7): [True: 9.24k, False: 23.8k]
  |  Branch (6388:16): [True: 1.38k, False: 22.4k]
  ------------------
 6389|       |    /* The handling of default attributes gets messed up if we have
 6390|       |       a default which duplicates a non-default. */
 6391|  10.6k|    int i;
 6392|  44.9k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6392:17): [True: 43.0k, False: 1.94k]
  ------------------
 6393|  43.0k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6393:11): [True: 8.68k, False: 34.3k]
  ------------------
 6394|  8.68k|        return 1;
 6395|  1.94k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6395:9): [True: 532, False: 1.41k]
  |  Branch (6395:17): [True: 355, False: 177]
  |  Branch (6395:34): [True: 355, False: 0]
  ------------------
 6396|    355|      type->idAtt = attId;
 6397|  1.94k|  }
 6398|  24.3k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6398:7): [True: 1.36k, False: 23.0k]
  ------------------
 6399|  1.36k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6399:9): [True: 1.11k, False: 253]
  ------------------
 6400|  1.11k|      type->allocDefaultAtts = 8;
 6401|  1.11k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  713|  1.11k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6402|  1.11k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6403|  1.11k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6403:11): [True: 0, False: 1.11k]
  ------------------
 6404|      0|        type->allocDefaultAtts = 0;
 6405|      0|        return 0;
 6406|      0|      }
 6407|  1.11k|    } else {
 6408|    253|      DEFAULT_ATTRIBUTE *temp;
 6409|       |
 6410|       |      /* Detect and prevent integer overflow */
 6411|    253|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6411:11): [True: 0, False: 253]
  ------------------
 6412|      0|        return 0;
 6413|      0|      }
 6414|       |
 6415|    253|      int count = type->allocDefaultAtts * 2;
 6416|       |
 6417|       |      /* Detect and prevent integer overflow.
 6418|       |       * The preprocessor guard addresses the "always false" warning
 6419|       |       * from -Wtype-limits on platforms where
 6420|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6421|       |#if UINT_MAX >= SIZE_MAX
 6422|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6423|       |        return 0;
 6424|       |      }
 6425|       |#endif
 6426|       |
 6427|    253|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  714|    253|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6428|    253|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6429|    253|      if (temp == NULL)
  ------------------
  |  Branch (6429:11): [True: 0, False: 253]
  ------------------
 6430|      0|        return 0;
 6431|    253|      type->allocDefaultAtts = count;
 6432|    253|      type->defaultAtts = temp;
 6433|    253|    }
 6434|  1.36k|  }
 6435|  24.3k|  att = type->defaultAtts + type->nDefaultAtts;
 6436|  24.3k|  att->id = attId;
 6437|  24.3k|  att->value = value;
 6438|  24.3k|  att->isCdata = isCdata;
 6439|  24.3k|  if (! isCdata)
  ------------------
  |  Branch (6439:7): [True: 24.3k, False: 77]
  ------------------
 6440|  24.3k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  24.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6441|  24.3k|  type->nDefaultAtts += 1;
 6442|  24.3k|  return 1;
 6443|  24.3k|}
xmlparse.c:poolGrow:
 7321|  82.8k|poolGrow(STRING_POOL *pool) {
 7322|  82.8k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7322:7): [True: 54.2k, False: 28.5k]
  ------------------
 7323|  54.2k|    if (pool->start == 0) {
  ------------------
  |  Branch (7323:9): [True: 52.0k, False: 2.29k]
  ------------------
 7324|  52.0k|      pool->blocks = pool->freeBlocks;
 7325|  52.0k|      pool->freeBlocks = pool->freeBlocks->next;
 7326|  52.0k|      pool->blocks->next = NULL;
 7327|  52.0k|      pool->start = pool->blocks->s;
 7328|  52.0k|      pool->end = pool->start + pool->blocks->size;
 7329|  52.0k|      pool->ptr = pool->start;
 7330|  52.0k|      return XML_TRUE;
  ------------------
  |  |   55|  52.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7331|  52.0k|    }
 7332|  2.29k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7332:9): [True: 1.91k, False: 373]
  ------------------
 7333|  1.91k|      BLOCK *tem = pool->freeBlocks->next;
 7334|  1.91k|      pool->freeBlocks->next = pool->blocks;
 7335|  1.91k|      pool->blocks = pool->freeBlocks;
 7336|  1.91k|      pool->freeBlocks = tem;
 7337|  1.91k|      memcpy(pool->blocks->s, pool->start,
 7338|  1.91k|             (pool->end - pool->start) * sizeof(XML_Char));
 7339|  1.91k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7340|  1.91k|      pool->start = pool->blocks->s;
 7341|  1.91k|      pool->end = pool->start + pool->blocks->size;
 7342|  1.91k|      return XML_TRUE;
  ------------------
  |  |   55|  1.91k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7343|  1.91k|    }
 7344|  2.29k|  }
 7345|  28.9k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7345:7): [True: 11.2k, False: 17.7k]
  |  Branch (7345:23): [True: 8.61k, False: 2.61k]
  ------------------
 7346|  8.61k|    BLOCK *temp;
 7347|  8.61k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7348|  8.61k|    size_t bytesToAllocate;
 7349|       |
 7350|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7351|       |             to avoid dangling pointers: */
 7352|  8.61k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7353|       |
 7354|  8.61k|    if (blockSize < 0) {
  ------------------
  |  Branch (7354:9): [True: 0, False: 8.61k]
  ------------------
 7355|       |      /* This condition traps a situation where either more than
 7356|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7357|       |       * readily testable, since it is unlikely that an average
 7358|       |       * machine will have that much memory, so we exclude it from the
 7359|       |       * coverage statistics.
 7360|       |       */
 7361|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7362|      0|    }
 7363|       |
 7364|  8.61k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7365|  8.61k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7365:9): [True: 0, False: 8.61k]
  ------------------
 7366|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7367|       |
 7368|  8.61k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7369|  8.61k|                                           (unsigned)bytesToAllocate);
 7370|  8.61k|    if (temp == NULL)
  ------------------
  |  Branch (7370:9): [True: 0, False: 8.61k]
  ------------------
 7371|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7372|  8.61k|    pool->blocks = temp;
 7373|  8.61k|    pool->blocks->size = blockSize;
 7374|  8.61k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7375|  8.61k|    pool->start = pool->blocks->s;
 7376|  8.61k|    pool->end = pool->start + blockSize;
 7377|  20.3k|  } else {
 7378|  20.3k|    BLOCK *tem;
 7379|  20.3k|    int blockSize = (int)(pool->end - pool->start);
 7380|  20.3k|    size_t bytesToAllocate;
 7381|       |
 7382|  20.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7382:9): [True: 0, False: 20.3k]
  ------------------
 7383|       |      /* This condition traps a situation where either more than
 7384|       |       * INT_MAX bytes have already been allocated (which is prevented
 7385|       |       * by various pieces of program logic, not least this one, never
 7386|       |       * mind the unlikelihood of actually having that much memory) or
 7387|       |       * the pool control fields have been corrupted (which could
 7388|       |       * conceivably happen in an extremely buggy user handler
 7389|       |       * function).  Either way it isn't readily testable, so we
 7390|       |       * exclude it from the coverage statistics.
 7391|       |       */
 7392|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7393|      0|    }
 7394|       |
 7395|  20.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  245|  20.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7395:9): [True: 19.9k, False: 418]
  ------------------
 7396|  19.9k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  245|  19.9k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7397|    418|    else {
 7398|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7399|    418|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7399:11): [True: 0, False: 418]
  ------------------
 7400|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7401|      0|      }
 7402|    418|      blockSize *= 2;
 7403|    418|    }
 7404|       |
 7405|  20.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7406|  20.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7406:9): [True: 0, False: 20.3k]
  ------------------
 7407|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7408|       |
 7409|  20.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7410|  20.3k|    if (! tem)
  ------------------
  |  Branch (7410:9): [True: 0, False: 20.3k]
  ------------------
 7411|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7412|  20.3k|    tem->size = blockSize;
 7413|  20.3k|    tem->next = pool->blocks;
 7414|  20.3k|    pool->blocks = tem;
 7415|  20.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7415:9): [True: 2.22k, False: 18.1k]
  ------------------
 7416|  2.22k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7417|  20.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7418|  20.3k|    pool->start = tem->s;
 7419|  20.3k|    pool->end = tem->s + blockSize;
 7420|  20.3k|  }
 7421|  28.9k|  return XML_TRUE;
  ------------------
  |  |   55|  28.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7422|  28.9k|}
xmlparse.c:poolBytesToAllocateFor:
 7293|  28.9k|poolBytesToAllocateFor(int blockSize) {
 7294|       |  /* Unprotected math would be:
 7295|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7296|       |  **
 7297|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7298|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7299|       |  ** on top has no chance of making us accept a small non-negative number
 7300|       |  */
 7301|  28.9k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7302|       |
 7303|  28.9k|  if (blockSize <= 0)
  ------------------
  |  Branch (7303:7): [True: 0, False: 28.9k]
  ------------------
 7304|      0|    return 0;
 7305|       |
 7306|  28.9k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7306:7): [True: 0, False: 28.9k]
  ------------------
 7307|      0|    return 0;
 7308|       |
 7309|  28.9k|  {
 7310|  28.9k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7311|  28.9k|    const int bytesToAllocate
 7312|  28.9k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7313|  28.9k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7313:9): [True: 0, False: 28.9k]
  ------------------
 7314|      0|      return 0;
 7315|       |
 7316|  28.9k|    return (size_t)bytesToAllocate;
 7317|  28.9k|  }
 7318|  28.9k|}
xmlparse.c:storeAttributeValue:
 5871|  24.0k|                    enum XML_Account account) {
 5872|  24.0k|  enum XML_Error result
 5873|  24.0k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5874|  24.0k|  if (result)
  ------------------
  |  Branch (5874:7): [True: 258, False: 23.8k]
  ------------------
 5875|    258|    return result;
 5876|  23.8k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  596|  33.6k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (596:26): [True: 4.01k, False: 5.80k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  598|  4.01k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5876:7): [True: 9.82k, False: 14.0k]
  |  Branch (5876:40): [True: 1.65k, False: 2.36k]
  ------------------
 5877|  1.65k|    poolChop(pool);
  ------------------
  |  |  597|  1.65k|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5878|  23.8k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  602|  23.8k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 754, False: 23.0k]
  |  |  |  Branch (602:35): [True: 0, False: 754]
  |  |  ------------------
  |  |  603|  23.8k|       ? 0                                                                     \
  |  |  604|  23.8k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5878:7): [True: 0, False: 23.8k]
  ------------------
 5879|      0|    return XML_ERROR_NO_MEMORY;
 5880|  23.8k|  return XML_ERROR_NONE;
 5881|  23.8k|}
xmlparse.c:appendAttributeValue:
 5886|  2.05M|                     enum XML_Account account) {
 5887|  2.05M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5888|       |#ifndef XML_DTD
 5889|       |  UNUSED_P(account);
 5890|       |#endif
 5891|       |
 5892|  35.6M|  for (;;) {
 5893|  35.6M|    const char *next
 5894|  35.6M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5895|  35.6M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  35.6M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  35.6M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5896|  35.6M|#ifdef XML_DTD
 5897|  35.6M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5897:9): [True: 38, False: 35.6M]
  ------------------
 5898|     38|      accountingOnAbort(parser);
 5899|     38|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5900|     38|    }
 5901|  35.6M|#endif
 5902|  35.6M|    switch (tok) {
 5903|  2.05M|    case XML_TOK_NONE:
  ------------------
  |  |   51|  2.05M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5903:5): [True: 2.05M, False: 33.5M]
  ------------------
 5904|  2.05M|      return XML_ERROR_NONE;
 5905|      9|    case XML_TOK_INVALID:
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5905:5): [True: 9, False: 35.6M]
  ------------------
 5906|      9|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5906:11): [True: 6, False: 3]
  ------------------
 5907|      6|        parser->m_eventPtr = next;
 5908|      9|      return XML_ERROR_INVALID_TOKEN;
 5909|      6|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5909:5): [True: 6, False: 35.6M]
  ------------------
 5910|      6|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5910:11): [True: 5, False: 1]
  ------------------
 5911|      5|        parser->m_eventPtr = ptr;
 5912|      6|      return XML_ERROR_INVALID_TOKEN;
 5913|  6.63k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.63k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5913:5): [True: 6.63k, False: 35.6M]
  ------------------
 5914|  6.63k|      XML_Char buf[XML_ENCODE_MAX];
 5915|  6.63k|      int i;
 5916|  6.63k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  6.63k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5917|  6.63k|      if (n < 0) {
  ------------------
  |  Branch (5917:11): [True: 49, False: 6.58k]
  ------------------
 5918|     49|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5918:13): [True: 48, False: 1]
  ------------------
 5919|     48|          parser->m_eventPtr = ptr;
 5920|     49|        return XML_ERROR_BAD_CHAR_REF;
 5921|     49|      }
 5922|  6.58k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5922:11): [True: 971, False: 5.61k]
  |  Branch (5922:24): [True: 618, False: 353]
  ------------------
 5923|  6.58k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|    618|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|    416|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5923:15): [True: 202, False: 416]
  |  Branch (5923:40): [True: 201, False: 215]
  ------------------
 5924|    403|        break;
 5925|  6.17k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  6.17k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5926|       |      /* The XmlEncode() functions can never return 0 here.  That
 5927|       |       * error return happens if the code point passed in is either
 5928|       |       * negative or greater than or equal to 0x110000.  The
 5929|       |       * XmlCharRefNumber() functions will all return a number
 5930|       |       * strictly less than 0x110000 or a negative value if an error
 5931|       |       * occurred.  The negative value is intercepted above, so
 5932|       |       * XmlEncode() is never passed a value it might return an
 5933|       |       * error for.
 5934|       |       */
 5935|  20.6k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5935:19): [True: 14.4k, False: 6.17k]
  ------------------
 5936|  14.4k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  602|  14.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 333, False: 14.1k]
  |  |  |  Branch (602:35): [True: 0, False: 333]
  |  |  ------------------
  |  |  603|  14.4k|       ? 0                                                                     \
  |  |  604|  14.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5936:13): [True: 0, False: 14.4k]
  ------------------
 5937|      0|          return XML_ERROR_NO_MEMORY;
 5938|  14.4k|      }
 5939|  6.17k|    } break;
 5940|  10.7M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  10.7M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5940:5): [True: 10.7M, False: 24.8M]
  ------------------
 5941|  10.7M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5941:11): [True: 0, False: 10.7M]
  ------------------
 5942|      0|        return XML_ERROR_NO_MEMORY;
 5943|  10.7M|      break;
 5944|  10.7M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.19k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5944:5): [True: 1.19k, False: 35.6M]
  ------------------
 5945|  1.19k|      next = ptr + enc->minBytesPerChar;
 5946|       |      /* fall through */
 5947|  3.60M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  3.60M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5947:5): [True: 3.60M, False: 32.0M]
  ------------------
 5948|  20.3M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  20.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5948:5): [True: 16.7M, False: 18.8M]
  ------------------
 5949|  20.3M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|  8.29M|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|  8.28M|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5949:11): [True: 8.29M, False: 12.0M]
  |  Branch (5949:25): [True: 2.69k, False: 8.28M]
  |  Branch (5949:50): [True: 8.27M, False: 8.64k]
  ------------------
 5950|  8.28M|        break;
 5951|  12.0M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  602|  12.0M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.93k, False: 12.0M]
  |  |  |  Branch (602:35): [True: 0, False: 1.93k]
  |  |  ------------------
  |  |  603|  12.0M|       ? 0                                                                     \
  |  |  604|  12.0M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5951:11): [True: 0, False: 12.0M]
  ------------------
 5952|      0|        return XML_ERROR_NO_MEMORY;
 5953|  12.0M|      break;
 5954|  12.0M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  2.44M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5954:5): [True: 2.44M, False: 33.2M]
  ------------------
 5955|  2.44M|      const XML_Char *name;
 5956|  2.44M|      ENTITY *entity;
 5957|  2.44M|      char checkEntityDecl;
 5958|  2.44M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  2.44M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5959|  2.44M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5960|  2.44M|      if (ch) {
  ------------------
  |  Branch (5960:11): [True: 411k, False: 2.02M]
  ------------------
 5961|   411k|#ifdef XML_DTD
 5962|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5963|       |         *       so there is no amplification and hence recording without
 5964|       |         *       protection. */
 5965|   411k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5966|   411k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5967|   411k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5968|   411k|#endif /* XML_DTD */
 5969|   411k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  602|   411k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 267, False: 411k]
  |  |  |  Branch (602:35): [True: 0, False: 267]
  |  |  ------------------
  |  |  603|   411k|       ? 0                                                                     \
  |  |  604|   411k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5969:13): [True: 0, False: 411k]
  ------------------
 5970|      0|          return XML_ERROR_NO_MEMORY;
 5971|   411k|        break;
 5972|   411k|      }
 5973|  2.02M|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5974|  2.02M|                             ptr + enc->minBytesPerChar,
 5975|  2.02M|                             next - enc->minBytesPerChar);
 5976|  2.02M|      if (! name)
  ------------------
  |  Branch (5976:11): [True: 0, False: 2.02M]
  ------------------
 5977|      0|        return XML_ERROR_NO_MEMORY;
 5978|  2.02M|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5979|  2.02M|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  599|  2.02M|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5980|       |      /* First, determine if a check for an existing declaration is needed;
 5981|       |         if yes, check that the entity exists, and that it is internal.
 5982|       |      */
 5983|  2.02M|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5983:11): [True: 25.3k, False: 2.00M]
  ------------------
 5984|  25.3k|        checkEntityDecl =
 5985|  25.3k|#ifdef XML_DTD
 5986|  25.3k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5986:13): [True: 25.3k, False: 0]
  ------------------
 5987|  25.3k|#endif /* XML_DTD */
 5988|  25.3k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5988:13): [True: 25.3k, False: 0]
  |  Branch (5988:14): [True: 194, False: 25.1k]
  ------------------
 5989|  25.3k|                             : ! dtd->hasParamEntityRefs);
 5990|  2.00M|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5991|  2.00M|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5991:27): [True: 2.00M, False: 965]
  |  Branch (5991:56): [True: 0, False: 965]
  ------------------
 5992|  2.02M|      if (checkEntityDecl) {
  ------------------
  |  Branch (5992:11): [True: 2.02M, False: 965]
  ------------------
 5993|  2.02M|        if (! entity)
  ------------------
  |  Branch (5993:13): [True: 150, False: 2.02M]
  ------------------
 5994|    150|          return XML_ERROR_UNDEFINED_ENTITY;
 5995|  2.02M|        else if (! entity->is_internal)
  ------------------
  |  Branch (5995:18): [True: 0, False: 2.02M]
  ------------------
 5996|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5997|  2.02M|      } else if (! entity) {
  ------------------
  |  Branch (5997:18): [True: 747, False: 218]
  ------------------
 5998|       |        /* Cannot report skipped entity here - see comments on
 5999|       |           parser->m_skippedEntityHandler.
 6000|       |        if (parser->m_skippedEntityHandler)
 6001|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6002|       |        */
 6003|       |        /* Cannot call the default handler because this would be
 6004|       |           out of sync with the call to the startElementHandler.
 6005|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6006|       |          reportDefault(parser, enc, ptr, next);
 6007|       |        */
 6008|    747|        break;
 6009|    747|      }
 6010|  2.02M|      if (entity->open) {
  ------------------
  |  Branch (6010:11): [True: 2, False: 2.02M]
  ------------------
 6011|      2|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6011:13): [True: 0, False: 2]
  ------------------
 6012|       |          /* It does not appear that this line can be executed.
 6013|       |           *
 6014|       |           * The "if (entity->open)" check catches recursive entity
 6015|       |           * definitions.  In order to be called with an open
 6016|       |           * entity, it must have gone through this code before and
 6017|       |           * been through the recursive call to
 6018|       |           * appendAttributeValue() some lines below.  That call
 6019|       |           * sets the local encoding ("enc") to the parser's
 6020|       |           * internal encoding (internal_utf8 or internal_utf16),
 6021|       |           * which can never be the same as the principle encoding.
 6022|       |           * It doesn't appear there is another code path that gets
 6023|       |           * here with entity->open being TRUE.
 6024|       |           *
 6025|       |           * Since it is not certain that this logic is watertight,
 6026|       |           * we keep the line and merely exclude it from coverage
 6027|       |           * tests.
 6028|       |           */
 6029|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6030|      0|        }
 6031|      2|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6032|      2|      }
 6033|  2.02M|      if (entity->notation) {
  ------------------
  |  Branch (6033:11): [True: 2, False: 2.02M]
  ------------------
 6034|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6034:13): [True: 1, False: 1]
  ------------------
 6035|      1|          parser->m_eventPtr = ptr;
 6036|      2|        return XML_ERROR_BINARY_ENTITY_REF;
 6037|      2|      }
 6038|  2.02M|      if (! entity->textPtr) {
  ------------------
  |  Branch (6038:11): [True: 2, False: 2.02M]
  ------------------
 6039|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6039:13): [True: 1, False: 1]
  ------------------
 6040|      1|          parser->m_eventPtr = ptr;
 6041|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6042|  2.02M|      } else {
 6043|  2.02M|        enum XML_Error result;
 6044|  2.02M|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6045|  2.02M|        entity->open = XML_TRUE;
  ------------------
  |  |   55|  2.02M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6046|  2.02M|#ifdef XML_DTD
 6047|  2.02M|        entityTrackingOnOpen(parser, entity, __LINE__);
 6048|  2.02M|#endif
 6049|  2.02M|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6050|  2.02M|                                      isCdata, (const char *)entity->textPtr,
 6051|  2.02M|                                      (const char *)textEnd, pool,
 6052|  2.02M|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6053|  2.02M|#ifdef XML_DTD
 6054|  2.02M|        entityTrackingOnClose(parser, entity, __LINE__);
 6055|  2.02M|#endif
 6056|  2.02M|        entity->open = XML_FALSE;
  ------------------
  |  |   56|  2.02M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6057|  2.02M|        if (result)
  ------------------
  |  Branch (6057:13): [True: 230, False: 2.02M]
  ------------------
 6058|    230|          return result;
 6059|  2.02M|      }
 6060|  2.02M|    } break;
 6061|  2.02M|    default:
  ------------------
  |  Branch (6061:5): [True: 0, False: 35.6M]
  ------------------
 6062|       |      /* The only token returned by XmlAttributeValueTok() that does
 6063|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6064|       |       * Getting that would require an entity name to contain an
 6065|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6066|       |       * tokenisers will have already recognised and rejected such
 6067|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6068|       |       * default case should be retained as a safety net, but the code
 6069|       |       * excluded from coverage tests.
 6070|       |       *
 6071|       |       * LCOV_EXCL_START
 6072|       |       */
 6073|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6073:11): [True: 0, False: 0]
  ------------------
 6074|      0|        parser->m_eventPtr = ptr;
 6075|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6076|       |      /* LCOV_EXCL_STOP */
 6077|  35.6M|    }
 6078|  33.5M|    ptr = next;
 6079|  33.5M|  }
 6080|       |  /* not reached */
 6081|  2.05M|}
xmlparse.c:storeEntityValue:
 6086|  7.97k|                 enum XML_Account account) {
 6087|  7.97k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6088|  7.97k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6089|  7.97k|  enum XML_Error result = XML_ERROR_NONE;
 6090|  7.97k|#ifdef XML_DTD
 6091|  7.97k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6092|  7.97k|  parser->m_prologState.inEntityValue = 1;
 6093|       |#else
 6094|       |  UNUSED_P(account);
 6095|       |#endif /* XML_DTD */
 6096|       |  /* never return Null for the value argument in EntityDeclHandler,
 6097|       |     since this would indicate an external entity; therefore we
 6098|       |     have to make sure that entityValuePool.start is not null */
 6099|  7.97k|  if (! pool->blocks) {
  ------------------
  |  Branch (6099:7): [True: 2.44k, False: 5.52k]
  ------------------
 6100|  2.44k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6100:9): [True: 0, False: 2.44k]
  ------------------
 6101|      0|      return XML_ERROR_NO_MEMORY;
 6102|  2.44k|  }
 6103|       |
 6104|   811k|  for (;;) {
 6105|   811k|    const char *next
 6106|   811k|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6107|   811k|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|   811k|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   811k|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6108|       |
 6109|   811k|#ifdef XML_DTD
 6110|   811k|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6110:9): [True: 0, False: 811k]
  ------------------
 6111|   811k|                                  account)) {
 6112|      0|      accountingOnAbort(parser);
 6113|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6114|      0|      goto endEntityValue;
 6115|      0|    }
 6116|   811k|#endif
 6117|       |
 6118|   811k|    switch (tok) {
 6119|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6119:5): [True: 2, False: 811k]
  ------------------
 6120|      2|#ifdef XML_DTD
 6121|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6121:11): [True: 0, False: 2]
  |  Branch (6121:38): [True: 0, False: 2]
  ------------------
 6122|      0|        const XML_Char *name;
 6123|      0|        ENTITY *entity;
 6124|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6125|      0|                               entityTextPtr + enc->minBytesPerChar,
 6126|      0|                               next - enc->minBytesPerChar);
 6127|      0|        if (! name) {
  ------------------
  |  Branch (6127:13): [True: 0, False: 0]
  ------------------
 6128|      0|          result = XML_ERROR_NO_MEMORY;
 6129|      0|          goto endEntityValue;
 6130|      0|        }
 6131|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6132|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6133|      0|        if (! entity) {
  ------------------
  |  Branch (6133:13): [True: 0, False: 0]
  ------------------
 6134|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6135|       |          /* cannot report skipped entity here - see comments on
 6136|       |             parser->m_skippedEntityHandler
 6137|       |          if (parser->m_skippedEntityHandler)
 6138|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6139|       |          */
 6140|      0|          dtd->keepProcessing = dtd->standalone;
 6141|      0|          goto endEntityValue;
 6142|      0|        }
 6143|      0|        if (entity->open) {
  ------------------
  |  Branch (6143:13): [True: 0, False: 0]
  ------------------
 6144|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6144:15): [True: 0, False: 0]
  ------------------
 6145|      0|            parser->m_eventPtr = entityTextPtr;
 6146|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6147|      0|          goto endEntityValue;
 6148|      0|        }
 6149|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6149:13): [True: 0, False: 0]
  ------------------
 6150|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6150:15): [True: 0, False: 0]
  ------------------
 6151|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6152|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6153|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6154|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6154:17): [True: 0, False: 0]
  ------------------
 6155|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6156|      0|                    entity->systemId, entity->publicId)) {
 6157|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6158|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6159|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6160|      0|              goto endEntityValue;
 6161|      0|            }
 6162|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6163|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6164|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6164:17): [True: 0, False: 0]
  ------------------
 6165|      0|              dtd->keepProcessing = dtd->standalone;
 6166|      0|          } else
 6167|      0|            dtd->keepProcessing = dtd->standalone;
 6168|      0|        } else {
 6169|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6170|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6171|      0|          result = storeEntityValue(
 6172|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6173|      0|              (const char *)(entity->textPtr + entity->textLen),
 6174|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6175|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6176|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6177|      0|          if (result)
  ------------------
  |  Branch (6177:15): [True: 0, False: 0]
  ------------------
 6178|      0|            goto endEntityValue;
 6179|      0|        }
 6180|      0|        break;
 6181|      0|      }
 6182|      2|#endif /* XML_DTD */
 6183|       |      /* In the internal subset, PE references are not legal
 6184|       |         within markup declarations, e.g entity values in this case. */
 6185|      2|      parser->m_eventPtr = entityTextPtr;
 6186|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6187|      2|      goto endEntityValue;
 6188|  7.90k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.90k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6188:5): [True: 7.90k, False: 803k]
  ------------------
 6189|  7.90k|      result = XML_ERROR_NONE;
 6190|  7.90k|      goto endEntityValue;
 6191|  7.60k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  7.60k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6191:5): [True: 7.60k, False: 803k]
  ------------------
 6192|   131k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   131k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6192:5): [True: 124k, False: 687k]
  ------------------
 6193|   131k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6193:11): [True: 0, False: 131k]
  ------------------
 6194|      0|        result = XML_ERROR_NO_MEMORY;
 6195|      0|        goto endEntityValue;
 6196|      0|      }
 6197|   131k|      break;
 6198|   131k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    658|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6198:5): [True: 658, False: 810k]
  ------------------
 6199|    658|      next = entityTextPtr + enc->minBytesPerChar;
 6200|       |      /* fall through */
 6201|   662k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   662k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6201:5): [True: 661k, False: 149k]
  ------------------
 6202|   662k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6202:11): [True: 62, False: 662k]
  |  Branch (6202:37): [True: 0, False: 62]
  ------------------
 6203|      0|        result = XML_ERROR_NO_MEMORY;
 6204|      0|        goto endEntityValue;
 6205|      0|      }
 6206|   662k|      *(pool->ptr)++ = 0xA;
 6207|   662k|      break;
 6208|  9.29k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  9.29k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6208:5): [True: 9.29k, False: 802k]
  ------------------
 6209|  9.29k|      XML_Char buf[XML_ENCODE_MAX];
 6210|  9.29k|      int i;
 6211|  9.29k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  9.29k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6212|  9.29k|      if (n < 0) {
  ------------------
  |  Branch (6212:11): [True: 4, False: 9.28k]
  ------------------
 6213|      4|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6213:13): [True: 4, False: 0]
  ------------------
 6214|      4|          parser->m_eventPtr = entityTextPtr;
 6215|      4|        result = XML_ERROR_BAD_CHAR_REF;
 6216|      4|        goto endEntityValue;
 6217|      4|      }
 6218|  9.28k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  9.28k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6219|       |      /* The XmlEncode() functions can never return 0 here.  That
 6220|       |       * error return happens if the code point passed in is either
 6221|       |       * negative or greater than or equal to 0x110000.  The
 6222|       |       * XmlCharRefNumber() functions will all return a number
 6223|       |       * strictly less than 0x110000 or a negative value if an error
 6224|       |       * occurred.  The negative value is intercepted above, so
 6225|       |       * XmlEncode() is never passed a value it might return an
 6226|       |       * error for.
 6227|       |       */
 6228|  35.4k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6228:19): [True: 26.1k, False: 9.28k]
  ------------------
 6229|  26.1k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6229:13): [True: 10, False: 26.1k]
  |  Branch (6229:39): [True: 0, False: 10]
  ------------------
 6230|      0|          result = XML_ERROR_NO_MEMORY;
 6231|      0|          goto endEntityValue;
 6232|      0|        }
 6233|  26.1k|        *(pool->ptr)++ = buf[i];
 6234|  26.1k|      }
 6235|  9.28k|    } break;
 6236|  9.28k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6236:5): [True: 44, False: 811k]
  ------------------
 6237|     44|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6237:11): [True: 44, False: 0]
  ------------------
 6238|     44|        parser->m_eventPtr = entityTextPtr;
 6239|     44|      result = XML_ERROR_INVALID_TOKEN;
 6240|     44|      goto endEntityValue;
 6241|     16|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6241:5): [True: 16, False: 811k]
  ------------------
 6242|     16|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6242:11): [True: 16, False: 0]
  ------------------
 6243|     16|        parser->m_eventPtr = next;
 6244|     16|      result = XML_ERROR_INVALID_TOKEN;
 6245|     16|      goto endEntityValue;
 6246|      0|    default:
  ------------------
  |  Branch (6246:5): [True: 0, False: 811k]
  ------------------
 6247|       |      /* This default case should be unnecessary -- all the tokens
 6248|       |       * that XmlEntityValueTok() can return have their own explicit
 6249|       |       * cases -- but should be retained for safety.  We do however
 6250|       |       * exclude it from the coverage statistics.
 6251|       |       *
 6252|       |       * LCOV_EXCL_START
 6253|       |       */
 6254|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6254:11): [True: 0, False: 0]
  ------------------
 6255|      0|        parser->m_eventPtr = entityTextPtr;
 6256|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6257|      0|      goto endEntityValue;
 6258|       |      /* LCOV_EXCL_STOP */
 6259|   811k|    }
 6260|   803k|    entityTextPtr = next;
 6261|   803k|  }
 6262|  7.97k|endEntityValue:
 6263|  7.97k|#ifdef XML_DTD
 6264|  7.97k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6265|  7.97k|#endif /* XML_DTD */
 6266|  7.97k|  return result;
 6267|  7.97k|}
xmlparse.c:processInternalEntity:
 5716|   372k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5717|   372k|  const char *textStart, *textEnd;
 5718|   372k|  const char *next;
 5719|   372k|  enum XML_Error result;
 5720|   372k|  OPEN_INTERNAL_ENTITY *openEntity;
 5721|       |
 5722|   372k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5722:7): [True: 370k, False: 1.78k]
  ------------------
 5723|   370k|    openEntity = parser->m_freeInternalEntities;
 5724|   370k|    parser->m_freeInternalEntities = openEntity->next;
 5725|   370k|  } else {
 5726|  1.78k|    openEntity
 5727|  1.78k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  713|  1.78k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5728|  1.78k|    if (! openEntity)
  ------------------
  |  Branch (5728:9): [True: 0, False: 1.78k]
  ------------------
 5729|      0|      return XML_ERROR_NO_MEMORY;
 5730|  1.78k|  }
 5731|   372k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   372k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5732|   372k|#ifdef XML_DTD
 5733|   372k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5734|   372k|#endif
 5735|   372k|  entity->processed = 0;
 5736|   372k|  openEntity->next = parser->m_openInternalEntities;
 5737|   372k|  parser->m_openInternalEntities = openEntity;
 5738|   372k|  openEntity->entity = entity;
 5739|   372k|  openEntity->startTagLevel = parser->m_tagLevel;
 5740|   372k|  openEntity->betweenDecl = betweenDecl;
 5741|   372k|  openEntity->internalEventPtr = NULL;
 5742|   372k|  openEntity->internalEventEndPtr = NULL;
 5743|   372k|  textStart = (const char *)entity->textPtr;
 5744|   372k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5745|       |  /* Set a safe default value in case 'next' does not get set */
 5746|   372k|  next = textStart;
 5747|       |
 5748|   372k|#ifdef XML_DTD
 5749|   372k|  if (entity->is_param) {
  ------------------
  |  Branch (5749:7): [True: 0, False: 372k]
  ------------------
 5750|      0|    int tok
 5751|      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))
  |  |  ------------------
  ------------------
 5752|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5753|      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)
  ------------------
 5754|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5755|      0|  } else
 5756|   372k|#endif /* XML_DTD */
 5757|   372k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5758|   372k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   372k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5759|   372k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5760|       |
 5761|   372k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5761:7): [True: 371k, False: 905]
  ------------------
 5762|   371k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5762:9): [True: 0, False: 371k]
  |  Branch (5762:28): [True: 0, False: 0]
  ------------------
 5763|      0|      entity->processed = (int)(next - textStart);
 5764|      0|      parser->m_processor = internalEntityProcessor;
 5765|   371k|    } else {
 5766|   371k|#ifdef XML_DTD
 5767|   371k|      entityTrackingOnClose(parser, entity, __LINE__);
 5768|   371k|#endif /* XML_DTD */
 5769|   371k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   371k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5770|   371k|      parser->m_openInternalEntities = openEntity->next;
 5771|       |      /* put openEntity back in list of free instances */
 5772|   371k|      openEntity->next = parser->m_freeInternalEntities;
 5773|   371k|      parser->m_freeInternalEntities = openEntity;
 5774|   371k|    }
 5775|   371k|  }
 5776|   372k|  return result;
 5777|   372k|}
xmlparse.c:entityTrackingOnOpen:
 7827|  2.40M|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7828|  2.40M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7829|  2.40M|  assert(! rootParser->m_parentParser);
 7830|       |
 7831|  2.40M|  rootParser->m_entity_stats.countEverOpened++;
 7832|  2.40M|  rootParser->m_entity_stats.currentDepth++;
 7833|  2.40M|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7833:7): [True: 2.96k, False: 2.39M]
  ------------------
 7834|  2.40M|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7835|  2.96k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7836|  2.96k|  }
 7837|       |
 7838|  2.40M|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7839|  2.40M|}
xmlparse.c:entityTrackingReportStats:
 7804|  4.79M|                          const char *action, int sourceLine) {
 7805|  4.79M|  assert(! rootParser->m_parentParser);
 7806|  4.79M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7806:7): [True: 4.79M, False: 0]
  ------------------
 7807|  4.79M|    return;
 7808|       |
 7809|       |#  if defined(XML_UNICODE)
 7810|       |  const char *const entityName = "[..]";
 7811|       |#  else
 7812|      0|  const char *const entityName = entity->name;
 7813|      0|#  endif
 7814|       |
 7815|      0|  fprintf(
 7816|      0|      stderr,
 7817|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7818|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7819|      0|      rootParser->m_entity_stats.currentDepth,
 7820|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7821|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7822|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7822:7): [True: 0, False: 0]
  ------------------
 7823|      0|      sourceLine);
 7824|      0|}
xmlparse.c:entityTrackingOnClose:
 7842|  2.39M|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7843|  2.39M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7844|  2.39M|  assert(! rootParser->m_parentParser);
 7845|       |
 7846|  2.39M|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7847|  2.39M|  rootParser->m_entity_stats.currentDepth--;
 7848|  2.39M|}
xmlparse.c:reportProcessingInstruction:
 6292|  22.0k|                            const char *start, const char *end) {
 6293|  22.0k|  const XML_Char *target;
 6294|  22.0k|  XML_Char *data;
 6295|  22.0k|  const char *tem;
 6296|  22.0k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6296:7): [True: 22.0k, False: 0]
  ------------------
 6297|  22.0k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6297:9): [True: 0, False: 22.0k]
  ------------------
 6298|      0|      reportDefault(parser, enc, start, end);
 6299|  22.0k|    return 1;
 6300|  22.0k|  }
 6301|      0|  start += enc->minBytesPerChar * 2;
 6302|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6303|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6304|      0|  if (! target)
  ------------------
  |  Branch (6304:7): [True: 0, False: 0]
  ------------------
 6305|      0|    return 0;
 6306|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6307|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6308|      0|                         end - enc->minBytesPerChar * 2);
 6309|      0|  if (! data)
  ------------------
  |  Branch (6309:7): [True: 0, False: 0]
  ------------------
 6310|      0|    return 0;
 6311|      0|  normalizeLines(data);
 6312|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6313|      0|  poolClear(&parser->m_tempPool);
 6314|      0|  return 1;
 6315|      0|}
xmlparse.c:reportComment:
 6319|  2.69k|              const char *end) {
 6320|  2.69k|  XML_Char *data;
 6321|  2.69k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6321:7): [True: 2.69k, False: 0]
  ------------------
 6322|  2.69k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6322:9): [True: 0, False: 2.69k]
  ------------------
 6323|      0|      reportDefault(parser, enc, start, end);
 6324|  2.69k|    return 1;
 6325|  2.69k|  }
 6326|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6327|      0|                         start + enc->minBytesPerChar * 4,
 6328|      0|                         end - enc->minBytesPerChar * 3);
 6329|      0|  if (! data)
  ------------------
  |  Branch (6329:7): [True: 0, False: 0]
  ------------------
 6330|      0|    return 0;
 6331|      0|  normalizeLines(data);
 6332|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6333|      0|  poolClear(&parser->m_tempPool);
 6334|      0|  return 1;
 6335|      0|}
xmlparse.c:getDebugLevel:
 8390|  39.7k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8391|  39.7k|  const char *const valueOrNull = getenv(variableName);
 8392|  39.7k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8392:7): [True: 39.7k, False: 0]
  ------------------
 8393|  39.7k|    return defaultDebugLevel;
 8394|  39.7k|  }
 8395|      0|  const char *const value = valueOrNull;
 8396|       |
 8397|      0|  errno = 0;
 8398|      0|  char *afterValue = NULL;
 8399|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8400|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8400:7): [True: 0, False: 0]
  |  Branch (8400:23): [True: 0, False: 0]
  |  Branch (8400:48): [True: 0, False: 0]
  ------------------
 8401|      0|    errno = 0;
 8402|      0|    return defaultDebugLevel;
 8403|      0|  }
 8404|       |
 8405|      0|  return debugLevel;
 8406|      0|}
xmlparse.c:destroyBindings:
 1428|  3.79M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1429|  3.79M|  for (;;) {
 1430|  3.79M|    BINDING *b = bindings;
 1431|  3.79M|    if (! b)
  ------------------
  |  Branch (1431:9): [True: 3.79M, False: 0]
  ------------------
 1432|  3.79M|      break;
 1433|      0|    bindings = b->nextTagBinding;
 1434|      0|    FREE(parser, b->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1435|      0|    FREE(parser, b);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|  }
 1437|  3.79M|}
xmlparse.c:startParsing:
  953|  19.8k|startParsing(XML_Parser parser) {
  954|       |  /* hash functions must be initialized before setContext() is called */
  955|  19.8k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (955:7): [True: 0, False: 19.8k]
  ------------------
  956|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  957|  19.8k|  if (parser->m_ns) {
  ------------------
  |  Branch (957:7): [True: 0, False: 19.8k]
  ------------------
  958|       |    /* implicit context only set for root parser, since child
  959|       |       parsers (i.e. external entity parsers) will inherit it
  960|       |    */
  961|      0|    return setContext(parser, implicitContext);
  962|      0|  }
  963|  19.8k|  return XML_TRUE;
  ------------------
  |  |   55|  19.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  964|  19.8k|}
xmlparse.c:dtdDestroy:
 6788|  19.8k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6789|  19.8k|  HASH_TABLE_ITER iter;
 6790|  19.8k|  hashTableIterInit(&iter, &(p->elementTypes));
 6791|  42.9k|  for (;;) {
 6792|  42.9k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6793|  42.9k|    if (! e)
  ------------------
  |  Branch (6793:9): [True: 19.8k, False: 23.0k]
  ------------------
 6794|  19.8k|      break;
 6795|  23.0k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6795:9): [True: 1.11k, False: 21.9k]
  ------------------
 6796|  1.11k|      ms->free_fcn(e->defaultAtts);
 6797|  23.0k|  }
 6798|  19.8k|  hashTableDestroy(&(p->generalEntities));
 6799|  19.8k|#ifdef XML_DTD
 6800|  19.8k|  hashTableDestroy(&(p->paramEntities));
 6801|  19.8k|#endif /* XML_DTD */
 6802|  19.8k|  hashTableDestroy(&(p->elementTypes));
 6803|  19.8k|  hashTableDestroy(&(p->attributeIds));
 6804|  19.8k|  hashTableDestroy(&(p->prefixes));
 6805|  19.8k|  poolDestroy(&(p->pool));
 6806|  19.8k|  poolDestroy(&(p->entityValuePool));
 6807|  19.8k|  if (isDocEntity) {
  ------------------
  |  Branch (6807:7): [True: 19.8k, False: 0]
  ------------------
 6808|  19.8k|    ms->free_fcn(p->scaffIndex);
 6809|  19.8k|    ms->free_fcn(p->scaffold);
 6810|  19.8k|  }
 6811|  19.8k|  ms->free_fcn(p);
 6812|  19.8k|}
xmlparse.c:hashTableDestroy:
 7141|  99.3k|hashTableDestroy(HASH_TABLE *table) {
 7142|  99.3k|  size_t i;
 7143|  1.24M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7143:15): [True: 1.14M, False: 99.3k]
  ------------------
 7144|  1.14M|    table->mem->free_fcn(table->v[i]);
 7145|  99.3k|  table->mem->free_fcn(table->v);
 7146|  99.3k|}
xmlparse.c:poolClear:
 7184|  3.85M|poolClear(STRING_POOL *pool) {
 7185|  3.85M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7185:7): [True: 2.27M, False: 1.58M]
  ------------------
 7186|  2.27M|    pool->freeBlocks = pool->blocks;
 7187|  1.58M|  else {
 7188|  1.58M|    BLOCK *p = pool->blocks;
 7189|  1.58M|    while (p) {
  ------------------
  |  Branch (7189:12): [True: 1.62k, False: 1.58M]
  ------------------
 7190|  1.62k|      BLOCK *tem = p->next;
 7191|  1.62k|      p->next = pool->freeBlocks;
 7192|  1.62k|      pool->freeBlocks = p;
 7193|  1.62k|      p = tem;
 7194|  1.62k|    }
 7195|  1.58M|  }
 7196|  3.85M|  pool->blocks = NULL;
 7197|  3.85M|  pool->start = NULL;
 7198|  3.85M|  pool->ptr = NULL;
 7199|  3.85M|  pool->end = NULL;
 7200|  3.85M|}
xmlparse.c:poolDestroy:
 7203|  79.4k|poolDestroy(STRING_POOL *pool) {
 7204|  79.4k|  BLOCK *p = pool->blocks;
 7205|  97.0k|  while (p) {
  ------------------
  |  Branch (7205:10): [True: 17.6k, False: 79.4k]
  ------------------
 7206|  17.6k|    BLOCK *tem = p->next;
 7207|  17.6k|    pool->mem->free_fcn(p);
 7208|  17.6k|    p = tem;
 7209|  17.6k|  }
 7210|  79.4k|  p = pool->freeBlocks;
 7211|  82.1k|  while (p) {
  ------------------
  |  Branch (7211:10): [True: 2.70k, False: 79.4k]
  ------------------
 7212|  2.70k|    BLOCK *tem = p->next;
 7213|  2.70k|    pool->mem->free_fcn(p);
 7214|  2.70k|    p = tem;
 7215|  2.70k|  }
 7216|  79.4k|}
xmlparse.c:poolCopyString:
 7236|  15.3k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7237|  4.58M|  do {
 7238|  4.58M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  602|  4.58M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 7.98k, False: 4.57M]
  |  |  |  Branch (602:35): [True: 0, False: 7.98k]
  |  |  ------------------
  |  |  603|  4.58M|       ? 0                                                                     \
  |  |  604|  4.58M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7238:9): [True: 0, False: 4.58M]
  ------------------
 7239|      0|      return NULL;
 7240|  4.58M|  } while (*s++);
  ------------------
  |  Branch (7240:12): [True: 4.56M, False: 15.3k]
  ------------------
 7241|  15.3k|  s = pool->start;
 7242|  15.3k|  poolFinish(pool);
  ------------------
  |  |  600|  15.3k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7243|  15.3k|  return s;
 7244|  15.3k|}
xmlparse.c:copyString:
 7636|  19.8k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7637|  19.8k|  size_t charsRequired = 0;
 7638|  19.8k|  XML_Char *result;
 7639|       |
 7640|       |  /* First determine how long the string is */
 7641|   178k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7641:10): [True: 158k, False: 19.8k]
  ------------------
 7642|   158k|    charsRequired++;
 7643|   158k|  }
 7644|       |  /* Include the terminator */
 7645|  19.8k|  charsRequired++;
 7646|       |
 7647|       |  /* Now allocate space for the copy */
 7648|  19.8k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7649|  19.8k|  if (result == NULL)
  ------------------
  |  Branch (7649:7): [True: 0, False: 19.8k]
  ------------------
 7650|      0|    return NULL;
 7651|       |  /* Copy the original into place */
 7652|  19.8k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7653|  19.8k|  return result;
 7654|  19.8k|}

XmlPrologStateInit:
 1237|  19.8k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.8k|  state->handler = prolog0;
 1239|  19.8k|#ifdef XML_DTD
 1240|  19.8k|  state->documentEntity = 1;
 1241|  19.8k|  state->includeLevel = 0;
 1242|  19.8k|  state->inEntityValue = 0;
 1243|  19.8k|#endif /* XML_DTD */
 1244|  19.8k|}
xmlrole.c:prolog0:
  142|  18.3k|        const ENCODING *enc) {
  143|  18.3k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 312, False: 18.0k]
  ------------------
  144|    578|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    578|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 578, False: 17.7k]
  ------------------
  145|    578|    state->handler = prolog1;
  146|    578|    return XML_ROLE_NONE;
  147|    344|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    344|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 344, False: 18.0k]
  ------------------
  148|    344|    state->handler = prolog1;
  149|    344|    return XML_ROLE_XML_DECL;
  150|    315|  case XML_TOK_PI:
  ------------------
  |  |   76|    315|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 315, False: 18.0k]
  ------------------
  151|    315|    state->handler = prolog1;
  152|    315|    return XML_ROLE_PI;
  153|     51|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     51|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 51, False: 18.3k]
  ------------------
  154|     51|    state->handler = prolog1;
  155|     51|    return XML_ROLE_COMMENT;
  156|  1.76k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  1.76k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 1.76k, False: 16.6k]
  ------------------
  157|  1.76k|    return XML_ROLE_NONE;
  158|  5.85k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.85k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.85k, False: 12.5k]
  ------------------
  159|  5.85k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.85k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 107, False: 5.74k]
  ------------------
  160|  5.85k|                              KW_DOCTYPE))
  161|    107|      break;
  162|  5.74k|    state->handler = doctype0;
  163|  5.74k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.14k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.14k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.14k, False: 9.21k]
  ------------------
  165|  9.14k|    state->handler = error;
  166|  9.14k|    return XML_ROLE_INSTANCE_START;
  167|  18.3k|  }
  168|    419|  return common(state, tok);
  169|  18.3k|}
xmlrole.c:prolog1:
  173|  4.34k|        const ENCODING *enc) {
  174|  4.34k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 7, False: 4.33k]
  ------------------
  175|    363|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    363|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 363, False: 3.98k]
  ------------------
  176|    363|    return XML_ROLE_NONE;
  177|  3.02k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.02k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.02k, False: 1.31k]
  ------------------
  178|  3.02k|    return XML_ROLE_PI;
  179|    590|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    590|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 590, False: 3.75k]
  ------------------
  180|    590|    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: 4.34k]
  ------------------
  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|    283|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    283|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 283, False: 4.06k]
  ------------------
  191|    283|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    283|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 3, False: 280]
  ------------------
  192|    283|                              KW_DOCTYPE))
  193|      3|      break;
  194|    280|    state->handler = doctype0;
  195|    280|    return XML_ROLE_DOCTYPE_NONE;
  196|     75|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     75|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 75, False: 4.27k]
  ------------------
  197|     75|    state->handler = error;
  198|     75|    return XML_ROLE_INSTANCE_START;
  199|  4.34k|  }
  200|     10|  return common(state, tok);
  201|  4.34k|}
xmlrole.c:doctype0:
  225|  12.0k|         const ENCODING *enc) {
  226|  12.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.0k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  12.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.0k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  12.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.0k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  12.0k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 12, False: 12.0k]
  ------------------
  230|  6.02k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.02k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 6.02k, False: 6.01k]
  ------------------
  231|  6.02k|    return XML_ROLE_DOCTYPE_NONE;
  232|  6.00k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.00k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 6.00k, False: 6.03k]
  ------------------
  233|  6.00k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.00k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 12.0k]
  ------------------
  234|  6.00k|    state->handler = doctype1;
  235|  6.00k|    return XML_ROLE_DOCTYPE_NAME;
  236|  12.0k|  }
  237|     12|  return common(state, tok);
  238|  12.0k|}
xmlrole.c:doctype1:
  242|  7.43k|         const ENCODING *enc) {
  243|  7.43k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 2, False: 7.42k]
  ------------------
  244|  1.44k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.44k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.44k, False: 5.98k]
  ------------------
  245|  1.44k|    return XML_ROLE_DOCTYPE_NONE;
  246|  5.16k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  5.16k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 5.16k, False: 2.27k]
  ------------------
  247|  5.16k|    state->handler = internalSubset;
  248|  5.16k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     51|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     51|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 51, False: 7.37k]
  ------------------
  250|     51|    state->handler = prolog2;
  251|     51|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    772|  case XML_TOK_NAME:
  ------------------
  |  |   85|    772|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 772, False: 6.65k]
  ------------------
  253|    772|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    772|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 11, False: 761]
  |  |  ------------------
  ------------------
  254|     11|      state->handler = doctype3;
  255|     11|      return XML_ROLE_DOCTYPE_NONE;
  256|     11|    }
  257|    761|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    761|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 737, False: 24]
  |  |  ------------------
  ------------------
  258|    737|      state->handler = doctype2;
  259|    737|      return XML_ROLE_DOCTYPE_NONE;
  260|    737|    }
  261|     24|    break;
  262|  7.43k|  }
  263|     26|  return common(state, tok);
  264|  7.43k|}
xmlrole.c:internalSubset:
  335|  44.3k|               const ENCODING *enc) {
  336|  44.3k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 80, False: 44.2k]
  ------------------
  337|  5.17k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.17k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 5.17k, False: 39.1k]
  ------------------
  338|  5.17k|    return XML_ROLE_NONE;
  339|  31.0k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  31.0k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 31.0k, False: 13.3k]
  ------------------
  340|  31.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  31.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.4k, False: 18.6k]
  |  |  ------------------
  ------------------
  341|  31.0k|                            KW_ENTITY)) {
  342|  12.4k|      state->handler = entity0;
  343|  12.4k|      return XML_ROLE_ENTITY_NONE;
  344|  12.4k|    }
  345|  18.6k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  18.6k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.6k, False: 7.97k]
  |  |  ------------------
  ------------------
  346|  18.6k|                            KW_ATTLIST)) {
  347|  10.6k|      state->handler = attlist0;
  348|  10.6k|      return XML_ROLE_ATTLIST_NONE;
  349|  10.6k|    }
  350|  7.97k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  7.97k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 6.20k, False: 1.77k]
  |  |  ------------------
  ------------------
  351|  7.97k|                            KW_ELEMENT)) {
  352|  6.20k|      state->handler = element0;
  353|  6.20k|      return XML_ROLE_ELEMENT_NONE;
  354|  6.20k|    }
  355|  1.77k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.77k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.74k, False: 30]
  |  |  ------------------
  ------------------
  356|  1.77k|                            KW_NOTATION)) {
  357|  1.74k|      state->handler = notation0;
  358|  1.74k|      return XML_ROLE_NOTATION_NONE;
  359|  1.74k|    }
  360|     30|    break;
  361|  1.17k|  case XML_TOK_PI:
  ------------------
  |  |   76|  1.17k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 1.17k, False: 43.2k]
  ------------------
  362|  1.17k|    return XML_ROLE_PI;
  363|    499|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    499|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 499, False: 43.8k]
  ------------------
  364|    499|    return XML_ROLE_COMMENT;
  365|  4.19k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  4.19k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 4.19k, False: 40.1k]
  ------------------
  366|  4.19k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.19k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.19k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.19k, False: 42.1k]
  ------------------
  368|  2.19k|    state->handler = doctype5;
  369|  2.19k|    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: 44.3k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  44.3k|  }
  373|    110|  return common(state, tok);
  374|  44.3k|}
xmlrole.c:entity0:
  417|  24.7k|        const ENCODING *enc) {
  418|  24.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  24.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  24.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  24.7k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 21, False: 24.7k]
  ------------------
  422|  12.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.4k, False: 12.3k]
  ------------------
  423|  12.4k|    return XML_ROLE_ENTITY_NONE;
  424|  3.76k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  3.76k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 3.76k, False: 21.0k]
  ------------------
  425|  3.76k|    state->handler = entity1;
  426|  3.76k|    return XML_ROLE_ENTITY_NONE;
  427|  8.59k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.59k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 8.59k, False: 16.1k]
  ------------------
  428|  8.59k|    state->handler = entity2;
  429|  8.59k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  24.7k|  }
  431|     21|  return common(state, tok);
  432|  24.7k|}
xmlrole.c:entity1:
  436|  7.52k|        const ENCODING *enc) {
  437|  7.52k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.52k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  7.52k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.52k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  7.52k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.52k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  7.52k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 43, False: 7.47k]
  ------------------
  441|  3.76k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.76k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 3.76k, False: 3.75k]
  ------------------
  442|  3.76k|    return XML_ROLE_ENTITY_NONE;
  443|  3.71k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.71k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 3.71k, False: 3.80k]
  ------------------
  444|  3.71k|    state->handler = entity7;
  445|  3.71k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  7.52k|  }
  447|     43|  return common(state, tok);
  448|  7.52k|}
xmlrole.c:entity7:
  544|  7.39k|        const ENCODING *enc) {
  545|  7.39k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 15, False: 7.37k]
  ------------------
  546|  3.70k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.70k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 3.70k, False: 3.68k]
  ------------------
  547|  3.70k|    return XML_ROLE_ENTITY_NONE;
  548|  1.50k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.50k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.50k, False: 5.89k]
  ------------------
  549|  1.50k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.50k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 809, False: 691]
  |  |  ------------------
  ------------------
  550|    809|      state->handler = entity9;
  551|    809|      return XML_ROLE_ENTITY_NONE;
  552|    809|    }
  553|    691|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    691|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 688, False: 3]
  |  |  ------------------
  ------------------
  554|    688|      state->handler = entity8;
  555|    688|      return XML_ROLE_ENTITY_NONE;
  556|    688|    }
  557|      3|    break;
  558|  2.17k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.17k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.17k, False: 5.21k]
  ------------------
  559|  2.17k|    state->handler = declClose;
  560|  2.17k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.17k|    return XML_ROLE_ENTITY_VALUE;
  562|  7.39k|  }
  563|     18|  return common(state, tok);
  564|  7.39k|}
xmlrole.c:entity9:
  584|  2.96k|        const ENCODING *enc) {
  585|  2.96k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  2.96k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  2.96k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  2.96k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 7, False: 2.95k]
  ------------------
  589|  1.48k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.48k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.48k, False: 1.48k]
  ------------------
  590|  1.48k|    return XML_ROLE_ENTITY_NONE;
  591|  1.47k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.47k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.47k, False: 1.49k]
  ------------------
  592|  1.47k|    state->handler = entity10;
  593|  1.47k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  2.96k|  }
  595|      7|  return common(state, tok);
  596|  2.96k|}
xmlrole.c:entity10:
  600|  2.53k|         const ENCODING *enc) {
  601|  2.53k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.53k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  2.53k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.53k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  2.53k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.53k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  2.53k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 3, False: 2.53k]
  ------------------
  605|  1.06k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.06k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 1.06k, False: 1.46k]
  ------------------
  606|  1.06k|    return XML_ROLE_ENTITY_NONE;
  607|  1.46k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.46k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.46k, False: 1.07k]
  ------------------
  608|  1.46k|    setTopLevel(state);
  ------------------
  |  |  116|  1.46k|    ((state)->handler                                                          \
  |  |  117|  1.46k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.46k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.46k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  2.53k|  }
  611|      3|  return common(state, tok);
  612|  2.53k|}
xmlrole.c:entity8:
  568|  1.37k|        const ENCODING *enc) {
  569|  1.37k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  1.37k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  1.37k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  1.37k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 1.37k]
  ------------------
  573|    687|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    687|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 687, False: 686]
  ------------------
  574|    687|    return XML_ROLE_ENTITY_NONE;
  575|    684|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    684|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 684, False: 689]
  ------------------
  576|    684|    state->handler = entity9;
  577|    684|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  1.37k|  }
  579|      2|  return common(state, tok);
  580|  1.37k|}
xmlrole.c:declClose:
 1178|  17.4k|          const ENCODING *enc) {
 1179|  17.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  17.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  17.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  17.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  17.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  17.4k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 149, False: 17.3k]
  ------------------
 1183|  2.05k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.05k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 2.05k, False: 15.4k]
  ------------------
 1184|  2.05k|    return state->role_none;
 1185|  15.2k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  15.2k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 15.2k, False: 2.20k]
  ------------------
 1186|  15.2k|    setTopLevel(state);
  ------------------
  |  |  116|  15.2k|    ((state)->handler                                                          \
  |  |  117|  15.2k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 15.2k, False: 0]
  |  |  ------------------
  ------------------
 1187|  15.2k|    return state->role_none;
 1188|  17.4k|  }
 1189|    149|  return common(state, tok);
 1190|  17.4k|}
xmlrole.c:entity2:
  452|  17.1k|        const ENCODING *enc) {
  453|  17.1k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 8, False: 17.1k]
  ------------------
  454|  8.58k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.58k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 8.58k, False: 8.54k]
  ------------------
  455|  8.58k|    return XML_ROLE_ENTITY_NONE;
  456|  2.25k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.25k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 2.25k, False: 14.8k]
  ------------------
  457|  2.25k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.25k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.16k, False: 1.08k]
  |  |  ------------------
  ------------------
  458|  1.16k|      state->handler = entity4;
  459|  1.16k|      return XML_ROLE_ENTITY_NONE;
  460|  1.16k|    }
  461|  1.08k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.08k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.08k, False: 7]
  |  |  ------------------
  ------------------
  462|  1.08k|      state->handler = entity3;
  463|  1.08k|      return XML_ROLE_ENTITY_NONE;
  464|  1.08k|    }
  465|      7|    break;
  466|  6.28k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  6.28k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 6.28k, False: 10.8k]
  ------------------
  467|  6.28k|    state->handler = declClose;
  468|  6.28k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  6.28k|    return XML_ROLE_ENTITY_VALUE;
  470|  17.1k|  }
  471|     15|  return common(state, tok);
  472|  17.1k|}
xmlrole.c:entity4:
  492|  4.44k|        const ENCODING *enc) {
  493|  4.44k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.44k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  4.44k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.44k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  4.44k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.44k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  4.44k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 4.43k]
  ------------------
  497|  2.22k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.22k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 2.22k, False: 2.21k]
  ------------------
  498|  2.22k|    return XML_ROLE_ENTITY_NONE;
  499|  2.20k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.20k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 2.20k, False: 2.23k]
  ------------------
  500|  2.20k|    state->handler = entity5;
  501|  2.20k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  4.44k|  }
  503|      8|  return common(state, tok);
  504|  4.44k|}
xmlrole.c:entity5:
  508|  3.44k|        const ENCODING *enc) {
  509|  3.44k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 2, False: 3.43k]
  ------------------
  510|  1.24k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.24k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.24k, False: 2.19k]
  ------------------
  511|  1.24k|    return XML_ROLE_ENTITY_NONE;
  512|  1.48k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.48k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.48k, False: 1.95k]
  ------------------
  513|  1.48k|    setTopLevel(state);
  ------------------
  |  |  116|  1.48k|    ((state)->handler                                                          \
  |  |  117|  1.48k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.48k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.48k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    713|  case XML_TOK_NAME:
  ------------------
  |  |   85|    713|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 713, False: 2.72k]
  ------------------
  516|    713|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    713|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 708, False: 5]
  |  |  ------------------
  ------------------
  517|    708|      state->handler = entity6;
  518|    708|      return XML_ROLE_ENTITY_NONE;
  519|    708|    }
  520|      5|    break;
  521|  3.44k|  }
  522|      7|  return common(state, tok);
  523|  3.44k|}
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: 2, False: 1.40k]
  ------------------
  532|    707|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    707|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 707, False: 703]
  ------------------
  533|    707|    return XML_ROLE_ENTITY_NONE;
  534|    701|  case XML_TOK_NAME:
  ------------------
  |  |   85|    701|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 701, False: 709]
  ------------------
  535|    701|    state->handler = declClose;
  536|    701|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    701|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.41k|  }
  539|      2|  return common(state, tok);
  540|  1.41k|}
xmlrole.c:entity3:
  476|  2.15k|        const ENCODING *enc) {
  477|  2.15k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.15k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.15k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.15k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 2.15k]
  ------------------
  481|  1.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.08k, False: 1.07k]
  ------------------
  482|  1.08k|    return XML_ROLE_ENTITY_NONE;
  483|  1.07k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.07k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.07k, False: 1.08k]
  ------------------
  484|  1.07k|    state->handler = entity4;
  485|  1.07k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.15k|  }
  487|      2|  return common(state, tok);
  488|  2.15k|}
xmlrole.c:attlist0:
  705|  21.3k|         const ENCODING *enc) {
  706|  21.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  21.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  21.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  21.3k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 10, False: 21.3k]
  ------------------
  710|  10.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 10.6k, False: 10.6k]
  ------------------
  711|  10.6k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.6k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.6k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.6k, False: 10.6k]
  ------------------
  713|  10.6k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.6k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 21.3k]
  ------------------
  714|  10.6k|    state->handler = attlist1;
  715|  10.6k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  21.3k|  }
  717|     10|  return common(state, tok);
  718|  21.3k|}
xmlrole.c:attlist1:
  722|  79.0k|         const ENCODING *enc) {
  723|  79.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  79.0k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  79.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  79.0k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  79.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  79.0k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  79.0k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 38, False: 79.0k]
  ------------------
  727|  34.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  34.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 34.6k, False: 44.3k]
  ------------------
  728|  34.6k|    return XML_ROLE_ATTLIST_NONE;
  729|  9.83k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  9.83k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 9.83k, False: 69.2k]
  ------------------
  730|  9.83k|    setTopLevel(state);
  ------------------
  |  |  116|  9.83k|    ((state)->handler                                                          \
  |  |  117|  9.83k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 9.83k, False: 0]
  |  |  ------------------
  ------------------
  731|  9.83k|    return XML_ROLE_ATTLIST_NONE;
  732|  34.4k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  34.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 34.4k, False: 44.5k]
  ------------------
  733|  34.4k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  34.4k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 79.0k]
  ------------------
  734|  34.4k|    state->handler = attlist2;
  735|  34.4k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  79.0k|  }
  737|     38|  return common(state, tok);
  738|  79.0k|}
xmlrole.c:attlist2:
  742|  68.8k|         const ENCODING *enc) {
  743|  68.8k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 13, False: 68.8k]
  ------------------
  744|  34.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  34.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 34.4k, False: 34.4k]
  ------------------
  745|  34.4k|    return XML_ROLE_ATTLIST_NONE;
  746|  11.4k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  11.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 11.4k, False: 57.3k]
  ------------------
  747|  11.4k|    static const char *const types[] = {
  748|  11.4k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  11.4k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  11.4k|    };
  751|  11.4k|    int i;
  752|  34.8k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 34.5k, False: 348]
  ------------------
  753|  34.5k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  34.5k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 11.1k, False: 23.3k]
  |  |  ------------------
  ------------------
  754|  11.1k|        state->handler = attlist8;
  755|  11.1k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  11.1k|      }
  757|  11.4k|  }
  758|    348|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    348|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 307, False: 41]
  |  |  ------------------
  ------------------
  759|    307|      state->handler = attlist5;
  760|    307|      return XML_ROLE_ATTLIST_NONE;
  761|    307|    }
  762|     41|    break;
  763|  22.9k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  22.9k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 22.9k, False: 45.9k]
  ------------------
  764|  22.9k|    state->handler = attlist3;
  765|  22.9k|    return XML_ROLE_ATTLIST_NONE;
  766|  68.8k|  }
  767|     54|  return common(state, tok);
  768|  68.8k|}
xmlrole.c:attlist8:
  861|  68.1k|         const ENCODING *enc) {
  862|  68.1k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 14, False: 68.1k]
  ------------------
  863|  34.1k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  34.1k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 34.1k, False: 34.0k]
  ------------------
  864|  34.1k|    return XML_ROLE_ATTLIST_NONE;
  865|  26.4k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  26.4k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 26.4k, False: 41.7k]
  ------------------
  866|  26.4k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  26.4k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 22.8k, False: 3.60k]
  |  |  ------------------
  ------------------
  867|  26.4k|                            KW_IMPLIED)) {
  868|  22.8k|      state->handler = attlist1;
  869|  22.8k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  22.8k|    }
  871|  3.60k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.60k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.39k, False: 2.21k]
  |  |  ------------------
  ------------------
  872|  3.60k|                            KW_REQUIRED)) {
  873|  1.39k|      state->handler = attlist1;
  874|  1.39k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  1.39k|    }
  876|  2.21k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.21k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.19k, False: 12]
  |  |  ------------------
  ------------------
  877|  2.21k|                            KW_FIXED)) {
  878|  2.19k|      state->handler = attlist9;
  879|  2.19k|      return XML_ROLE_ATTLIST_NONE;
  880|  2.19k|    }
  881|     12|    break;
  882|  7.58k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  7.58k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 7.58k, False: 60.5k]
  ------------------
  883|  7.58k|    state->handler = attlist1;
  884|  7.58k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  68.1k|  }
  886|     26|  return common(state, tok);
  887|  68.1k|}
xmlrole.c:attlist9:
  891|  4.37k|         const ENCODING *enc) {
  892|  4.37k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  4.37k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  4.37k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  4.37k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 30, False: 4.34k]
  ------------------
  896|  2.19k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.19k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 2.19k, False: 2.17k]
  ------------------
  897|  2.19k|    return XML_ROLE_ATTLIST_NONE;
  898|  2.14k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.14k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 2.14k, False: 2.22k]
  ------------------
  899|  2.14k|    state->handler = attlist1;
  900|  2.14k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  4.37k|  }
  902|     30|  return common(state, tok);
  903|  4.37k|}
xmlrole.c:attlist5:
  809|    610|         const ENCODING *enc) {
  810|    610|  UNUSED_P(ptr);
  ------------------
  |  |  135|    610|#  define UNUSED_P(p) (void)p
  ------------------
  811|    610|  UNUSED_P(end);
  ------------------
  |  |  135|    610|#  define UNUSED_P(p) (void)p
  ------------------
  812|    610|  UNUSED_P(enc);
  ------------------
  |  |  135|    610|#  define UNUSED_P(p) (void)p
  ------------------
  813|    610|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 609]
  ------------------
  814|    306|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    306|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 306, False: 304]
  ------------------
  815|    306|    return XML_ROLE_ATTLIST_NONE;
  816|    303|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    303|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 303, False: 307]
  ------------------
  817|    303|    state->handler = attlist6;
  818|    303|    return XML_ROLE_ATTLIST_NONE;
  819|    610|  }
  820|      1|  return common(state, tok);
  821|    610|}
xmlrole.c:attlist6:
  825|  1.32k|         const ENCODING *enc) {
  826|  1.32k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.32k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.32k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 7, False: 1.31k]
  ------------------
  830|    333|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    333|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 333, False: 992]
  ------------------
  831|    333|    return XML_ROLE_ATTLIST_NONE;
  832|    985|  case XML_TOK_NAME:
  ------------------
  |  |   85|    985|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 985, False: 340]
  ------------------
  833|    985|    state->handler = attlist7;
  834|    985|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.32k|  }
  836|      7|  return common(state, tok);
  837|  1.32k|}
xmlrole.c:attlist7:
  841|  1.24k|         const ENCODING *enc) {
  842|  1.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.24k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 2, False: 1.24k]
  ------------------
  846|    271|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    271|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 271, False: 976]
  ------------------
  847|    271|    return XML_ROLE_ATTLIST_NONE;
  848|    266|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    266|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 266, False: 981]
  ------------------
  849|    266|    state->handler = attlist8;
  850|    266|    return XML_ROLE_ATTLIST_NONE;
  851|    708|  case XML_TOK_OR:
  ------------------
  |  |   88|    708|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 708, False: 539]
  ------------------
  852|    708|    state->handler = attlist6;
  853|    708|    return XML_ROLE_ATTLIST_NONE;
  854|  1.24k|  }
  855|      2|  return common(state, tok);
  856|  1.24k|}
xmlrole.c:attlist3:
  772|  28.6k|         const ENCODING *enc) {
  773|  28.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  28.6k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  28.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  28.6k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  28.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  28.6k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  28.6k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 8, False: 28.6k]
  ------------------
  777|    867|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    867|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 867, False: 27.8k]
  ------------------
  778|    867|    return XML_ROLE_ATTLIST_NONE;
  779|  3.48k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  3.48k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 3.48k, False: 25.1k]
  ------------------
  780|  27.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  27.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 24.3k, False: 4.35k]
  ------------------
  781|  27.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  27.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 28.6k]
  ------------------
  782|  27.7k|    state->handler = attlist4;
  783|  27.7k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  28.6k|  }
  785|      8|  return common(state, tok);
  786|  28.6k|}
xmlrole.c:attlist4:
  790|  28.8k|         const ENCODING *enc) {
  791|  28.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  28.8k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  28.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  28.8k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  28.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  28.8k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  28.8k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 20, False: 28.8k]
  ------------------
  795|  1.11k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.11k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 1.11k, False: 27.7k]
  ------------------
  796|  1.11k|    return XML_ROLE_ATTLIST_NONE;
  797|  22.7k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  22.7k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 22.7k, False: 6.15k]
  ------------------
  798|  22.7k|    state->handler = attlist8;
  799|  22.7k|    return XML_ROLE_ATTLIST_NONE;
  800|  5.02k|  case XML_TOK_OR:
  ------------------
  |  |   88|  5.02k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 5.02k, False: 23.8k]
  ------------------
  801|  5.02k|    state->handler = attlist3;
  802|  5.02k|    return XML_ROLE_ATTLIST_NONE;
  803|  28.8k|  }
  804|     20|  return common(state, tok);
  805|  28.8k|}
xmlrole.c:element0:
  907|  12.3k|         const ENCODING *enc) {
  908|  12.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.3k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  12.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.3k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  12.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.3k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  12.3k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 5, False: 12.3k]
  ------------------
  912|  6.20k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.20k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 6.20k, False: 6.19k]
  ------------------
  913|  6.20k|    return XML_ROLE_ELEMENT_NONE;
  914|  6.18k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.18k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 6.18k, False: 6.20k]
  ------------------
  915|  6.18k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.18k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 12.3k]
  ------------------
  916|  6.18k|    state->handler = element1;
  917|  6.18k|    return XML_ROLE_ELEMENT_NAME;
  918|  12.3k|  }
  919|      5|  return common(state, tok);
  920|  12.3k|}
xmlrole.c:element1:
  924|  12.3k|         const ENCODING *enc) {
  925|  12.3k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 5, False: 12.3k]
  ------------------
  926|  6.18k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.18k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 6.18k, False: 6.18k]
  ------------------
  927|  6.18k|    return XML_ROLE_ELEMENT_NONE;
  928|    436|  case XML_TOK_NAME:
  ------------------
  |  |   85|    436|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 436, False: 11.9k]
  ------------------
  929|    436|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    436|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 68, False: 368]
  |  |  ------------------
  ------------------
  930|     68|      state->handler = declClose;
  931|     68|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     68|      return XML_ROLE_CONTENT_EMPTY;
  933|     68|    }
  934|    368|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|    368|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 365, False: 3]
  |  |  ------------------
  ------------------
  935|    365|      state->handler = declClose;
  936|    365|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|    365|      return XML_ROLE_CONTENT_ANY;
  938|    365|    }
  939|      3|    break;
  940|  5.74k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  5.74k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 5.74k, False: 6.62k]
  ------------------
  941|  5.74k|    state->handler = element2;
  942|  5.74k|    state->level = 1;
  943|  5.74k|    return XML_ROLE_GROUP_OPEN;
  944|  12.3k|  }
  945|      8|  return common(state, tok);
  946|  12.3k|}
xmlrole.c:element2:
  950|  6.78k|         const ENCODING *enc) {
  951|  6.78k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 1, False: 6.78k]
  ------------------
  952|  1.04k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.04k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 1.04k, False: 5.73k]
  ------------------
  953|  1.04k|    return XML_ROLE_ELEMENT_NONE;
  954|  2.76k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  2.76k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 2.76k, False: 4.01k]
  ------------------
  955|  2.76k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.76k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.76k, False: 5]
  |  |  ------------------
  ------------------
  956|  2.76k|                            KW_PCDATA)) {
  957|  2.76k|      state->handler = element3;
  958|  2.76k|      return XML_ROLE_CONTENT_PCDATA;
  959|  2.76k|    }
  960|      5|    break;
  961|    443|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    443|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 443, False: 6.34k]
  ------------------
  962|    443|    state->level = 2;
  963|    443|    state->handler = element6;
  964|    443|    return XML_ROLE_GROUP_OPEN;
  965|    987|  case XML_TOK_NAME:
  ------------------
  |  |   85|    987|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 987, False: 5.79k]
  ------------------
  966|    987|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    987|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 6.78k]
  ------------------
  967|    987|    state->handler = element7;
  968|    987|    return XML_ROLE_CONTENT_ELEMENT;
  969|    529|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    529|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 529, False: 6.25k]
  ------------------
  970|    529|    state->handler = element7;
  971|    529|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    595|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    595|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 595, False: 6.18k]
  ------------------
  973|    595|    state->handler = element7;
  974|    595|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    414|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    414|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 414, False: 6.37k]
  ------------------
  976|    414|    state->handler = element7;
  977|    414|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  6.78k|  }
  979|      6|  return common(state, tok);
  980|  6.78k|}
xmlrole.c:element3:
  984|  3.14k|         const ENCODING *enc) {
  985|  3.14k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.14k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  3.14k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.14k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  3.14k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.14k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  3.14k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 7, False: 3.13k]
  ------------------
  989|    388|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    388|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 388, False: 2.75k]
  ------------------
  990|    388|    return XML_ROLE_ELEMENT_NONE;
  991|  1.01k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.01k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 1.01k, False: 2.13k]
  ------------------
  992|  1.01k|    state->handler = declClose;
  993|  1.01k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|  1.01k|    return XML_ROLE_GROUP_CLOSE;
  995|    662|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    662|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 662, False: 2.48k]
  ------------------
  996|    662|    state->handler = declClose;
  997|    662|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    662|    return XML_ROLE_GROUP_CLOSE_REP;
  999|  1.07k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.07k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 1.07k, False: 2.06k]
  ------------------
 1000|  1.07k|    state->handler = element4;
 1001|  1.07k|    return XML_ROLE_ELEMENT_NONE;
 1002|  3.14k|  }
 1003|      7|  return common(state, tok);
 1004|  3.14k|}
xmlrole.c:element4:
 1008|  5.78k|         const ENCODING *enc) {
 1009|  5.78k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  5.78k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  5.78k|  UNUSED_P(end);
  ------------------
  |  |  135|  5.78k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  5.78k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.78k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  5.78k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 14, False: 5.76k]
  ------------------
 1013|  1.88k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.88k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 1.88k, False: 3.90k]
  ------------------
 1014|  1.88k|    return XML_ROLE_ELEMENT_NONE;
 1015|  3.88k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.88k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 3.88k, False: 1.89k]
  ------------------
 1016|  3.88k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  3.88k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 5.78k]
  ------------------
 1017|  3.88k|    state->handler = element5;
 1018|  3.88k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  5.78k|  }
 1020|     14|  return common(state, tok);
 1021|  5.78k|}
xmlrole.c:element5:
 1025|  4.15k|         const ENCODING *enc) {
 1026|  4.15k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.15k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  4.15k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.15k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  4.15k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.15k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  4.15k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 3, False: 4.15k]
  ------------------
 1030|    270|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    270|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 270, False: 3.88k]
  ------------------
 1031|    270|    return XML_ROLE_ELEMENT_NONE;
 1032|  1.02k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.02k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 1.02k, False: 3.13k]
  ------------------
 1033|  1.02k|    state->handler = declClose;
 1034|  1.02k|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|  1.02k|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|  2.86k|  case XML_TOK_OR:
  ------------------
  |  |   88|  2.86k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 2.86k, False: 1.29k]
  ------------------
 1037|  2.86k|    state->handler = element4;
 1038|  2.86k|    return XML_ROLE_ELEMENT_NONE;
 1039|  4.15k|  }
 1040|      3|  return common(state, tok);
 1041|  4.15k|}
xmlrole.c:element6:
 1045|  4.51M|         const ENCODING *enc) {
 1046|  4.51M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.51M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.51M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.51M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.51M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.51M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.51M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 58, False: 4.51M]
  ------------------
 1050|  22.9k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  22.9k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 22.9k, False: 4.49M]
  ------------------
 1051|  22.9k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.47M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.47M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.47M, False: 40.8k]
  ------------------
 1053|  4.47M|    state->level += 1;
 1054|  4.47M|    return XML_ROLE_GROUP_OPEN;
 1055|  14.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  14.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 14.7k, False: 4.50M]
  ------------------
 1056|  14.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  14.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.51M]
  ------------------
 1057|  14.7k|    state->handler = element7;
 1058|  14.7k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|    787|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    787|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 787, False: 4.51M]
  ------------------
 1060|    787|    state->handler = element7;
 1061|    787|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    740|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    740|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 740, False: 4.51M]
  ------------------
 1063|    740|    state->handler = element7;
 1064|    740|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  1.60k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  1.60k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 1.60k, False: 4.51M]
  ------------------
 1066|  1.60k|    state->handler = element7;
 1067|  1.60k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.51M|  }
 1069|     58|  return common(state, tok);
 1070|  4.51M|}
xmlrole.c:element7:
 1074|   153k|         const ENCODING *enc) {
 1075|   153k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   153k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   153k|  UNUSED_P(end);
  ------------------
  |  |  135|   153k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   153k|  UNUSED_P(enc);
  ------------------
  |  |  135|   153k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   153k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 64, False: 153k]
  ------------------
 1079|  14.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  14.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 14.4k, False: 138k]
  ------------------
 1080|  14.4k|    return XML_ROLE_ELEMENT_NONE;
 1081|  65.1k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  65.1k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 65.1k, False: 87.9k]
  ------------------
 1082|  65.1k|    state->level -= 1;
 1083|  65.1k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.33k, False: 63.8k]
  ------------------
 1084|  1.33k|      state->handler = declClose;
 1085|  1.33k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.33k|    }
 1087|  65.1k|    return XML_ROLE_GROUP_CLOSE;
 1088|  5.60k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  5.60k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 5.60k, False: 147k]
  ------------------
 1089|  5.60k|    state->level -= 1;
 1090|  5.60k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 298, False: 5.30k]
  ------------------
 1091|    298|      state->handler = declClose;
 1092|    298|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    298|    }
 1094|  5.60k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  2.07k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  2.07k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 2.07k, False: 151k]
  ------------------
 1096|  2.07k|    state->level -= 1;
 1097|  2.07k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 412, False: 1.66k]
  ------------------
 1098|    412|      state->handler = declClose;
 1099|    412|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    412|    }
 1101|  2.07k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  48.1k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  48.1k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 48.1k, False: 105k]
  ------------------
 1103|  48.1k|    state->level -= 1;
 1104|  48.1k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 484, False: 47.6k]
  ------------------
 1105|    484|      state->handler = declClose;
 1106|    484|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    484|    }
 1108|  48.1k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  5.76k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  5.76k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 5.76k, False: 147k]
  ------------------
 1110|  5.76k|    state->handler = element6;
 1111|  5.76k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  11.8k|  case XML_TOK_OR:
  ------------------
  |  |   88|  11.8k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 11.8k, False: 141k]
  ------------------
 1113|  11.8k|    state->handler = element6;
 1114|  11.8k|    return XML_ROLE_GROUP_CHOICE;
 1115|   153k|  }
 1116|     64|  return common(state, tok);
 1117|   153k|}
xmlrole.c:notation0:
  616|  3.46k|          const ENCODING *enc) {
  617|  3.46k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.46k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  3.46k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.46k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  3.46k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.46k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  3.46k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 1, False: 3.46k]
  ------------------
  621|  1.74k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.74k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.74k, False: 1.72k]
  ------------------
  622|  1.74k|    return XML_ROLE_NOTATION_NONE;
  623|  1.72k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.72k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.72k, False: 1.74k]
  ------------------
  624|  1.72k|    state->handler = notation1;
  625|  1.72k|    return XML_ROLE_NOTATION_NAME;
  626|  3.46k|  }
  627|      1|  return common(state, tok);
  628|  3.46k|}
xmlrole.c:notation1:
  632|  3.44k|          const ENCODING *enc) {
  633|  3.44k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 5, False: 3.43k]
  ------------------
  634|  1.72k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.72k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.72k, False: 1.72k]
  ------------------
  635|  1.72k|    return XML_ROLE_NOTATION_NONE;
  636|  1.71k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.71k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.71k, False: 1.72k]
  ------------------
  637|  1.71k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.71k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 292, False: 1.42k]
  |  |  ------------------
  ------------------
  638|    292|      state->handler = notation3;
  639|    292|      return XML_ROLE_NOTATION_NONE;
  640|    292|    }
  641|  1.42k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.42k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.41k, False: 4]
  |  |  ------------------
  ------------------
  642|  1.41k|      state->handler = notation2;
  643|  1.41k|      return XML_ROLE_NOTATION_NONE;
  644|  1.41k|    }
  645|      4|    break;
  646|  3.44k|  }
  647|      9|  return common(state, tok);
  648|  3.44k|}
xmlrole.c:notation3:
  668|    580|          const ENCODING *enc) {
  669|    580|  UNUSED_P(ptr);
  ------------------
  |  |  135|    580|#  define UNUSED_P(p) (void)p
  ------------------
  670|    580|  UNUSED_P(end);
  ------------------
  |  |  135|    580|#  define UNUSED_P(p) (void)p
  ------------------
  671|    580|  UNUSED_P(enc);
  ------------------
  |  |  135|    580|#  define UNUSED_P(p) (void)p
  ------------------
  672|    580|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 4, False: 576]
  ------------------
  673|    291|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    291|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 291, False: 289]
  ------------------
  674|    291|    return XML_ROLE_NOTATION_NONE;
  675|    285|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    285|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 285, False: 295]
  ------------------
  676|    285|    state->handler = declClose;
  677|    285|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    285|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    580|  }
  680|      4|  return common(state, tok);
  681|    580|}
xmlrole.c:notation2:
  652|  2.83k|          const ENCODING *enc) {
  653|  2.83k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.83k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.83k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.83k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.83k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.83k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.83k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 5, False: 2.82k]
  ------------------
  657|  1.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.41k, False: 1.41k]
  ------------------
  658|  1.41k|    return XML_ROLE_NOTATION_NONE;
  659|  1.41k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.41k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.41k, False: 1.42k]
  ------------------
  660|  1.41k|    state->handler = notation4;
  661|  1.41k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.83k|  }
  663|      5|  return common(state, tok);
  664|  2.83k|}
xmlrole.c:notation4:
  685|  2.23k|          const ENCODING *enc) {
  686|  2.23k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  2.23k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  2.23k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  2.23k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 1, False: 2.23k]
  ------------------
  690|    842|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    842|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 842, False: 1.39k]
  ------------------
  691|    842|    return XML_ROLE_NOTATION_NONE;
  692|    553|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    553|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 553, False: 1.68k]
  ------------------
  693|    553|    state->handler = declClose;
  694|    553|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    553|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    842|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    842|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 842, False: 1.39k]
  ------------------
  697|    842|    setTopLevel(state);
  ------------------
  |  |  116|    842|    ((state)->handler                                                          \
  |  |  117|    842|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 842, False: 0]
  |  |  ------------------
  ------------------
  698|    842|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  2.23k|  }
  700|      1|  return common(state, tok);
  701|  2.23k|}
xmlrole.c:doctype5:
  319|  2.22k|         const ENCODING *enc) {
  320|  2.22k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.22k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.22k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.22k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.22k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.22k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.22k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 7, False: 2.21k]
  ------------------
  324|     31|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     31|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 31, False: 2.19k]
  ------------------
  325|     31|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.18k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.18k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.18k, False: 38]
  ------------------
  327|  2.18k|    state->handler = prolog2;
  328|  2.18k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.22k|  }
  330|      7|  return common(state, tok);
  331|  2.22k|}
xmlrole.c:prolog2:
  205|  3.05k|        const ENCODING *enc) {
  206|  3.05k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.05k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.05k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.05k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.05k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.05k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.05k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 17, False: 3.03k]
  ------------------
  210|    332|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    332|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 332, False: 2.72k]
  ------------------
  211|    332|    return XML_ROLE_NONE;
  212|    314|  case XML_TOK_PI:
  ------------------
  |  |   76|    314|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 314, False: 2.74k]
  ------------------
  213|    314|    return XML_ROLE_PI;
  214|    201|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    201|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 201, False: 2.85k]
  ------------------
  215|    201|    return XML_ROLE_COMMENT;
  216|  2.19k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.19k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.19k, False: 864]
  ------------------
  217|  2.19k|    state->handler = error;
  218|  2.19k|    return XML_ROLE_INSTANCE_START;
  219|  3.05k|  }
  220|     17|  return common(state, tok);
  221|  3.05k|}
xmlrole.c:doctype3:
  284|    427|         const ENCODING *enc) {
  285|    427|  UNUSED_P(ptr);
  ------------------
  |  |  135|    427|#  define UNUSED_P(p) (void)p
  ------------------
  286|    427|  UNUSED_P(end);
  ------------------
  |  |  135|    427|#  define UNUSED_P(p) (void)p
  ------------------
  287|    427|  UNUSED_P(enc);
  ------------------
  |  |  135|    427|#  define UNUSED_P(p) (void)p
  ------------------
  288|    427|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 89, False: 338]
  ------------------
  289|    289|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    289|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 289, False: 138]
  ------------------
  290|    289|    return XML_ROLE_DOCTYPE_NONE;
  291|     49|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     49|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 49, False: 378]
  ------------------
  292|     49|    state->handler = doctype4;
  293|     49|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    427|  }
  295|     89|  return common(state, tok);
  296|    427|}
xmlrole.c:doctype4:
  300|     58|         const ENCODING *enc) {
  301|     58|  UNUSED_P(ptr);
  ------------------
  |  |  135|     58|#  define UNUSED_P(p) (void)p
  ------------------
  302|     58|  UNUSED_P(end);
  ------------------
  |  |  135|     58|#  define UNUSED_P(p) (void)p
  ------------------
  303|     58|  UNUSED_P(enc);
  ------------------
  |  |  135|     58|#  define UNUSED_P(p) (void)p
  ------------------
  304|     58|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 48]
  ------------------
  305|     26|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     26|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 26, False: 32]
  ------------------
  306|     26|    return XML_ROLE_DOCTYPE_NONE;
  307|     11|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|     11|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 11, False: 47]
  ------------------
  308|     11|    state->handler = internalSubset;
  309|     11|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|     11|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     11|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 11, False: 47]
  ------------------
  311|     11|    state->handler = prolog2;
  312|     11|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     58|  }
  314|     10|  return common(state, tok);
  315|     58|}
xmlrole.c:doctype2:
  268|  1.46k|         const ENCODING *enc) {
  269|  1.46k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.46k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.46k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.46k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 11, False: 1.45k]
  ------------------
  273|    736|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    736|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 736, False: 731]
  ------------------
  274|    736|    return XML_ROLE_DOCTYPE_NONE;
  275|    720|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    720|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 720, False: 747]
  ------------------
  276|    720|    state->handler = doctype3;
  277|    720|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.46k|  }
  279|     11|  return common(state, tok);
  280|  1.46k|}
xmlrole.c:common:
 1225|  1.36k|common(PROLOG_STATE *state, int tok) {
 1226|  1.36k|#ifdef XML_DTD
 1227|  1.36k|  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.36k]
  |  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.36k|  state->handler = error;
 1233|  1.36k|  return XML_ROLE_ERROR;
 1234|  1.36k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  16.2M|                                           const char **fromLimRef) {
  328|  16.2M|  const char *fromLim = *fromLimRef;
  329|  16.2M|  size_t walked = 0;
  330|  21.5M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 21.4M, False: 4.05k]
  ------------------
  331|  21.4M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  21.4M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 330k, False: 21.1M]
  ------------------
  333|  21.4M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   330k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 330k, False: 278]
  ------------------
  335|   330k|        fromLim += 4 - 1;
  336|   330k|        break;
  337|   330k|      } else {
  338|    278|        walked = 0;
  339|    278|      }
  340|  21.1M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 2.00M, False: 19.1M]
  ------------------
  341|  21.1M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  2.00M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 2.00M, False: 1.19k]
  ------------------
  343|  2.00M|        fromLim += 3 - 1;
  344|  2.00M|        break;
  345|  2.00M|      } else {
  346|  1.19k|        walked = 0;
  347|  1.19k|      }
  348|  19.1M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 245k, False: 18.9M]
  ------------------
  349|  19.1M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|   245k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 245k, False: 306]
  ------------------
  351|   245k|        fromLim += 2 - 1;
  352|   245k|        break;
  353|   245k|      } else {
  354|    306|        walked = 0;
  355|    306|      }
  356|  18.9M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 13.6M, False: 5.24M]
  ------------------
  357|  18.9M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  13.6M|      break;
  359|  13.6M|    }
  360|  21.4M|  }
  361|  16.2M|  *fromLimRef = fromLim;
  362|  16.2M|}
XmlUtf8Encode:
 1255|  15.4k|XmlUtf8Encode(int c, char *buf) {
 1256|  15.4k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  15.4k|    min2 = 0x80,
 1259|  15.4k|    min3 = 0x800,
 1260|  15.4k|    min4 = 0x10000
 1261|  15.4k|  };
 1262|       |
 1263|  15.4k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 15.4k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  15.4k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 1.93k, False: 13.5k]
  ------------------
 1266|  1.93k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  1.93k|    return 1;
 1268|  1.93k|  }
 1269|  13.5k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 4.54k, False: 8.98k]
  ------------------
 1270|  4.54k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  4.54k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  4.54k|    return 2;
 1273|  4.54k|  }
 1274|  8.98k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 6.34k, False: 2.63k]
  ------------------
 1275|  6.34k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  6.34k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  6.34k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  6.34k|    return 3;
 1279|  6.34k|  }
 1280|  2.63k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 2.63k, False: 0]
  ------------------
 1281|  2.63k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  2.63k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  2.63k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  2.63k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  2.63k|    return 4;
 1286|  2.63k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  2.63k|}
xmltok.c:checkCharRefNumber:
 1231|  24.0k|checkCharRefNumber(int result) {
 1232|  24.0k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 15.8k, False: 8.24k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 24.0k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 24.0k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 24.0k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 24.0k]
  ------------------
 1237|     16|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 4, False: 24.0k]
  ------------------
 1238|     32|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 16, False: 24.0k]
  ------------------
 1239|     36|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 4, False: 24.0k]
  ------------------
 1240|     39|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 24.0k]
  ------------------
 1241|     39|    return -1;
 1242|  5.38k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 5.38k, False: 18.6k]
  ------------------
 1243|  5.38k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 127, False: 5.25k]
  ------------------
 1244|    127|      return -1;
 1245|  5.25k|    break;
 1246|  5.25k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 2.82k, False: 21.2k]
  ------------------
 1247|  2.82k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 2.82k]
  |  Branch (1247:29): [True: 8, False: 2.81k]
  ------------------
 1248|     11|      return -1;
 1249|  2.81k|    break;
 1250|  24.0k|  }
 1251|  23.8k|  return result;
 1252|  24.0k|}
xmltok.c:utf8_toUtf8:
  366|  16.2M|            char **toP, const char *toLim) {
  367|  16.2M|  bool input_incomplete = false;
  368|  16.2M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  16.2M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  16.2M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  16.2M|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.2M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  16.2M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 6.81k, False: 16.2M]
  ------------------
  375|  6.81k|    fromLim = *fromP + bytesStorable;
  376|  6.81k|    output_exhausted = true;
  377|  6.81k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  16.2M|  {
  381|  16.2M|    const char *const fromLimBefore = fromLim;
  382|  16.2M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  16.2M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.77k, False: 16.2M]
  ------------------
  384|  1.77k|      input_incomplete = true;
  385|  1.77k|    }
  386|  16.2M|  }
  387|       |
  388|  16.2M|  {
  389|  16.2M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  16.2M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  16.2M|    *fromP += bytesToCopy;
  392|  16.2M|    *toP += bytesToCopy;
  393|  16.2M|  }
  394|       |
  395|  16.2M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 6.81k, False: 16.2M]
  ------------------
  396|  6.81k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  16.2M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 16.2M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  16.2M|  else
  400|  16.2M|    return XML_CONVERT_COMPLETED;
  401|  16.2M|}
xmltok.c:utf8_isName2:
  140|   133k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|   133k|  UNUSED_P(enc);
  ------------------
  |  |  135|   133k|#  define UNUSED_P(p) (void)p
  ------------------
  142|   133k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|   133k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   133k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   133k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|   133k|}
xmltok.c:utf8_isName3:
  146|  1.04M|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  1.04M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.04M|#  define UNUSED_P(p) (void)p
  ------------------
  148|  1.04M|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  1.04M|  (namingBitmap                                                                \
  |  |   97|  1.04M|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  1.04M|         << 3)                                                                 \
  |  |   99|  1.04M|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  1.04M|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  1.04M|}
xmltok.c:isNever:
  133|    136|isNever(const ENCODING *enc, const char *p) {
  134|    136|  UNUSED_P(enc);
  ------------------
  |  |  135|    136|#  define UNUSED_P(p) (void)p
  ------------------
  135|    136|  UNUSED_P(p);
  ------------------
  |  |  135|    136|#  define UNUSED_P(p) (void)p
  ------------------
  136|    136|  return 0;
  137|    136|}
xmltok.c:utf8_isNmstrt2:
  154|   930k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   930k|  UNUSED_P(enc);
  ------------------
  |  |  135|   930k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   930k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   930k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   930k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   930k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   930k|}
xmltok.c:utf8_isNmstrt3:
  160|  7.60k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  7.60k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.60k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  7.60k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  7.60k|  (namingBitmap                                                                \
  |  |   97|  7.60k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  7.60k|         << 3)                                                                 \
  |  |   99|  7.60k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  7.60k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  7.60k|}
xmltok.c:utf8_isInvalid2:
  168|  1.15M|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|  1.15M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.15M|#  define UNUSED_P(p) (void)p
  ------------------
  170|  1.15M|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|  1.15M|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 21, False: 1.15M]
  |  |  |  Branch (113:19): [True: 88, False: 1.15M]
  |  |  |  Branch (113:43): [True: 50, False: 1.15M]
  |  |  ------------------
  ------------------
  171|  1.15M|}
xmltok.c:utf8_isInvalid3:
  174|  42.0M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  42.0M|  UNUSED_P(enc);
  ------------------
  |  |  135|  42.0M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  42.0M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  42.0M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 52, False: 42.0M]
  |  |  ------------------
  |  |  117|  42.0M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 45, False: 42.0M]
  |  |  |  Branch (117:8): [True: 199k, False: 41.8M]
  |  |  |  Branch (117:24): [True: 5.09k, False: 194k]
  |  |  ------------------
  |  |  118|  42.0M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  42.0M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 37, False: 42.0M]
  |  |  |  Branch (119:8): [True: 1.34M, False: 40.7M]
  |  |  ------------------
  |  |  120|  42.0M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 10, False: 1.34M]
  |  |  |  Branch (120:31): [True: 2, False: 1.34M]
  |  |  ------------------
  |  |  121|  42.0M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 12, False: 40.7M]
  |  |  ------------------
  |  |  122|  40.7M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 13, False: 40.7M]
  |  |  |  Branch (122:22): [True: 1.31M, False: 39.4M]
  |  |  ------------------
  ------------------
  177|  42.0M|}
xmltok.c:utf8_isInvalid4:
  180|  87.1k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  87.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  87.1k|#  define UNUSED_P(p) (void)p
  ------------------
  182|  87.1k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  87.1k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 104, False: 87.0k]
  |  |  |  Branch (125:28): [True: 38, False: 86.9k]
  |  |  |  Branch (125:55): [True: 10, False: 86.9k]
  |  |  ------------------
  |  |  126|  87.1k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 13, False: 86.9k]
  |  |  ------------------
  |  |  127|  87.1k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 59, False: 86.9k]
  |  |  |  Branch (127:8): [True: 11.9k, False: 75.0k]
  |  |  ------------------
  |  |  128|  86.9k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 9, False: 11.9k]
  |  |  |  Branch (128:31): [True: 16, False: 11.9k]
  |  |  ------------------
  |  |  129|  86.9k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 7, False: 74.9k]
  |  |  ------------------
  |  |  130|  75.0k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 27, False: 74.9k]
  |  |  |  Branch (130:22): [True: 6.37k, False: 68.6k]
  |  |  ------------------
  ------------------
  183|  87.1k|}
xmltok.c:unicode_byte_type:
  595|   151M|unicode_byte_type(char hi, char lo) {
  596|   151M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 150M, False: 1.16M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   373k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 373k, False: 150M]
  ------------------
  599|   578k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 205k, False: 151M]
  ------------------
  600|   769k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 190k, False: 151M]
  ------------------
  601|  1.06M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 298k, False: 150M]
  ------------------
  602|  1.06M|    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: 151M]
  ------------------
  605|    180|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 91, False: 151M]
  ------------------
  606|    269|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 89, False: 151M]
  ------------------
  607|    366|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 97, False: 151M]
  ------------------
  608|    366|    return BT_TRAIL;
  609|  97.5k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 97.5k, False: 151M]
  ------------------
  610|  97.5k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 97.3k, False: 227]
  ------------------
  611|    212|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 212, False: 97.3k]
  ------------------
  612|    227|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 15, False: 97.5k]
  ------------------
  613|    227|      return BT_NONXML;
  614|  97.5k|    }
  615|  97.3k|    break;
  616|   151M|  }
  617|   150M|  return BT_NONASCII;
  618|   151M|}
xmltok.c:little2_toUtf8:
  623|   102k|      char **toP, const char *toLim) {                                         \
  624|   102k|    const char *from = *fromP;                                                 \
  625|   102k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   102k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   102k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  27.9M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 27.8M, False: 98.4k]
  ------------------
  628|  27.8M|      int plane;                                                               \
  629|  27.8M|      unsigned char lo2;                                                       \
  630|  27.8M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  27.8M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  27.8M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  27.8M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  27.8M|      switch (hi) {                                                            \
  633|   233k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 233k, False: 27.6M]
  ------------------
  634|   233k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 209k, False: 23.7k]
  ------------------
  635|   209k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 390, False: 208k]
  ------------------
  636|    390|            *fromP = from;                                                     \
  637|    390|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    390|          }                                                                    \
  639|   209k|          *(*toP)++ = lo;                                                      \
  640|   208k|          break;                                                               \
  641|   209k|        }                                                                      \
  642|   233k|        /* fall through */                                                     \
  643|   233k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.73k, False: 27.8M]
  ------------------
  644|  35.1k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 3.69k, False: 27.8M]
  ------------------
  645|  39.0k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 3.81k, False: 27.8M]
  ------------------
  646|  64.3k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 25.3k, False: 27.8M]
  ------------------
  647|   107k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 42.7k, False: 27.8M]
  ------------------
  648|   109k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 2.37k, False: 27.8M]
  ------------------
  649|   110k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.04k, False: 27.8M]
  ------------------
  650|   110k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 245, False: 110k]
  ------------------
  651|    245|          *fromP = from;                                                       \
  652|    245|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    245|        }                                                                      \
  654|   110k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   110k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   110k|        break;                                                                 \
  657|  27.4M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 27.4M, False: 406k]
  ------------------
  658|  27.4M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.65k, False: 27.4M]
  ------------------
  659|  2.65k|          *fromP = from;                                                       \
  660|  2.65k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.65k|        }                                                                      \
  662|  27.4M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  27.4M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  27.4M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  27.4M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  27.4M|        break;                                                                 \
  667|  27.4M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 24.6k, False: 27.8M]
  ------------------
  668|  45.9k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 21.3k, False: 27.8M]
  ------------------
  669|  64.6k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 18.6k, False: 27.8M]
  ------------------
  670|  87.1k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 22.4k, False: 27.8M]
  ------------------
  671|  87.1k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 235, False: 86.8k]
  ------------------
  672|    235|          *fromP = from;                                                       \
  673|    235|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    235|        }                                                                      \
  675|  87.1k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 86.8k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  86.8k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  86.8k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  86.8k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  86.8k|        from += 2;                                                             \
  683|  86.8k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|  86.8k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|  86.8k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|  86.8k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|  86.8k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  86.8k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  86.8k|        break;                                                                 \
  688|  27.8M|      }                                                                        \
  689|  27.8M|    }                                                                          \
  690|   102k|    *fromP = from;                                                             \
  691|  98.4k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 98.4k]
  ------------------
  692|  98.4k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  98.4k|    else                                                                       \
  694|  98.4k|      return XML_CONVERT_COMPLETED;                                            \
  695|  98.4k|  }
xmltok.c:getEncodingIndex:
 1502|  39.7k|getEncodingIndex(const char *name) {
 1503|  39.7k|  static const char *const encodingNames[] = {
 1504|  39.7k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.7k|  };
 1506|  39.7k|  int i;
 1507|  39.7k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.8k, False: 19.9k]
  ------------------
 1508|  19.8k|    return NO_ENC;
 1509|  40.0k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 40.0k, False: 50]
  ------------------
 1510|  40.0k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.8k, False: 20.1k]
  ------------------
 1511|  19.8k|      return i;
 1512|     50|  return UNKNOWN_ENC;
 1513|  19.9k|}
xmltok.c:streqci:
 1005|  40.0k|streqci(const char *s1, const char *s2) {
 1006|   199k|  for (;;) {
 1007|   199k|    char c1 = *s1++;
 1008|   199k|    char c2 = *s2++;
 1009|   199k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   199k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    157|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 157, False: 199k]
  |  Branch (1009:26): [True: 157, False: 0]
  ------------------
 1010|    157|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    157|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    157|#define ASCII_a 0x61
  ------------------
 1011|   199k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   199k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 199k]
  |  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|   199k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 20.2k, False: 179k]
  ------------------
 1018|  20.2k|      return 0;
 1019|   179k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.8k, False: 159k]
  ------------------
 1020|  19.8k|      break;
 1021|   179k|  }
 1022|  19.8k|  return 1;
 1023|  40.0k|}
xmltok.c:initScan:
 1531|  19.8k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.8k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.8k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.8k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.8k|  encPtr = enc->encPtr;
 1537|  19.8k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 36, False: 19.8k]
  ------------------
 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|     36|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     36|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 36, False: 0]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 36]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 36]
  ------------------
 1549|      0|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 36]
  ------------------
 1550|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     36|    }
 1552|     36|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 31, False: 5]
  ------------------
 1553|      1|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 1, False: 35]
  ------------------
 1554|      2|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 1, False: 35]
  ------------------
 1555|      3|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 1, False: 35]
  ------------------
 1556|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#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: 3]
  |  Branch (1556:52): [True: 0, False: 0]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      4|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 1, False: 35]
  ------------------
 1560|      5|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 1, False: 35]
  ------------------
 1561|      5|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|     36|    }
 1563|  19.8k|  } else {
 1564|  19.8k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      3|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 3, False: 19.8k]
  ------------------
 1566|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#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: 3]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      3|      *nextTokPtr = ptr + 2;
 1569|      3|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      3|      return XML_TOK_BOM;
  ------------------
  |  |   79|      3|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.15k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.15k, False: 14.6k]
  ------------------
 1573|  5.15k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.15k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 5.15k]
  ------------------
 1574|  5.15k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  5.15k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 5.15k]
  ------------------
 1575|  5.15k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  5.15k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.15k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.15k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      2|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 2, False: 19.8k]
  ------------------
 1580|      2|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      2|#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: 2]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|      2|      *nextTokPtr = ptr + 2;
 1583|      2|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      2|      return XML_TOK_BOM;
  ------------------
  |  |   79|      2|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  1.77k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 1.77k, False: 18.0k]
  ------------------
 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|  1.77k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  1.77k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 1.77k]
  ------------------
 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|  1.77k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 1.77k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  1.77k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 1.75k, False: 13]
  ------------------
 1602|  1.75k|        *nextTokPtr = ptr + 3;
 1603|  1.75k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  1.75k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  1.75k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  1.75k|      }
 1606|     13|      break;
 1607|  12.8k|    default:
  ------------------
  |  Branch (1607:5): [True: 12.8k, False: 6.93k]
  ------------------
 1608|  12.8k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.14k, False: 6.74k]
  ------------------
 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|  6.14k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.2k|#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: 6.14k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.14k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.14k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.14k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.74k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 888, False: 5.85k]
  ------------------
 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|    888|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    888|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 888]
  ------------------
 1630|      0|          break;
 1631|    888|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    888|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    888|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    888|      }
 1634|  5.85k|      break;
 1635|  19.8k|    }
 1636|  19.8k|  }
 1637|  5.90k|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|  5.90k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|  5.90k|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.90k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.8k|}
xmltok.c:ascii_toUtf8:
  561|   777k|             char **toP, const char *toLim) {
  562|   777k|  UNUSED_P(enc);
  ------------------
  |  |  135|   777k|#  define UNUSED_P(p) (void)p
  ------------------
  563|  3.47M|  while (*fromP < fromLim && *toP < toLim)
  ------------------
  |  Branch (563:10): [True: 2.70M, False: 769k]
  |  Branch (563:30): [True: 2.70M, False: 7.66k]
  ------------------
  564|  2.70M|    *(*toP)++ = *(*fromP)++;
  565|       |
  566|   777k|  if ((*toP == toLim) && (*fromP < fromLim))
  ------------------
  |  Branch (566:7): [True: 8.15k, False: 769k]
  |  Branch (566:26): [True: 7.66k, False: 483]
  ------------------
  567|  7.66k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  568|   769k|  else
  569|   769k|    return XML_CONVERT_COMPLETED;
  570|   777k|}
xmltok.c:big2_toUtf8:
  623|   268k|      char **toP, const char *toLim) {                                         \
  624|   268k|    const char *from = *fromP;                                                 \
  625|   268k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   268k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   268k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  30.8M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 30.5M, False: 264k]
  ------------------
  628|  30.5M|      int plane;                                                               \
  629|  30.5M|      unsigned char lo2;                                                       \
  630|  30.5M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  30.5M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  30.5M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  30.5M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  30.5M|      switch (hi) {                                                            \
  633|   340k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 340k, False: 30.2M]
  ------------------
  634|   340k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 307k, False: 33.5k]
  ------------------
  635|   307k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 511, False: 306k]
  ------------------
  636|    511|            *fromP = from;                                                     \
  637|    511|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    511|          }                                                                    \
  639|   307k|          *(*toP)++ = lo;                                                      \
  640|   306k|          break;                                                               \
  641|   307k|        }                                                                      \
  642|   340k|        /* fall through */                                                     \
  643|   340k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.43k, False: 30.5M]
  ------------------
  644|  44.0k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 3.07k, False: 30.5M]
  ------------------
  645|  46.3k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 2.30k, False: 30.5M]
  ------------------
  646|  48.6k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 2.23k, False: 30.5M]
  ------------------
  647|  51.9k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 3.32k, False: 30.5M]
  ------------------
  648|  54.6k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 2.71k, False: 30.5M]
  ------------------
  649|  56.1k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.51k, False: 30.5M]
  ------------------
  650|  56.1k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 255, False: 55.8k]
  ------------------
  651|    255|          *fromP = from;                                                       \
  652|    255|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    255|        }                                                                      \
  654|  56.1k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  55.8k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  55.8k|        break;                                                                 \
  657|  30.0M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 30.0M, False: 478k]
  ------------------
  658|  30.0M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.22k, False: 30.0M]
  ------------------
  659|  3.22k|          *fromP = from;                                                       \
  660|  3.22k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.22k|        }                                                                      \
  662|  30.0M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  30.0M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  30.0M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  30.0M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  30.0M|        break;                                                                 \
  667|  30.0M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 24.3k, False: 30.5M]
  ------------------
  668|  45.1k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 20.7k, False: 30.5M]
  ------------------
  669|  72.9k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 27.7k, False: 30.5M]
  ------------------
  670|   115k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 42.9k, False: 30.5M]
  ------------------
  671|   115k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 259, False: 115k]
  ------------------
  672|    259|          *fromP = from;                                                       \
  673|    259|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    259|        }                                                                      \
  675|   115k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 115k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   115k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   115k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   115k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   115k|        from += 2;                                                             \
  683|   115k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   115k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   115k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   115k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   115k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   115k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   115k|        break;                                                                 \
  688|  30.5M|      }                                                                        \
  689|  30.5M|    }                                                                          \
  690|   268k|    *fromP = from;                                                             \
  691|   264k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 264k]
  ------------------
  692|   264k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   264k|    else                                                                       \
  694|   264k|      return XML_CONVERT_COMPLETED;                                            \
  695|   264k|  }
xmltok.c:initUpdatePosition:
 1027|      6|                   POSITION *pos) {
 1028|      6|  UNUSED_P(enc);
  ------------------
  |  |  135|      6|#  define UNUSED_P(p) (void)p
  ------------------
 1029|      6|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|      6|}
xmltok.c:doParseXmlDecl:
 1155|    344|               const ENCODING **encoding, int *standalone) {
 1156|    344|  const char *val = NULL;
 1157|    344|  const char *name = NULL;
 1158|    344|  const char *nameEnd = NULL;
 1159|    344|  ptr += 5 * enc->minBytesPerChar;
 1160|    344|  end -= 2 * enc->minBytesPerChar;
 1161|    344|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 192, False: 152]
  ------------------
 1162|    344|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 17, False: 135]
  ------------------
 1163|    209|    *badPtr = ptr;
 1164|    209|    return 0;
 1165|    209|  }
 1166|    135|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    135|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 3, False: 132]
  ------------------
 1167|      3|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 3, False: 0]
  ------------------
 1168|      3|      *badPtr = name;
 1169|      3|      return 0;
 1170|      3|    }
 1171|    132|  } else {
 1172|    132|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 132, False: 0]
  ------------------
 1173|    132|      *versionPtr = val;
 1174|    132|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 132, False: 0]
  ------------------
 1175|    132|      *versionEndPtr = ptr;
 1176|    132|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 18, False: 114]
  ------------------
 1177|     18|      *badPtr = ptr;
 1178|     18|      return 0;
 1179|     18|    }
 1180|    114|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 6, False: 108]
  ------------------
 1181|      6|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 6]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      6|      return 1;
 1187|      6|    }
 1188|    114|  }
 1189|    108|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|    108|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 61, False: 47]
  |  |  ------------------
  ------------------
 1190|     61|    int c = toAscii(enc, val, end);
 1191|     61|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     61|#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|     49|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     48|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 12, False: 49]
  |  Branch (1191:28): [True: 12, False: 0]
  |  Branch (1191:48): [True: 48, False: 1]
  |  Branch (1191:64): [True: 47, False: 1]
  ------------------
 1192|      2|      *badPtr = val;
 1193|      2|      return 0;
 1194|      2|    }
 1195|     59|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 59, False: 0]
  ------------------
 1196|     59|      *encodingName = val;
 1197|     59|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 59, False: 0]
  ------------------
 1198|     59|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     59|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 12, False: 47]
  ------------------
 1200|     12|      *badPtr = ptr;
 1201|     12|      return 0;
 1202|     12|    }
 1203|     47|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 46, False: 1]
  ------------------
 1204|     46|      return 1;
 1205|     47|  }
 1206|     48|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     96|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 4, False: 44]
  ------------------
 1207|     48|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 44]
  ------------------
 1208|      4|    *badPtr = name;
 1209|      4|    return 0;
 1210|      4|  }
 1211|     44|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     44|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 29, False: 15]
  |  |  ------------------
  ------------------
 1212|     29|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 29, False: 0]
  ------------------
 1213|     29|      *standalone = 1;
 1214|     29|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     15|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 14, False: 1]
  |  |  ------------------
  ------------------
 1215|     14|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 14, False: 0]
  ------------------
 1216|     14|      *standalone = 0;
 1217|     14|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    241|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 198, False: 43]
  ------------------
 1222|    198|    ptr += enc->minBytesPerChar;
 1223|     43|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 6, False: 37]
  ------------------
 1224|      6|    *badPtr = ptr;
 1225|      6|    return 0;
 1226|      6|  }
 1227|     37|  return 1;
 1228|     43|}
xmltok.c:parsePseudoAttribute:
 1061|    535|                     const char **valPtr, const char **nextTokPtr) {
 1062|    535|  int c;
 1063|    535|  char open;
 1064|    535|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 52, False: 483]
  ------------------
 1065|     52|    *namePtr = NULL;
 1066|     52|    return 1;
 1067|     52|  }
 1068|    483|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 4, False: 479]
  ------------------
 1069|      4|    *nextTokPtr = ptr;
 1070|      4|    return 0;
 1071|      4|  }
 1072|    693|  do {
 1073|    693|    ptr += enc->minBytesPerChar;
 1074|    693|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 214, False: 479]
  ------------------
 1075|    479|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 17, False: 462]
  ------------------
 1076|     17|    *namePtr = NULL;
 1077|     17|    return 1;
 1078|     17|  }
 1079|    462|  *namePtr = ptr;
 1080|  3.23k|  for (;;) {
 1081|  3.23k|    c = toAscii(enc, ptr, end);
 1082|  3.23k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 47, False: 3.18k]
  ------------------
 1083|     47|      *nextTokPtr = ptr;
 1084|     47|      return 0;
 1085|     47|    }
 1086|  3.18k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  3.18k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 365, False: 2.82k]
  ------------------
 1087|    365|      *nameEndPtr = ptr;
 1088|    365|      break;
 1089|    365|    }
 1090|  2.82k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 50, False: 2.77k]
  ------------------
 1091|     50|      *nameEndPtr = ptr;
 1092|    254|      do {
 1093|    254|        ptr += enc->minBytesPerChar;
 1094|    254|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 204, False: 50]
  ------------------
 1095|     50|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     50|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 35, False: 15]
  ------------------
 1096|     35|        *nextTokPtr = ptr;
 1097|     35|        return 0;
 1098|     35|      }
 1099|     15|      break;
 1100|     50|    }
 1101|  2.77k|    ptr += enc->minBytesPerChar;
 1102|  2.77k|  }
 1103|    380|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 10, False: 370]
  ------------------
 1104|     10|    *nextTokPtr = ptr;
 1105|     10|    return 0;
 1106|     10|  }
 1107|    370|  ptr += enc->minBytesPerChar;
 1108|    370|  c = toAscii(enc, ptr, end);
 1109|    770|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 400, False: 370]
  ------------------
 1110|    400|    ptr += enc->minBytesPerChar;
 1111|    400|    c = toAscii(enc, ptr, end);
 1112|    400|  }
 1113|    370|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    740|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     94|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 94, False: 276]
  |  Branch (1113:26): [True: 42, False: 52]
  ------------------
 1114|     42|    *nextTokPtr = ptr;
 1115|     42|    return 0;
 1116|     42|  }
 1117|    328|  open = (char)c;
 1118|    328|  ptr += enc->minBytesPerChar;
 1119|    328|  *valPtr = ptr;
 1120|  2.37k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.37k|    c = toAscii(enc, ptr, end);
 1122|  2.37k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 244, False: 2.13k]
  ------------------
 1123|    244|      break;
 1124|  2.13k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.13k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    631|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.50k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    542|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 631, False: 1.50k]
  |  Branch (1124:28): [True: 629, False: 2]
  |  Branch (1124:48): [True: 542, False: 964]
  |  Branch (1124:64): [True: 296, False: 246]
  ------------------
 1125|  2.13k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.21k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    542|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  3.05k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 542, False: 668]
  |  Branch (1125:31): [True: 292, False: 250]
  |  Branch (1125:48): [True: 680, False: 238]
  ------------------
 1126|  2.13k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.81k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    325|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 325, False: 355]
  |  Branch (1126:32): [True: 84, False: 241]
  ------------------
 1127|     84|      *nextTokPtr = ptr;
 1128|     84|      return 0;
 1129|     84|    }
 1130|  2.13k|  }
 1131|    244|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    244|  return 1;
 1133|    328|}
xmltok.c:toAscii:
 1033|  8.11k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  8.11k|  char buf[1];
 1035|  8.11k|  char *p = buf;
 1036|  8.11k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  8.11k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  8.11k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 236, False: 7.88k]
  ------------------
 1038|    236|    return -1;
 1039|  7.88k|  else
 1040|  7.88k|    return buf[0];
 1041|  8.11k|}
xmltok.c:isSpace:
 1044|  5.26k|isSpace(int c) {
 1045|  5.26k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.72k, False: 1.54k]
  ------------------
 1046|    614|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 614, False: 4.65k]
  ------------------
 1047|    927|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 313, False: 4.95k]
  ------------------
 1048|  1.25k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 324, False: 4.94k]
  ------------------
 1049|  1.54k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 294, False: 4.97k]
  ------------------
 1050|  1.54k|    return 1;
 1051|  5.26k|  }
 1052|  3.72k|  return 0;
 1053|  5.26k|}

xmltok.c:normal_prologTok:
 1018|  5.04M|                  const char **nextTokPtr) {
 1019|  5.04M|  int tok;
 1020|  5.04M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.13k, False: 5.04M]
  ------------------
 1021|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.04M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.04M|#  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.04M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.04M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.04M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  10.3k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 10.3k, False: 5.03M]
  ------------------
 1033|  10.3k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  10.3k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  10.3k|#  define MINBPC(enc) 1
  ------------------
 1034|  7.05k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 7.05k, False: 5.03M]
  ------------------
 1035|  7.05k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.05k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.05k|#  define MINBPC(enc) 1
  ------------------
 1036|  31.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 31.3k, False: 5.01M]
  ------------------
 1037|  31.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  31.3k|#  define MINBPC(enc) 1
  ------------------
 1038|  31.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  31.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  31.3k|    {                                                                          \
  |  |  |  |  135|  31.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  31.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  31.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 31.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  31.3k|    }
  |  |  ------------------
  ------------------
 1039|  31.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  31.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  31.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 17, False: 31.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  24.6k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 24.6k, False: 6.62k]
  ------------------
 1041|  24.6k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  24.6k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  24.6k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.73k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.73k, False: 28.5k]
  ------------------
 1043|  2.73k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.73k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.73k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.42k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.42k, False: 28.8k]
  ------------------
 1045|  3.79k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.36k, False: 29.9k]
  ------------------
 1046|  3.79k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 31.2k]
  ------------------
 1047|  3.83k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 40, False: 31.2k]
  ------------------
 1048|  3.86k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 29, False: 31.2k]
  ------------------
 1049|  3.87k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 31.2k]
  ------------------
 1050|  3.87k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.87k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.87k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.87k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  31.2k|    }
 1053|     17|    *nextTokPtr = ptr;
 1054|     17|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
 1055|  31.2k|  }
 1056|  77.8k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 77.8k, False: 4.96M]
  ------------------
 1057|  77.8k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  77.8k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 240, False: 77.5k]
  ------------------
 1058|    240|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    240|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    240|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    240|    }
 1062|       |    /* fall through */
 1063|   158k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 80.6k, False: 4.96M]
  ------------------
 1064|   182k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 23.9k, False: 5.02M]
  ------------------
 1065|  1.89M|    for (;;) {
 1066|  1.89M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.89M|#  define MINBPC(enc) 1
  ------------------
 1067|  1.89M|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.89M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.89M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.89M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 502, False: 1.89M]
  ------------------
 1068|    502|        break;
 1069|  1.89M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.89M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.89M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|   525k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 525k, False: 1.36M]
  ------------------
 1071|  1.70M|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.18M, False: 708k]
  ------------------
 1072|  1.70M|        break;
 1073|  1.10k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.10k, False: 1.88M]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.10k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  1.10k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 1.09k, False: 8]
  ------------------
 1076|  1.09k|          break;
 1077|       |        /* fall through */
 1078|   181k|      default:
  ------------------
  |  Branch (1078:7): [True: 181k, False: 1.70M]
  ------------------
 1079|   181k|        *nextTokPtr = ptr;
 1080|   181k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   181k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  1.89M|      }
 1082|  1.89M|    }
 1083|    502|    *nextTokPtr = ptr;
 1084|    502|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    502|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.89k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.89k, False: 5.04M]
  ------------------
 1086|  3.89k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.89k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.89k|#  define MINBPC(enc) 1
  ------------------
 1087|  1.72k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.72k, False: 5.04M]
  ------------------
 1088|  1.72k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.72k|#  define MINBPC(enc) 1
  ------------------
 1089|  1.72k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.72k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.80k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.80k, False: 5.04M]
  ------------------
 1091|  2.80k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.80k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.80k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.80k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    986|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 986, False: 5.04M]
  ------------------
 1094|    986|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    986|#  define MINBPC(enc) 1
  ------------------
 1095|    986|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    986|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    986|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    986|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 983]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    983|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|    983|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 25, False: 958]
  |  |  ------------------
  ------------------
 1098|     25|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     25|    {                                                                          \
  |  |  135|     25|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     25|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     25|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 24]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     25|    }
  ------------------
 1099|     24|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     24|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3, False: 21]
  |  |  ------------------
  ------------------
 1100|      3|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      3|#  define MINBPC(enc) 1
  ------------------
 1101|      3|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      3|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      3|      }
 1103|     24|    }
 1104|    979|    *nextTokPtr = ptr;
 1105|    979|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    979|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.49M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.49M, False: 547k]
  ------------------
 1107|  4.49M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.49M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.49M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.49M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|   139k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 139k, False: 4.90M]
  ------------------
 1110|   139k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   139k|#  define MINBPC(enc) 1
  ------------------
 1111|   139k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   139k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   139k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   139k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 23, False: 139k]
  ------------------
 1112|     23|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     23|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|   139k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   139k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   139k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 10, False: 139k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  5.47k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 5.47k, False: 133k]
  ------------------
 1115|  5.47k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.47k|#  define MINBPC(enc) 1
  ------------------
 1116|  5.47k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  5.47k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  1.56k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 1.56k, False: 137k]
  ------------------
 1118|  1.56k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.56k|#  define MINBPC(enc) 1
  ------------------
 1119|  1.56k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  1.56k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  47.5k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 47.5k, False: 91.8k]
  ------------------
 1121|  47.5k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  47.5k|#  define MINBPC(enc) 1
  ------------------
 1122|  47.5k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  47.5k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  2.07k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 2.07k, False: 137k]
  ------------------
 1124|  2.35k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 278, False: 139k]
  ------------------
 1125|  33.5k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 31.1k, False: 108k]
  ------------------
 1126|  34.9k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.46k, False: 138k]
  ------------------
 1127|  35.5k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 582, False: 138k]
  ------------------
 1128|  43.7k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 8.22k, False: 131k]
  ------------------
 1129|  84.8k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 41.0k, False: 98.4k]
  ------------------
 1130|  84.8k|      *nextTokPtr = ptr;
 1131|  84.8k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  84.8k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|   139k|    }
 1133|     10|    *nextTokPtr = ptr;
 1134|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
 1135|  14.0k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 14.0k, False: 5.03M]
  ------------------
 1136|  14.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.0k|#  define MINBPC(enc) 1
  ------------------
 1137|  14.0k|    return XML_TOK_OR;
  ------------------
  |  |   88|  14.0k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  20.1k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 20.1k, False: 5.02M]
  ------------------
 1139|  20.1k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  20.1k|#  define MINBPC(enc) 1
  ------------------
 1140|  20.1k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  20.1k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  25.2k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 25.2k, False: 5.01M]
  ------------------
 1142|  25.2k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  25.2k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  25.2k|#  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.70k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      1|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 732, False: 5.04M]
  |  |  ------------------
  |  | 1145|    732|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 1, False: 731]
  |  |  ------------------
  |  | 1146|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    731|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    731|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    731|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 7, False: 724]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      7|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      7|    }                                                                          \
  |  | 1151|    731|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    724|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    724|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 205, False: 519]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    205|      ptr += n;                                                                \
  |  | 1153|    205|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    205|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    205|      break;                                                                   \
  |  | 1155|    205|    }                                                                          \
  |  | 1156|    724|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    519|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    519|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 518, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    518|      ptr += n;                                                                \
  |  | 1158|    518|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    518|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    518|      break;                                                                   \
  |  | 1160|    518|    }                                                                          \
  |  | 1161|    519|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      1|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|    699|    LEAD_CASE(3)
  ------------------
  |  | 1144|     12|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 220, False: 5.04M]
  |  |  ------------------
  |  | 1145|    220|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 217]
  |  |  ------------------
  |  | 1146|     12|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    217|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    217|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    217|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 42, False: 175]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     42|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     42|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     42|    }                                                                          \
  |  | 1151|    217|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    175|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    175|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 88, False: 87]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|     88|      ptr += n;                                                                \
  |  | 1153|     88|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|     88|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|     88|      break;                                                                   \
  |  | 1155|     88|    }                                                                          \
  |  | 1156|    175|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     87|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     87|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 75, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|     75|      ptr += n;                                                                \
  |  | 1158|     75|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|     75|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|     75|      break;                                                                   \
  |  | 1160|     75|    }                                                                          \
  |  | 1161|     87|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    140|    LEAD_CASE(4)
  ------------------
  |  | 1144|     16|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 55, False: 5.04M]
  |  |  ------------------
  |  | 1145|     55|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 53]
  |  |  ------------------
  |  | 1146|     16|      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: 37, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     37|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     37|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     37|    }                                                                          \
  |  | 1151|     53|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     16|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     16|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     16|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     16|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  71.5k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 71.5k, False: 4.97M]
  ------------------
 1168|   106k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 34.5k, False: 5.01M]
  ------------------
 1169|   106k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   106k|#define XML_TOK_NAME 18
  ------------------
 1170|   106k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   106k|#  define MINBPC(enc) 1
  ------------------
 1171|   106k|    break;
 1172|    449|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 449, False: 5.04M]
  ------------------
 1173|    858|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 409, False: 5.04M]
  ------------------
 1174|  1.23k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 379, False: 5.04M]
  ------------------
 1175|  1.23k|#  ifdef XML_NS
 1176|  1.23k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.04M]
  ------------------
 1177|  1.23k|#  endif
 1178|  1.23k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.23k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.23k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.23k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.04M]
  ------------------
 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|    119|  default:
  ------------------
  |  Branch (1193:3): [True: 119, False: 5.04M]
  ------------------
 1194|    119|    *nextTokPtr = ptr;
 1195|    119|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    119|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.04M|  }
 1197|  1.95M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  1.95M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.95M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.95M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  5.65M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.84M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.95M]
  |  |  ------------------
  |  |   82|  1.84M|    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|  1.84M|    /* fall through */                                                         \
  |  |   87|  1.84M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 143k, False: 1.81M]
  |  |  ------------------
  |  |   88|  1.82M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.68M, False: 277k]
  |  |  ------------------
  |  |   89|  1.84M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 20.5k, False: 1.93M]
  |  |  ------------------
  |  |   90|  1.84M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 2.57k, False: 1.95M]
  |  |  ------------------
  |  |   91|  1.84M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 2.66k, False: 1.95M]
  |  |  ------------------
  |  |   92|  1.84M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.84M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.84M|    break;                                                                     \
  |  |   94|  1.84M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    413|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 427, False: 1.95M]
  |  |  |  |  ------------------
  |  |  |  |   71|    427|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 426]
  |  |  |  |  ------------------
  |  |  |  |   72|    413|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    426|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    852|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    426|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 416]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    416|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    416|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 413]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    426|    ptr += n;                                                                  \
  |  |  |  |   78|    413|    break;
  |  |  ------------------
  |  |   95|    413|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    289|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 295, False: 1.95M]
  |  |  |  |  ------------------
  |  |  |  |   71|    295|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 293]
  |  |  |  |  ------------------
  |  |  |  |   72|    289|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    293|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    586|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    293|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    291|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    291|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 289]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|    293|    ptr += n;                                                                  \
  |  |  |  |   78|    289|    break;
  |  |  ------------------
  |  |   96|    289|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 1.95M]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 14, 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|     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;
  |  |  ------------------
  ------------------
 1200|  7.45k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 7.45k, False: 1.95M]
  ------------------
 1201|  38.7k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 31.2k, False: 1.92M]
  ------------------
 1202|  39.3k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 603, False: 1.95M]
  ------------------
 1203|  43.1k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 3.84k, False: 1.95M]
  ------------------
 1204|  45.8k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.68k, False: 1.95M]
  ------------------
 1205|  45.8k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 7, False: 1.95M]
  ------------------
 1206|  59.5k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 13.7k, False: 1.94M]
  ------------------
 1207|  95.7k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 36.1k, False: 1.92M]
  ------------------
 1208|   104k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 9.18k, False: 1.94M]
  ------------------
 1209|   104k|      *nextTokPtr = ptr;
 1210|   104k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 1.95M]
  ------------------
 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|  1.18k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 1.18k, False: 1.95M]
  ------------------
 1232|  1.18k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  1.18k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 1.17k]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|  1.17k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.17k|#  define MINBPC(enc) 1
  ------------------
 1237|  1.17k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  1.17k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    848|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 848, False: 1.95M]
  ------------------
 1239|    848|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    848|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 847]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    847|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    847|#  define MINBPC(enc) 1
  ------------------
 1244|    847|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    847|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    893|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 893, False: 1.95M]
  ------------------
 1246|    893|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    893|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 892]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    892|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    892|#  define MINBPC(enc) 1
  ------------------
 1251|    892|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    892|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     54|    default:
  ------------------
  |  Branch (1252:5): [True: 54, False: 1.95M]
  ------------------
 1253|     54|      *nextTokPtr = ptr;
 1254|     54|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     54|#define XML_TOK_INVALID 0
  ------------------
 1255|  1.95M|    }
 1256|  1.95M|  }
 1257|    255|  return -tok;
 1258|   108k|}
xmltok.c:normal_scanLit:
  984|  17.3k|                const char **nextTokPtr) {
  985|  13.8M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  13.8M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  13.8M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  13.8M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  13.8M|    switch (t) {
  988|  4.74k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|    795|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    785|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 795, False: 13.8M]
  |  |  |  |  ------------------
  |  |  |  |   50|    795|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 794]
  |  |  |  |  ------------------
  |  |  |  |   51|    785|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    794|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    794|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    794|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|    794|    ptr += n;                                                                  \
  |  |  |  |   57|    785|    break;
  |  |  ------------------
  |  |   61|    853|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    848|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 853, False: 13.8M]
  |  |  |  |  ------------------
  |  |  |  |   50|    853|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 852]
  |  |  |  |  ------------------
  |  |  |  |   51|    848|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    852|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    852|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    852|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 848]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|    852|    ptr += n;                                                                  \
  |  |  |  |   57|    848|    break;
  |  |  ------------------
  |  |   62|    848|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    703|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 713, False: 13.8M]
  |  |  |  |  ------------------
  |  |  |  |   50|    713|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 711]
  |  |  |  |  ------------------
  |  |  |  |   51|    703|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    711|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    711|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    711|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 703]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|    711|    ptr += n;                                                                  \
  |  |  |  |   57|    703|    break;
  |  |  ------------------
  |  |   63|    703|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 13.8M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 13.8M]
  |  |  ------------------
  |  |   65|     22|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 13.8M]
  |  |  ------------------
  |  |   66|     22|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     22|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  13.2k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 13.2k, False: 13.8M]
  ------------------
  990|  23.3k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 10.0k, False: 13.8M]
  ------------------
  991|  23.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.3k|#  define MINBPC(enc) 1
  ------------------
  992|  23.3k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 6.14k, False: 17.2k]
  ------------------
  993|  6.14k|        break;
  994|  17.2k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  17.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  17.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  17.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 6, False: 17.2k]
  ------------------
  995|      6|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      6|#define XML_TOK_LITERAL 27
  ------------------
  996|  17.2k|      *nextTokPtr = ptr;
  997|  17.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  17.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  2.05k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.05k, False: 15.1k]
  ------------------
  999|  5.75k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 3.70k, False: 13.5k]
  ------------------
 1000|  9.88k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 4.13k, False: 13.1k]
  ------------------
 1001|  17.1k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 7.27k, False: 9.95k]
  ------------------
 1002|  17.1k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 20, False: 17.2k]
  ------------------
 1003|  17.2k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 31, False: 17.2k]
  ------------------
 1004|  17.2k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  17.2k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     21|      default:
  ------------------
  |  Branch (1005:7): [True: 21, False: 17.2k]
  ------------------
 1006|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
 1007|  17.2k|      }
 1008|  13.8M|    default:
  ------------------
  |  Branch (1008:5): [True: 13.8M, False: 25.7k]
  ------------------
 1009|  13.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.8M|#  define MINBPC(enc) 1
  ------------------
 1010|  13.8M|      break;
 1011|  13.8M|    }
 1012|  13.8M|  }
 1013|     95|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     95|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  17.3k|}
xmltok.c:normal_scanDecl:
  183|  24.6k|                 const char **nextTokPtr) {
  184|  24.6k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.6k|    {                                                                          \
  |  |  |  |  135|  24.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  24.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 24.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  24.6k|    }
  |  |  ------------------
  ------------------
  185|  24.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  24.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|  1.08k|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 1.08k, False: 23.5k]
  ------------------
  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: 24.6k]
  ------------------
  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|    750|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 750, False: 23.9k]
  ------------------
  192|  23.5k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 22.8k, False: 1.83k]
  ------------------
  193|  23.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.5k|#  define MINBPC(enc) 1
  ------------------
  194|  23.5k|    break;
  195|      4|  default:
  ------------------
  |  Branch (195:3): [True: 4, False: 24.6k]
  ------------------
  196|      4|    *nextTokPtr = ptr;
  197|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  198|  24.6k|  }
  199|   157k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   157k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   157k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   157k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     11|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 11, False: 157k]
  ------------------
  202|     11|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     11|    {                                                                          \
  |  |  135|     11|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     11|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     11|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 9]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     11|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      9|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      9|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      9|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 5, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 8]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 8]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 8]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 8]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|      9|      }
  212|       |      /* fall through */
  213|  10.8k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 10.8k, False: 146k]
  ------------------
  214|  19.0k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 8.25k, False: 149k]
  ------------------
  215|  23.5k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 4.43k, False: 153k]
  ------------------
  216|  23.5k|      *nextTokPtr = ptr;
  217|  23.5k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  23.5k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   120k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 120k, False: 37.1k]
  ------------------
  219|   134k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 13.6k, False: 144k]
  ------------------
  220|   134k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   134k|#  define MINBPC(enc) 1
  ------------------
  221|   134k|      break;
  222|     12|    default:
  ------------------
  |  Branch (222:5): [True: 12, False: 157k]
  ------------------
  223|     12|      *nextTokPtr = ptr;
  224|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  225|   157k|    }
  226|   157k|  }
  227|     46|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     46|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  23.5k|}
xmltok.c:normal_scanComment:
  146|  1.73k|                    const char **nextTokPtr) {
  147|  1.73k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.73k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.73k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.73k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.72k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.72k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.72k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 11, False: 1.71k]
  ------------------
  149|     11|      *nextTokPtr = ptr;
  150|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  151|     11|    }
  152|  1.71k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.71k|#  define MINBPC(enc) 1
  ------------------
  153|  6.02M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  6.02M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  11.9M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  6.22k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.21k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.22k, False: 6.01M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.22k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.21k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.21k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.21k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.21k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.21k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  6.21k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.21k|    break;
  |  |  ------------------
  |  |   61|  5.98M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.98M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.98M, False: 40.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.98M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 5.98M]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.98M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.98M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.98M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.98M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 5.98M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  5.98M|    ptr += n;                                                                  \
  |  |  |  |   57|  5.98M|    break;
  |  |  ------------------
  |  |   62|  5.98M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.47k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.48k, False: 6.01M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.48k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.47k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.47k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.47k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  7.47k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.47k|    break;
  |  |  ------------------
  |  |   63|  7.47k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 6.02M]
  |  |  ------------------
  |  |   64|     15|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 6.02M]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 6.02M]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.20k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.20k, False: 6.01M]
  ------------------
  157|  2.20k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.20k|#  define MINBPC(enc) 1
  ------------------
  158|  2.20k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.20k|    {                                                                          \
  |  |  |  |  135|  2.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.20k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.20k|    }
  |  |  ------------------
  ------------------
  159|  2.20k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.20k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.58k, False: 622]
  |  |  ------------------
  ------------------
  160|  1.58k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.58k|#  define MINBPC(enc) 1
  ------------------
  161|  1.58k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.58k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.58k|    {                                                                          \
  |  |  |  |  135|  1.58k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.58k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.58k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.58k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.58k|    }
  |  |  ------------------
  ------------------
  162|  1.58k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.58k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 13, False: 1.57k]
  ------------------
  163|     13|            *nextTokPtr = ptr;
  164|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  165|     13|          }
  166|  1.57k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.57k|#  define MINBPC(enc) 1
  ------------------
  167|  1.57k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.57k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.58k|        }
  169|    622|        break;
  170|  24.9k|      default:
  ------------------
  |  Branch (170:7): [True: 24.9k, False: 5.99M]
  ------------------
  171|  24.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.9k|#  define MINBPC(enc) 1
  ------------------
  172|  24.9k|        break;
  173|  6.02M|      }
  174|  6.02M|    }
  175|  1.71k|  }
  176|    109|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    109|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.73k|}
xmltok.c:normal_scanPi:
  277|  14.0k|               const char **nextTokPtr) {
  278|  14.0k|  int tok;
  279|  14.0k|  const char *target = ptr;
  280|  14.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.0k|    {                                                                          \
  |  |  |  |  135|  14.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  14.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  14.0k|    }
  |  |  ------------------
  ------------------
  281|  14.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  14.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  14.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  13.9k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  13.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 14.0k]
  |  |  ------------------
  |  |  111|  13.0k|    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|  13.0k|    /* fall through */                                                         \
  |  |  116|  13.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 12.0k, False: 1.95k]
  |  |  ------------------
  |  |  117|  13.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 984, False: 13.0k]
  |  |  ------------------
  |  |  118|  13.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  13.0k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  13.0k|    break;                                                                     \
  |  |  120|  13.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    280|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 283, False: 13.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|    283|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 282]
  |  |  |  |  ------------------
  |  |  |  |  101|    280|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    282|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    564|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    282|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 281]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    281|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    281|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 280]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    282|    ptr += n;                                                                  \
  |  |  |  |  107|    280|    break;
  |  |  ------------------
  |  |  121|    680|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    671|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 680, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    680|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 678]
  |  |  |  |  ------------------
  |  |  |  |  101|    671|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    678|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.35k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    678|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 676]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    676|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    676|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 671]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    678|    ptr += n;                                                                  \
  |  |  |  |  107|    671|    break;
  |  |  ------------------
  |  |  122|    671|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6, False: 13.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     10|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, 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|      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;
  |  |  ------------------
  ------------------
  283|      3|  default:
  ------------------
  |  Branch (283:3): [True: 3, False: 14.0k]
  ------------------
  284|      3|    *nextTokPtr = ptr;
  285|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  286|  14.0k|  }
  287|   746k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   746k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   746k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   746k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  2.69M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   730k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 746k]
  |  |  ------------------
  |  |   82|   730k|    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|   730k|    /* fall through */                                                         \
  |  |   87|   730k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 519k, False: 226k]
  |  |  ------------------
  |  |   88|   708k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 189k, False: 557k]
  |  |  ------------------
  |  |   89|   728k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 19.6k, False: 726k]
  |  |  ------------------
  |  |   90|   730k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.56k, False: 744k]
  |  |  ------------------
  |  |   91|   730k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 699, False: 745k]
  |  |  ------------------
  |  |   92|   730k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   730k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   730k|    break;                                                                     \
  |  |   94|   730k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    260|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 280, False: 746k]
  |  |  |  |  ------------------
  |  |  |  |   71|    280|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 279]
  |  |  |  |  ------------------
  |  |  |  |   72|    260|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    279|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    558|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    279|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 270]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    270|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    270|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 260]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|    279|    ptr += n;                                                                  \
  |  |  |  |   78|    260|    break;
  |  |  ------------------
  |  |   95|  1.53k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.50k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.53k, False: 744k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.53k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.52k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.50k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.52k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.05k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.52k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.52k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.52k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.52k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |   74|     29|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     29|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     29|    }                                                                          \
  |  |  |  |   77|  1.52k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.50k|    break;
  |  |  ------------------
  |  |   96|  1.50k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 38, False: 746k]
  |  |  |  |  ------------------
  |  |  |  |   71|     38|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 36]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     36|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     72|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     36|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 29]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     29|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     29|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 29, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     36|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     36|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     36|    }                                                                          \
  |  |  |  |   77|     36|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.04k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.04k, False: 745k]
  ------------------
  291|  1.71k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 670, False: 745k]
  ------------------
  292|  3.43k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.71k, False: 744k]
  ------------------
  293|  3.43k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.43k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 3.42k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  3.42k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.42k|#  define MINBPC(enc) 1
  ------------------
  298|  3.47M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  3.47M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.47M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.47M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  6.84M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.36k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.36k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.36k, False: 3.47M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.36k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.36k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.36k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.36k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.36k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  2.36k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.36k|    break;
  |  |  ------------------
  |  |   61|  3.41M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.41M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.41M, False: 64.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.41M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 3.41M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.41M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.41M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.41M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.41M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 3.41M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  3.41M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.41M|    break;
  |  |  ------------------
  |  |   62|  3.41M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.18k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.18k, False: 3.47M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.18k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 7.18k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.18k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.18k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.18k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.18k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 7.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  7.18k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.18k|    break;
  |  |  ------------------
  |  |   63|  7.18k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 3.47M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 3.47M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 3.47M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.25k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.25k, False: 3.47M]
  ------------------
  302|  5.25k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.25k|#  define MINBPC(enc) 1
  ------------------
  303|  5.25k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.25k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.25k|    {                                                                          \
  |  |  |  |  135|  5.25k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.25k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 5.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  5.25k|    }
  |  |  ------------------
  ------------------
  304|  5.25k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.25k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.27k, False: 1.98k]
  |  |  ------------------
  ------------------
  305|  3.27k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.27k|#  define MINBPC(enc) 1
  ------------------
  306|  3.27k|            return tok;
  307|  3.27k|          }
  308|  1.98k|          break;
  309|  50.0k|        default:
  ------------------
  |  Branch (309:9): [True: 50.0k, False: 3.42M]
  ------------------
  310|  50.0k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  50.0k|#  define MINBPC(enc) 1
  ------------------
  311|  50.0k|          break;
  312|  3.47M|        }
  313|  3.47M|      }
  314|    130|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    130|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  10.3k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 10.3k, False: 736k]
  ------------------
  316|  10.3k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  10.3k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 10.3k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  10.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.3k|#  define MINBPC(enc) 1
  ------------------
  321|  10.3k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.3k|    {                                                                          \
  |  |  |  |  135|  10.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  10.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  10.3k|    }
  |  |  ------------------
  ------------------
  322|  10.3k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  10.3k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 10.3k, False: 26]
  |  |  ------------------
  ------------------
  323|  10.3k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  10.3k|#  define MINBPC(enc) 1
  ------------------
  324|  10.3k|        return tok;
  325|  10.3k|      }
  326|       |      /* fall through */
  327|     34|    default:
  ------------------
  |  Branch (327:5): [True: 8, False: 746k]
  ------------------
  328|     34|      *nextTokPtr = ptr;
  329|     34|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  330|   746k|    }
  331|   746k|  }
  332|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  13.9k|}
xmltok.c:normal_checkPiTarget:
  232|  13.8k|                      int *tokPtr) {
  233|  13.8k|  int upper = 0;
  234|  13.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  13.8k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  13.8k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  13.8k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  13.8k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  13.8k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 4.44k, False: 9.37k]
  ------------------
  237|  4.44k|    return 1;
  238|  9.37k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  9.37k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|  1.14k|  case ASCII_x:
  ------------------
  |  |   86|  1.14k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.14k, False: 8.23k]
  ------------------
  240|  1.14k|    break;
  241|  7.43k|  case ASCII_X:
  ------------------
  |  |   59|  7.43k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 7.43k, False: 1.94k]
  ------------------
  242|  7.43k|    upper = 1;
  243|  7.43k|    break;
  244|    802|  default:
  ------------------
  |  Branch (244:3): [True: 802, False: 8.57k]
  ------------------
  245|    802|    return 1;
  246|  9.37k|  }
  247|  8.57k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.57k|#  define MINBPC(enc) 1
  ------------------
  248|  8.57k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  8.57k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    785|  case ASCII_m:
  ------------------
  |  |   75|    785|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 785, False: 7.78k]
  ------------------
  250|    785|    break;
  251|  3.92k|  case ASCII_M:
  ------------------
  |  |   48|  3.92k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 3.92k, False: 4.64k]
  ------------------
  252|  3.92k|    upper = 1;
  253|  3.92k|    break;
  254|  3.86k|  default:
  ------------------
  |  Branch (254:3): [True: 3.86k, False: 4.71k]
  ------------------
  255|  3.86k|    return 1;
  256|  8.57k|  }
  257|  4.71k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.71k|#  define MINBPC(enc) 1
  ------------------
  258|  4.71k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  4.71k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    284|  case ASCII_l:
  ------------------
  |  |   74|    284|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 284, False: 4.42k]
  ------------------
  260|    284|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 4.70k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  4.42k|  default:
  ------------------
  |  Branch (264:3): [True: 4.42k, False: 286]
  ------------------
  265|  4.42k|    return 1;
  266|  4.71k|  }
  267|    286|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 283]
  ------------------
  268|      3|    return 0;
  269|    283|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    283|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    283|  return 1;
  271|    286|}
xmltok.c:normal_scanPercent:
  924|  3.90k|                    const char **nextTokPtr) {
  925|  3.90k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.90k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.90k|    {                                                                          \
  |  |  |  |  135|  3.90k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.90k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 28, False: 3.87k]
  |  |  |  |  ------------------
  |  |  |  |  136|     28|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     28|      }                                                                        \
  |  |  |  |  138|  3.90k|    }
  |  |  ------------------
  ------------------
  926|  3.87k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.87k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.87k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.71k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.23k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.87k]
  |  |  ------------------
  |  |  111|  1.23k|    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.23k|    /* fall through */                                                         \
  |  |  116|  1.23k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 673, False: 3.19k]
  |  |  ------------------
  |  |  117|  1.23k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 562, False: 3.31k]
  |  |  ------------------
  |  |  118|  1.23k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.23k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.23k|    break;                                                                     \
  |  |  120|  1.23k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    291|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 310, False: 3.56k]
  |  |  |  |  ------------------
  |  |  |  |  100|    310|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 308]
  |  |  |  |  ------------------
  |  |  |  |  101|    291|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    308|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    616|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    308|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, 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: 1, False: 291]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|    308|    ptr += n;                                                                  \
  |  |  |  |  107|    291|    break;
  |  |  ------------------
  |  |  121|    291|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    196|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 199, False: 3.67k]
  |  |  |  |  ------------------
  |  |  |  |  100|    199|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 198]
  |  |  |  |  ------------------
  |  |  |  |  101|    196|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    198|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    396|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    198|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 197]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    197|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    197|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 196]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    198|    ptr += n;                                                                  \
  |  |  |  |  107|    196|    break;
  |  |  ------------------
  |  |  122|    196|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 3.85k]
  |  |  |  |  ------------------
  |  |  |  |  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: 9, 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|     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|    998|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 998, False: 2.87k]
  ------------------
  929|  1.77k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 772, False: 3.10k]
  ------------------
  930|  2.10k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 338, False: 3.53k]
  ------------------
  931|  2.11k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 3.86k]
  ------------------
  932|  2.11k|    *nextTokPtr = ptr;
  933|  2.11k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.11k|#define XML_TOK_PERCENT 22
  ------------------
  934|      2|  default:
  ------------------
  |  Branch (934:3): [True: 2, False: 3.87k]
  ------------------
  935|      2|    *nextTokPtr = ptr;
  936|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  937|  3.87k|  }
  938|  4.05k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.05k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.05k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  5.94k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.93k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.05k]
  |  |  ------------------
  |  |   82|  1.93k|    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|  1.93k|    /* fall through */                                                         \
  |  |   87|  1.93k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 690, False: 3.36k]
  |  |  ------------------
  |  |   88|  1.09k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 402, False: 3.65k]
  |  |  ------------------
  |  |   89|  1.41k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 321, False: 3.73k]
  |  |  ------------------
  |  |   90|  1.72k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 310, False: 3.74k]
  |  |  ------------------
  |  |   91|  1.93k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 211, False: 3.84k]
  |  |  ------------------
  |  |   92|  1.93k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.93k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.93k|    break;                                                                     \
  |  |   94|  1.93k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    295|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 307, False: 3.75k]
  |  |  |  |  ------------------
  |  |  |  |   71|    307|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 306]
  |  |  |  |  ------------------
  |  |  |  |   72|    295|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    306|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    612|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    306|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 297]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    297|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    297|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 295]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    306|    ptr += n;                                                                  \
  |  |  |  |   78|    295|    break;
  |  |  ------------------
  |  |   95|    295|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    198|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 205, False: 3.85k]
  |  |  |  |  ------------------
  |  |  |  |   71|    205|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 204]
  |  |  |  |  ------------------
  |  |  |  |   72|    198|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    204|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    408|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    204|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 201]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    201|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    201|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 198]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    204|    ptr += n;                                                                  \
  |  |  |  |   78|    198|    break;
  |  |  ------------------
  |  |   96|    198|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5, False: 4.05k]
  |  |  |  |  ------------------
  |  |  |  |   71|      5|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, 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|      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;
  |  |  ------------------
  ------------------
  941|  1.57k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.57k, False: 2.48k]
  ------------------
  942|  1.57k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.57k|#  define MINBPC(enc) 1
  ------------------
  943|  1.57k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.57k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     29|    default:
  ------------------
  |  Branch (944:5): [True: 29, False: 4.02k]
  ------------------
  945|     29|      *nextTokPtr = ptr;
  946|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  947|  4.05k|    }
  948|  4.05k|  }
  949|     92|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.72k|}
xmltok.c:normal_scanPoundName:
  954|  25.2k|                      const char **nextTokPtr) {
  955|  25.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.2k|    {                                                                          \
  |  |  |  |  135|  25.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 25.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  25.2k|    }
  |  |  ------------------
  ------------------
  956|  25.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  24.2k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  25.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 25.2k]
  |  |  ------------------
  |  |  111|  25.2k|    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|  25.2k|    /* fall through */                                                         \
  |  |  116|  25.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 24.1k, False: 1.10k]
  |  |  ------------------
  |  |  117|  25.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.04k, False: 24.2k]
  |  |  ------------------
  |  |  118|  25.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  25.2k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  25.2k|    break;                                                                     \
  |  |  120|  25.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     13|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 27, False: 25.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 26]
  |  |  |  |  ------------------
  |  |  |  |  101|     13|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     26|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     52|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     26|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 15]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! 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 (102:41): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     26|    ptr += n;                                                                  \
  |  |  |  |  107|     13|    break;
  |  |  ------------------
  |  |  121|     13|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      4|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 25.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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: 2, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      4|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 25.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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: 15, 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|     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;
  |  |  ------------------
  ------------------
  958|      4|  default:
  ------------------
  |  Branch (958:3): [True: 4, False: 25.2k]
  ------------------
  959|      4|    *nextTokPtr = ptr;
  960|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  961|  25.2k|  }
  962|   174k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   174k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   174k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   174k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   542k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   149k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 174k]
  |  |  ------------------
  |  |   82|   149k|    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|   149k|    /* fall through */                                                         \
  |  |   87|   149k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 95.3k, False: 79.5k]
  |  |  ------------------
  |  |   88|   148k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 53.2k, False: 121k]
  |  |  ------------------
  |  |   89|   148k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 242, False: 174k]
  |  |  ------------------
  |  |   90|   149k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 203, False: 174k]
  |  |  ------------------
  |  |   91|   149k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 234, False: 174k]
  |  |  ------------------
  |  |   92|   149k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   149k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   149k|    break;                                                                     \
  |  |   94|   149k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    221|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 239, False: 174k]
  |  |  |  |  ------------------
  |  |  |  |   71|    239|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 238]
  |  |  |  |  ------------------
  |  |  |  |   72|    221|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    238|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    476|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    238|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 222]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    222|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    222|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 221]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|    238|    ptr += n;                                                                  \
  |  |  |  |   78|    221|    break;
  |  |  ------------------
  |  |   95|    227|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    208|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 227, False: 174k]
  |  |  |  |  ------------------
  |  |  |  |   71|    227|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 225]
  |  |  |  |  ------------------
  |  |  |  |   72|    208|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    225|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    450|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    225|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 215]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    215|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    215|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 208]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|    225|    ptr += n;                                                                  \
  |  |  |  |   78|    208|    break;
  |  |  ------------------
  |  |   96|    208|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 174k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     40|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     20|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 18, 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|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  21.5k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 21.5k, False: 153k]
  ------------------
  966|  23.2k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 1.62k, False: 173k]
  ------------------
  967|  23.9k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 790, False: 174k]
  ------------------
  968|  24.5k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 534, False: 174k]
  ------------------
  969|  24.8k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 304, False: 174k]
  ------------------
  970|  24.8k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 174k]
  ------------------
  971|  25.0k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 240, False: 174k]
  ------------------
  972|  25.0k|      *nextTokPtr = ptr;
  973|  25.0k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  25.0k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     33|    default:
  ------------------
  |  Branch (974:5): [True: 33, False: 174k]
  ------------------
  975|     33|      *nextTokPtr = ptr;
  976|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  977|   174k|    }
  978|   174k|  }
  979|     70|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     70|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  25.2k|}
xmltok.c:normal_contentTok:
  824|  5.83M|                   const char **nextTokPtr) {
  825|  5.83M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 349k, False: 5.48M]
  ------------------
  826|   349k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   349k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  5.48M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.48M|#  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|  5.48M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.48M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.48M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  3.85M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 3.85M, False: 1.62M]
  ------------------
  838|  3.85M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.85M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.85M|#  define MINBPC(enc) 1
  ------------------
  839|   397k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 397k, False: 5.08M]
  ------------------
  840|   397k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   397k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   397k|#  define MINBPC(enc) 1
  ------------------
  841|  16.3k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 16.3k, False: 5.46M]
  ------------------
  842|  16.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.3k|#  define MINBPC(enc) 1
  ------------------
  843|  16.3k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  16.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  16.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  16.3k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 19, False: 16.3k]
  ------------------
  844|     19|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     19|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  16.3k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  16.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 221, False: 16.0k]
  ------------------
  846|    221|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    221|#  define MINBPC(enc) 1
  ------------------
  847|  16.3k|    *nextTokPtr = ptr;
  848|  16.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|   368k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 368k, False: 5.11M]
  ------------------
  850|   368k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   368k|#  define MINBPC(enc) 1
  ------------------
  851|   368k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   368k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  46.2k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 46.2k, False: 5.43M]
  ------------------
  853|  46.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  46.2k|#  define MINBPC(enc) 1
  ------------------
  854|  46.2k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  46.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  46.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  46.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 23.3k, False: 22.9k]
  ------------------
  855|  23.3k|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|  23.3k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  22.9k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  22.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 15.1k, False: 7.81k]
  ------------------
  857|  15.1k|      break;
  858|  7.81k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.81k|#  define MINBPC(enc) 1
  ------------------
  859|  7.81k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.81k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.81k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  7.81k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 202, False: 7.61k]
  ------------------
  860|    202|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    202|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  7.61k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.61k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 7.61k, False: 1]
  ------------------
  862|  7.61k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  7.61k|#  define MINBPC(enc) 1
  ------------------
  863|  7.61k|      break;
  864|  7.61k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  53.6k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  3.86k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.85k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.86k, False: 5.47M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.86k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 3.86k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.85k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.86k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.86k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.86k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 3.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  3.86k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.85k|    break;
  |  |  ------------------
  |  |   61|  7.04k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.02k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.04k, False: 5.47M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.04k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 7.03k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.02k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.03k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.03k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.03k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 7.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|  7.03k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.02k|    break;
  |  |  ------------------
  |  |   62|  15.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  15.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 15.8k, False: 5.46M]
  |  |  |  |  ------------------
  |  |  |  |   50|  15.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 15.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  15.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  15.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  15.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  15.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 23, False: 15.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     23|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     23|    }                                                                          \
  |  |  |  |   56|  15.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  15.8k|    break;
  |  |  ------------------
  |  |   63|  15.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 57, False: 5.48M]
  |  |  ------------------
  |  |   64|     59|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 5.48M]
  |  |  ------------------
  |  |   65|     68|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 5.48M]
  |  |  ------------------
  |  |   66|     68|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     68|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     68|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   771k|  default:
  ------------------
  |  Branch (868:3): [True: 771k, False: 4.70M]
  ------------------
  869|   771k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   771k|#  define MINBPC(enc) 1
  ------------------
  870|   771k|    break;
  871|  5.48M|  }
  872|  28.5M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  28.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  28.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  28.5M|  (((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|  58.4k|      LEAD_CASE(2)
  ------------------
  |  |  875|  58.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 58.4k, False: 28.5M]
  |  |  ------------------
  |  |  876|  58.4k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  58.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  58.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 7, False: 58.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 58.4k]
  |  |  ------------------
  |  |  877|      9|      *nextTokPtr = ptr;                                                       \
  |  |  878|      9|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      9|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      9|    }                                                                          \
  |  |  880|  58.4k|    ptr += n;                                                                  \
  |  |  881|  58.4k|    break;
  ------------------
  883|  14.9M|      LEAD_CASE(3)
  ------------------
  |  |  875|  14.9M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 14.9M, False: 13.5M]
  |  |  ------------------
  |  |  876|  14.9M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  14.9M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.9M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 8, False: 14.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 14.9M]
  |  |  ------------------
  |  |  877|     10|      *nextTokPtr = ptr;                                                       \
  |  |  878|     10|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     10|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     10|    }                                                                          \
  |  |  880|  14.9M|    ptr += n;                                                                  \
  |  |  881|  14.9M|    break;
  ------------------
  884|  29.2k|      LEAD_CASE(4)
  ------------------
  |  |  875|  29.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 29.2k, False: 28.5M]
  |  |  ------------------
  |  |  876|  29.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  29.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  29.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 21, False: 29.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 29.2k]
  |  |  ------------------
  |  |  877|     23|      *nextTokPtr = ptr;                                                       \
  |  |  878|     23|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     23|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     23|    }                                                                          \
  |  |  880|  29.2k|    ptr += n;                                                                  \
  |  |  881|  29.2k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  36.9k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 36.9k, False: 28.5M]
  ------------------
  887|  36.9k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  36.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  36.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 36.7k, False: 218]
  |  |  ------------------
  ------------------
  888|  36.7k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  36.7k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 23.9k, False: 12.7k]
  ------------------
  889|  23.9k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.9k|#  define MINBPC(enc) 1
  ------------------
  890|  23.9k|          break;
  891|  23.9k|        }
  892|  12.7k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  12.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  12.7k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 12.5k, False: 198]
  |  |  ------------------
  ------------------
  893|  12.5k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  12.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 12.5k, False: 1]
  ------------------
  894|  12.5k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.5k|#  define MINBPC(enc) 1
  ------------------
  895|  12.5k|            break;
  896|  12.5k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  12.5k|        }
  900|  12.7k|      }
  901|       |      /* fall through */
  902|  9.62k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 9.20k, False: 28.5M]
  ------------------
  903|   295k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 285k, False: 28.2M]
  ------------------
  904|   295k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 34, False: 28.5M]
  ------------------
  905|   295k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 1, False: 28.5M]
  ------------------
  906|   295k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 28.5M]
  ------------------
  907|   310k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 15.6k, False: 28.5M]
  ------------------
  908|   559k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 248k, False: 28.3M]
  ------------------
  909|   559k|      *nextTokPtr = ptr;
  910|   559k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   559k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  12.8M|    default:
  ------------------
  |  Branch (911:5): [True: 12.8M, False: 15.6M]
  ------------------
  912|  12.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.8M|#  define MINBPC(enc) 1
  ------------------
  913|  12.8M|      break;
  914|  28.5M|    }
  915|  28.5M|  }
  916|   261k|  *nextTokPtr = ptr;
  917|   261k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   261k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   820k|}
xmltok.c:normal_scanLt:
  726|  3.85M|               const char **nextTokPtr) {
  727|  3.85M|#  ifdef XML_NS
  728|  3.85M|  int hadColon;
  729|  3.85M|#  endif
  730|  3.85M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.85M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.85M|    {                                                                          \
  |  |  |  |  135|  3.85M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.85M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.85M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 19, False: 3.85M]
  |  |  |  |  ------------------
  |  |  |  |  136|     19|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     19|      }                                                                        \
  |  |  |  |  138|  3.85M|    }
  |  |  ------------------
  ------------------
  731|  3.85M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.85M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.85M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  3.76M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.80M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.85M]
  |  |  ------------------
  |  |  111|  3.80M|    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|  3.80M|    /* fall through */                                                         \
  |  |  116|  3.80M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.76M, False: 89.1k]
  |  |  ------------------
  |  |  117|  3.80M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 42.5k, False: 3.81M]
  |  |  ------------------
  |  |  118|  3.80M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.80M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.80M|    break;                                                                     \
  |  |  120|  3.80M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    829|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 839, False: 3.85M]
  |  |  |  |  ------------------
  |  |  |  |  100|    839|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 838]
  |  |  |  |  ------------------
  |  |  |  |  101|    829|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    838|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.67k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    838|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 834]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    834|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    834|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 829]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    838|    ptr += n;                                                                  \
  |  |  |  |  107|    829|    break;
  |  |  ------------------
  |  |  121|  1.28k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.27k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.28k, False: 3.85M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.28k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.27k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.28k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.57k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.28k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.28k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.28k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.28k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 11, False: 1.27k]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|  1.28k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.27k|    break;
  |  |  ------------------
  |  |  122|  1.27k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 3.85M]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     22|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      9|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.98k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.98k, False: 3.85M]
  ------------------
  734|  1.98k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.98k|#  define MINBPC(enc) 1
  ------------------
  735|  1.98k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.98k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.98k|    {                                                                          \
  |  |  |  |  135|  1.98k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.98k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.98k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.98k|    }
  |  |  ------------------
  ------------------
  736|  1.98k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.98k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 12, False: 1.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    654|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 654, False: 1.33k]
  ------------------
  738|    654|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    654|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    654|#  define MINBPC(enc) 1
  ------------------
  739|  1.32k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.32k, False: 666]
  ------------------
  740|  1.32k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.32k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.32k|#  define MINBPC(enc) 1
  ------------------
  741|  1.98k|    }
  742|     12|    *nextTokPtr = ptr;
  743|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  744|  11.2k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 11.2k, False: 3.84M]
  ------------------
  745|  11.2k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.2k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.2k|#  define MINBPC(enc) 1
  ------------------
  746|  31.1k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 31.1k, False: 3.82M]
  ------------------
  747|  31.1k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  31.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  31.1k|#  define MINBPC(enc) 1
  ------------------
  748|     18|  default:
  ------------------
  |  Branch (748:3): [True: 18, False: 3.85M]
  ------------------
  749|     18|    *nextTokPtr = ptr;
  750|     18|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  751|  3.85M|  }
  752|  3.80M|#  ifdef XML_NS
  753|  3.80M|  hadColon = 0;
  754|  3.80M|#  endif
  755|       |  /* we have a start-tag */
  756|  4.07M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  4.07M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.07M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.07M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   727k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   241k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.07M]
  |  |  ------------------
  |  |   82|   241k|    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|   241k|    /* fall through */                                                         \
  |  |   87|   241k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 86.8k, False: 3.98M]
  |  |  ------------------
  |  |   88|   184k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 97.7k, False: 3.97M]
  |  |  ------------------
  |  |   89|   205k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 20.4k, False: 4.05M]
  |  |  ------------------
  |  |   90|   205k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 319, False: 4.07M]
  |  |  ------------------
  |  |   91|   241k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 36.0k, False: 4.03M]
  |  |  ------------------
  |  |   92|   241k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   241k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   241k|    break;                                                                     \
  |  |   94|   241k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.39k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.41k, False: 4.07M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.41k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.41k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.39k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.41k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.82k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.41k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.40k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.40k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.40k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 1.39k]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|  1.41k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.39k|    break;
  |  |  ------------------
  |  |   95|  21.1k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  21.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21.1k, False: 4.05M]
  |  |  |  |  ------------------
  |  |  |  |   71|  21.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 21.1k]
  |  |  |  |  ------------------
  |  |  |  |   72|  21.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  21.1k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  42.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  21.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 21.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  21.1k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  21.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 37, False: 21.0k]
  |  |  |  |  ------------------
  |  |  |  |   74|     38|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     38|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     38|    }                                                                          \
  |  |  |  |   77|  21.1k|    ptr += n;                                                                  \
  |  |  |  |   78|  21.0k|    break;
  |  |  ------------------
  |  |   96|  21.0k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 4.07M]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     38|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     19|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     10|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 4.07M]
  ------------------
  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|  46.4k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 46.4k, False: 4.02M]
  ------------------
  777|  47.0k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 545, False: 4.07M]
  ------------------
  778|  48.6k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.64k, False: 4.07M]
  ------------------
  779|  48.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  48.6k|#  define MINBPC(enc) 1
  ------------------
  780|  50.0k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  50.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  50.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  50.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  43.1k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  43.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 50.0k]
  |  |  ------------------
  |  |  111|  43.9k|    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|  43.9k|    /* fall through */                                                         \
  |  |  116|  43.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 41.0k, False: 8.93k]
  |  |  ------------------
  |  |  117|  43.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.83k, False: 47.2k]
  |  |  ------------------
  |  |  118|  43.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  43.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  43.9k|    break;                                                                     \
  |  |  120|  43.9k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    318|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 331, False: 49.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|    331|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 330]
  |  |  |  |  ------------------
  |  |  |  |  101|    318|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    330|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    660|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    330|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 326]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    326|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    326|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 8, False: 318]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|    330|    ptr += n;                                                                  \
  |  |  |  |  107|    318|    break;
  |  |  ------------------
  |  |  121|    688|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    675|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 688, False: 49.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    688|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 686]
  |  |  |  |  ------------------
  |  |  |  |  101|    675|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    686|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.37k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    686|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 680]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    680|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    680|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 675]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|    686|    ptr += n;                                                                  \
  |  |  |  |  107|    675|    break;
  |  |  ------------------
  |  |  122|    675|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 50.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, 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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.32k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.32k, False: 48.7k]
  ------------------
  784|  1.32k|          goto gt;
  785|  2.33k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 2.33k, False: 47.6k]
  ------------------
  786|  2.33k|          goto sol;
  787|    334|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 334, False: 49.6k]
  ------------------
  788|    865|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 531, False: 49.5k]
  ------------------
  789|  1.39k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 532, False: 49.4k]
  ------------------
  790|  1.39k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.39k|#  define MINBPC(enc) 1
  ------------------
  791|  1.39k|          continue;
  792|     14|        default:
  ------------------
  |  Branch (792:9): [True: 14, False: 50.0k]
  ------------------
  793|     14|          *nextTokPtr = ptr;
  794|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  795|  50.0k|        }
  796|  44.9k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  44.9k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  50.0k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  48.6k|    }
  800|  3.75M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 3.75M, False: 314k]
  ------------------
  801|  3.76M|    gt:
  802|  3.76M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.76M|#  define MINBPC(enc) 1
  ------------------
  803|  3.76M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  3.76M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.52k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.52k, False: 4.07M]
  ------------------
  805|  3.85k|    sol:
  806|  3.85k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.85k|#  define MINBPC(enc) 1
  ------------------
  807|  3.85k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.85k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.85k|    {                                                                          \
  |  |  |  |  135|  3.85k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.85k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 3.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  3.85k|    }
  |  |  ------------------
  ------------------
  808|  3.84k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.84k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 16, False: 3.83k]
  ------------------
  809|     16|        *nextTokPtr = ptr;
  810|     16|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  811|     16|      }
  812|  3.83k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.83k|#  define MINBPC(enc) 1
  ------------------
  813|  3.83k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  3.83k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     26|    default:
  ------------------
  |  Branch (814:5): [True: 26, False: 4.07M]
  ------------------
  815|     26|      *nextTokPtr = ptr;
  816|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  817|  4.07M|    }
  818|  4.07M|  }
  819|    106|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    106|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  3.80M|}
xmltok.c:normal_scanCdataSection:
  337|  1.32k|                         const char **nextTokPtr) {
  338|  1.32k|  static const char CDATA_LSQB[]
  339|  1.32k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.32k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.32k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.32k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.32k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.32k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.32k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.32k|  int i;
  341|  1.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.32k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.32k|    {                                                                          \
  |  |  135|  1.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.32k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.31k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.32k|    }
  ------------------
  344|  9.19k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  7.87k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 7.88k, False: 1.31k]
  ------------------
  345|  7.88k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  7.88k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 8, False: 7.87k]
  ------------------
  346|      8|      *nextTokPtr = ptr;
  347|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  348|      8|    }
  349|  7.88k|  }
  350|  1.31k|  *nextTokPtr = ptr;
  351|  1.31k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.31k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.31k|}
xmltok.c:normal_scanEndTag:
  432|  31.1k|                   const char **nextTokPtr) {
  433|  31.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  31.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  31.1k|    {                                                                          \
  |  |  |  |  135|  31.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  31.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  31.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 31.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  31.1k|    }
  |  |  ------------------
  ------------------
  434|  31.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  31.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  31.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  22.3k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  30.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 31.1k]
  |  |  ------------------
  |  |  111|  30.6k|    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.6k|    /* fall through */                                                         \
  |  |  116|  30.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 21.4k, False: 9.75k]
  |  |  ------------------
  |  |  117|  30.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 9.26k, False: 21.9k]
  |  |  ------------------
  |  |  118|  30.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  30.6k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  30.6k|    break;                                                                     \
  |  |  120|  30.6k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    220|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 226, False: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    226|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 225]
  |  |  |  |  ------------------
  |  |  |  |  101|    220|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    225|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    450|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    225|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 221]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    221|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    221|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 220]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    225|    ptr += n;                                                                  \
  |  |  |  |  107|    220|    break;
  |  |  ------------------
  |  |  121|    257|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    254|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 257, False: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    257|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 256]
  |  |  |  |  ------------------
  |  |  |  |  101|    254|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    256|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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: 1, False: 255]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    255|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    255|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 254]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    256|    ptr += n;                                                                  \
  |  |  |  |  107|    254|    break;
  |  |  ------------------
  |  |  122|    254|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6, False: 31.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     10|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      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;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 31.1k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  31.1k|  }
  440|   916k|  while (HAS_CHAR(enc, ptr, end)) {
  441|   916k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   916k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   916k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  1.78M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  7.22k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 916k]
  |  |  ------------------
  |  |   82|  7.22k|    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|  7.22k|    /* fall through */                                                         \
  |  |   87|  7.22k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.99k, False: 911k]
  |  |  ------------------
  |  |   88|  6.31k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.31k, False: 915k]
  |  |  ------------------
  |  |   89|  6.63k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 328, False: 916k]
  |  |  ------------------
  |  |   90|  6.97k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 337, False: 916k]
  |  |  ------------------
  |  |   91|  7.22k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 250, False: 916k]
  |  |  ------------------
  |  |   92|  7.22k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.22k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  7.22k|    break;                                                                     \
  |  |   94|  7.22k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    343|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 354, False: 916k]
  |  |  |  |  ------------------
  |  |  |  |   71|    354|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 353]
  |  |  |  |  ------------------
  |  |  |  |   72|    343|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    353|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    706|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    353|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 349]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    349|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    349|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 343]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    353|    ptr += n;                                                                  \
  |  |  |  |   78|    343|    break;
  |  |  ------------------
  |  |   95|   877k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   877k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 877k, False: 38.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|   877k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 877k]
  |  |  |  |  ------------------
  |  |  |  |   72|   877k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   877k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.75M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   877k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 877k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   877k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   877k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 27, False: 877k]
  |  |  |  |  ------------------
  |  |  |  |   74|     28|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     28|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     28|    }                                                                          \
  |  |  |  |   77|   877k|    ptr += n;                                                                  \
  |  |  |  |   78|   877k|    break;
  |  |  ------------------
  |  |   96|   877k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 916k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     22|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      8|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  443|    291|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 291, False: 916k]
  ------------------
  444|  4.36k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 4.07k, False: 912k]
  ------------------
  445|  21.3k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 17.0k, False: 899k]
  ------------------
  446|  41.0k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  19.7k|#  define MINBPC(enc) 1
  ------------------
  447|  41.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  41.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  41.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    207|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 207, False: 40.8k]
  ------------------
  449|  3.77k|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 3.56k, False: 37.5k]
  ------------------
  450|  19.7k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 15.9k, False: 25.1k]
  ------------------
  451|  19.7k|          break;
  452|  21.3k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 21.3k, False: 19.7k]
  ------------------
  453|  21.3k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
  454|  21.3k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  21.3k|#define XML_TOK_END_TAG 5
  ------------------
  455|      7|        default:
  ------------------
  |  Branch (455:9): [True: 7, False: 41.0k]
  ------------------
  456|      7|          *nextTokPtr = ptr;
  457|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  458|  41.0k|        }
  459|  41.0k|      }
  460|     35|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     35|#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: 916k]
  ------------------
  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|  9.64k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 9.64k, False: 906k]
  ------------------
  469|  9.64k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  9.64k|#  define MINBPC(enc) 1
  ------------------
  470|  9.64k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  9.64k|#define XML_TOK_END_TAG 5
  ------------------
  471|      7|    default:
  ------------------
  |  Branch (471:5): [True: 7, False: 916k]
  ------------------
  472|      7|      *nextTokPtr = ptr;
  473|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  474|   916k|    }
  475|   916k|  }
  476|     80|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  31.1k|}
xmltok.c:normal_scanAtts:
  573|  44.9k|                 const char **nextTokPtr) {
  574|  44.9k|#  ifdef XML_NS
  575|  44.9k|  int hadColon = 0;
  576|  44.9k|#  endif
  577|  3.26M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  3.26M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.26M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.26M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  4.94M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.13M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.26M]
  |  |  ------------------
  |  |   82|  1.13M|    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|  1.13M|    /* fall through */                                                         \
  |  |   87|  1.13M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.06M, False: 2.19M]
  |  |  ------------------
  |  |   88|  1.10M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 42.5k, False: 3.22M]
  |  |  ------------------
  |  |   89|  1.11M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 366, False: 3.26M]
  |  |  ------------------
  |  |   90|  1.11M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 262, False: 3.26M]
  |  |  ------------------
  |  |   91|  1.13M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 21.7k, False: 3.24M]
  |  |  ------------------
  |  |   92|  1.13M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.13M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.13M|    break;                                                                     \
  |  |   94|  1.13M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   129k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 129k, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |   71|   129k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 129k]
  |  |  |  |  ------------------
  |  |  |  |   72|   129k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   129k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   258k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   129k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 129k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   129k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   129k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 129k]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|   129k|    ptr += n;                                                                  \
  |  |  |  |   78|   129k|    break;
  |  |  ------------------
  |  |   95|   146k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   146k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 146k, False: 3.12M]
  |  |  |  |  ------------------
  |  |  |  |   71|   146k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |   72|   146k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   146k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   292k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   146k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 146k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   146k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   146k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 38, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |   74|     43|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     43|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     43|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     43|    }                                                                          \
  |  |  |  |   77|   146k|    ptr += n;                                                                  \
  |  |  |  |   78|   146k|    break;
  |  |  ------------------
  |  |   96|   146k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 29, False: 3.26M]
  |  |  |  |  ------------------
  |  |  |  |   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: 6, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     22|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, 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: 3.26M]
  ------------------
  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|    298|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 298, False: 3.26M]
  ------------------
  598|    506|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 208, False: 3.26M]
  ------------------
  599|    835|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 329, False: 3.26M]
  ------------------
  600|  1.53k|      for (;;) {
  601|  1.53k|        int t;
  602|       |
  603|  1.53k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.53k|#  define MINBPC(enc) 1
  ------------------
  604|  1.53k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.53k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.53k|    {                                                                          \
  |  |  |  |  135|  1.53k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.53k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.53k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  1.53k|    }
  |  |  ------------------
  ------------------
  605|  1.50k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  1.50k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.50k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  1.50k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 786, False: 715]
  ------------------
  607|    786|          break;
  608|    715|        switch (t) {
  609|    201|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 201, False: 514]
  ------------------
  610|    443|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 242, False: 473]
  ------------------
  611|    704|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 261, False: 454]
  ------------------
  612|    704|          break;
  613|     11|        default:
  ------------------
  |  Branch (613:9): [True: 11, False: 704]
  ------------------
  614|     11|          *nextTokPtr = ptr;
  615|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  616|    715|        }
  617|    715|      }
  618|       |      /* fall through */
  619|  1.85M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 1.85M, False: 1.40M]
  ------------------
  620|  1.85M|      int open;
  621|  1.85M|#  ifdef XML_NS
  622|  1.85M|      hadColon = 0;
  623|  1.85M|#  endif
  624|  1.85M|      for (;;) {
  625|  1.85M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.85M|#  define MINBPC(enc) 1
  ------------------
  626|  1.85M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.85M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.85M|    {                                                                          \
  |  |  |  |  135|  1.85M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.85M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.85M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 34, False: 1.85M]
  |  |  |  |  ------------------
  |  |  |  |  136|     34|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     34|      }                                                                        \
  |  |  |  |  138|  1.85M|    }
  |  |  ------------------
  ------------------
  627|  1.85M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  1.85M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.85M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  1.85M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 86.3k, False: 1.77M]
  |  Branch (628:32): [True: 1.77M, False: 659]
  ------------------
  629|  1.85M|          break;
  630|    659|        switch (open) {
  631|    225|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 225, False: 434]
  ------------------
  632|    422|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 197, False: 462]
  ------------------
  633|    648|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 226, False: 433]
  ------------------
  634|    648|          break;
  635|     11|        default:
  ------------------
  |  Branch (635:9): [True: 11, False: 648]
  ------------------
  636|     11|          *nextTokPtr = ptr;
  637|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  638|    659|        }
  639|    659|      }
  640|  1.85M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.85M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  21.4M|      for (;;) {
  643|  21.4M|        int t;
  644|  21.4M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  21.4M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  21.4M|    {                                                                          \
  |  |  |  |  135|  21.4M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  21.4M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  21.4M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 103, False: 21.4M]
  |  |  |  |  ------------------
  |  |  |  |  136|    103|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|    103|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|    103|      }                                                                        \
  |  |  |  |  138|  21.4M|    }
  |  |  ------------------
  ------------------
  645|  21.4M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  21.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  21.4M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  21.4M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 1.85M, False: 19.5M]
  ------------------
  647|  1.85M|          break;
  648|  19.5M|        switch (t) {
  649|  22.1M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.88k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.88k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.88k, False: 19.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.88k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.88k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.88k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.88k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.88k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.88k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 5.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  5.88k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.88k|    break;
  |  |  ------------------
  |  |   61|  11.0M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.0M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.0M, False: 8.49M]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.0M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 11.0M]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.0M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.0M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.0M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  11.0M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 11.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  11.0M|    ptr += n;                                                                  \
  |  |  |  |   57|  11.0M|    break;
  |  |  ------------------
  |  |   62|  11.0M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.50k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.51k, False: 19.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.51k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 5.51k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.50k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.51k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.51k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.51k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  5.51k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.50k|    break;
  |  |  ------------------
  |  |   63|  5.50k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 19.5M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 19.5M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 19.5M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  19.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 19.9k, False: 19.5M]
  ------------------
  651|  19.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  19.9k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  19.9k|#  define MINBPC(enc) 1
  ------------------
  652|  19.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 17, False: 19.9k]
  ------------------
  653|     17|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 14, False: 3]
  ------------------
  654|     14|              *nextTokPtr = ptr;
  655|     17|            return tok;
  656|     17|          }
  657|  19.9k|          break;
  658|  19.9k|        }
  659|  19.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 22, False: 19.5M]
  ------------------
  660|     22|          *nextTokPtr = ptr;
  661|     22|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  662|  8.46M|        default:
  ------------------
  |  Branch (662:9): [True: 8.46M, False: 11.0M]
  ------------------
  663|  8.46M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.46M|#  define MINBPC(enc) 1
  ------------------
  664|  8.46M|          break;
  665|  19.5M|        }
  666|  19.5M|      }
  667|  1.85M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.85M|#  define MINBPC(enc) 1
  ------------------
  668|  1.85M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.85M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.85M|    {                                                                          \
  |  |  |  |  135|  1.85M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.85M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.85M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 1.85M]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  1.85M|    }
  |  |  ------------------
  ------------------
  669|  1.85M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.85M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.85M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|   884k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 884k, False: 974k]
  ------------------
  671|  1.83M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 948k, False: 910k]
  ------------------
  672|  1.84M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 10.0k, False: 1.84M]
  ------------------
  673|  1.84M|        break;
  674|  1.89k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 1.89k, False: 1.85M]
  ------------------
  675|  1.89k|        goto sol;
  676|  14.1k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 14.1k, False: 1.84M]
  ------------------
  677|  14.1k|        goto gt;
  678|     11|      default:
  ------------------
  |  Branch (678:7): [True: 11, False: 1.85M]
  ------------------
  679|     11|        *nextTokPtr = ptr;
  680|     11|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  681|  1.85M|      }
  682|       |      /* ptr points to closing quote */
  683|  1.98M|      for (;;) {
  684|  1.98M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.98M|#  define MINBPC(enc) 1
  ------------------
  685|  1.98M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.98M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.98M|    {                                                                          \
  |  |  |  |  135|  1.98M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.98M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.98M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 1.98M]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  1.98M|    }
  |  |  ------------------
  ------------------
  686|  1.98M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.98M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.98M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  2.72M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   882k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 1.98M]
  |  |  ------------------
  |  |  111|   882k|    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|   882k|    /* fall through */                                                         \
  |  |  116|   882k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 864k, False: 1.12M]
  |  |  ------------------
  |  |  117|   882k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 18.8k, False: 1.96M]
  |  |  ------------------
  |  |  118|   882k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   882k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   882k|    break;                                                                     \
  |  |  120|   927k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|   927k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 927k, False: 1.06M]
  |  |  |  |  ------------------
  |  |  |  |  100|   927k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 927k]
  |  |  |  |  ------------------
  |  |  |  |  101|   927k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|   927k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.85M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   927k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 927k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|   927k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   927k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 927k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|   927k|    ptr += n;                                                                  \
  |  |  |  |  107|   927k|    break;
  |  |  ------------------
  |  |  121|   927k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.94k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.96k, False: 1.98M]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.96k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.96k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.94k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.96k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.92k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.96k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.96k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.96k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.96k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 17, False: 3.94k]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|  3.96k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.94k|    break;
  |  |  ------------------
  |  |  122|  3.94k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 1.98M]
  |  |  |  |  ------------------
  |  |  |  |  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: 13, 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|     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|    811|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 811, False: 1.98M]
  ------------------
  689|   144k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 143k, False: 1.84M]
  ------------------
  690|   145k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 556, False: 1.98M]
  ------------------
  691|   145k|          continue;
  692|    262|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 262, False: 1.98M]
  ------------------
  693|  14.4k|        gt:
  694|  14.4k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.4k|#  define MINBPC(enc) 1
  ------------------
  695|  14.4k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  14.4k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  28.0k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 28.0k, False: 1.95M]
  ------------------
  697|  29.9k|        sol:
  698|  29.9k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  29.9k|#  define MINBPC(enc) 1
  ------------------
  699|  29.9k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  29.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  29.9k|    {                                                                          \
  |  |  |  |  135|  29.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  29.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  29.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 29.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  29.9k|    }
  |  |  ------------------
  ------------------
  700|  29.9k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  29.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 17, False: 29.9k]
  ------------------
  701|     17|            *nextTokPtr = ptr;
  702|     17|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  703|     17|          }
  704|  29.9k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  29.9k|#  define MINBPC(enc) 1
  ------------------
  705|  29.9k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  29.9k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      2|        default:
  ------------------
  |  Branch (706:9): [True: 2, False: 1.98M]
  ------------------
  707|      2|          *nextTokPtr = ptr;
  708|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  709|  1.98M|        }
  710|  1.81M|        break;
  711|  1.98M|      }
  712|  1.81M|      break;
  713|  1.84M|    }
  714|  1.81M|    default:
  ------------------
  |  Branch (714:5): [True: 5, False: 3.26M]
  ------------------
  715|      5|      *nextTokPtr = ptr;
  716|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  717|  3.26M|    }
  718|  3.26M|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  44.9k|}
xmltok.c:normal_scanRef:
  545|  2.77M|                const char **nextTokPtr) {
  546|  2.77M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.77M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.77M|    {                                                                          \
  |  |  |  |  135|  2.77M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.77M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.77M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 2.77M]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  2.77M|    }
  |  |  ------------------
  ------------------
  547|  2.77M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.77M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.77M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  2.74M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.75M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.77M]
  |  |  ------------------
  |  |  111|  2.75M|    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.75M|    /* fall through */                                                         \
  |  |  116|  2.75M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.74M, False: 29.6k]
  |  |  ------------------
  |  |  117|  2.75M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 15.3k, False: 2.75M]
  |  |  ------------------
  |  |  118|  2.75M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.75M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.75M|    break;                                                                     \
  |  |  120|  2.75M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    555|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 559, False: 2.77M]
  |  |  |  |  ------------------
  |  |  |  |  100|    559|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 557]
  |  |  |  |  ------------------
  |  |  |  |  101|    555|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    557|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    557|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 556]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    556|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    556|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 555]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    557|    ptr += n;                                                                  \
  |  |  |  |  107|    555|    break;
  |  |  ------------------
  |  |  121|    555|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    365|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 370, False: 2.77M]
  |  |  |  |  ------------------
  |  |  |  |  100|    370|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 368]
  |  |  |  |  ------------------
  |  |  |  |  101|    365|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    368|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    736|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    368|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 366]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    366|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    366|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 365]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    368|    ptr += n;                                                                  \
  |  |  |  |  107|    365|    break;
  |  |  ------------------
  |  |  122|    365|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3, False: 2.77M]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      4|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  13.3k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 13.3k, False: 2.76M]
  ------------------
  550|  13.3k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  13.3k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  13.3k|#  define MINBPC(enc) 1
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 2.77M]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|  2.77M|  }
  555|  15.1M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  15.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  15.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  42.6M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  12.3M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 15.1M]
  |  |  ------------------
  |  |   82|  12.3M|    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|  12.3M|    /* fall through */                                                         \
  |  |   87|  12.3M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.87M, False: 7.23M]
  |  |  ------------------
  |  |   88|  10.1M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.23M, False: 12.8M]
  |  |  ------------------
  |  |   89|  12.3M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 2.24M, False: 12.8M]
  |  |  ------------------
  |  |   90|  12.3M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 386, False: 15.1M]
  |  |  ------------------
  |  |   91|  12.3M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 513, False: 15.1M]
  |  |  ------------------
  |  |   92|  12.3M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  12.3M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  12.3M|    break;                                                                     \
  |  |   94|  12.3M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    414|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 419, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   71|    419|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 418]
  |  |  |  |  ------------------
  |  |  |  |   72|    414|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    418|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    836|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    418|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 415]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    415|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    415|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 414]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|    418|    ptr += n;                                                                  \
  |  |  |  |   78|    414|    break;
  |  |  ------------------
  |  |   95|    745|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    742|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 745, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   71|    745|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 744]
  |  |  |  |  ------------------
  |  |  |  |   72|    742|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    744|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.48k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    744|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 743]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    743|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    743|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 742]
  |  |  |  |  ------------------
  |  |  |  |   74|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      2|    }                                                                          \
  |  |  |  |   77|    744|    ptr += n;                                                                  \
  |  |  |  |   78|    742|    break;
  |  |  ------------------
  |  |   96|    742|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 15.1M]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     38|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     19|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  2.75M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 2.75M, False: 12.3M]
  ------------------
  559|  2.75M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.75M|#  define MINBPC(enc) 1
  ------------------
  560|  2.75M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  2.75M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     13|    default:
  ------------------
  |  Branch (561:5): [True: 13, False: 15.1M]
  ------------------
  562|     13|      *nextTokPtr = ptr;
  563|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  564|  15.1M|    }
  565|  15.1M|  }
  566|     49|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  2.76M|}
xmltok.c:normal_scanCharRef:
  514|  13.3k|                    const char **nextTokPtr) {
  515|  13.3k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  13.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  13.3k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 13.3k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  13.3k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  13.3k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 10.0k, False: 3.26k]
  |  |  ------------------
  ------------------
  517|  10.0k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  10.0k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  10.0k|#  define MINBPC(enc) 1
  ------------------
  518|  3.26k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.26k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.26k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  3.24k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 3.24k, False: 17]
  ------------------
  520|  3.24k|      break;
  521|     17|    default:
  ------------------
  |  Branch (521:5): [True: 17, False: 3.24k]
  ------------------
  522|     17|      *nextTokPtr = ptr;
  523|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  524|  3.26k|    }
  525|  10.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.24k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  7.46k|#  define MINBPC(enc) 1
  ------------------
  526|  10.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  7.46k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 7.46k, False: 3.24k]
  ------------------
  528|  7.46k|        break;
  529|  3.23k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 3.23k, False: 7.47k]
  ------------------
  530|  3.23k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.23k|#  define MINBPC(enc) 1
  ------------------
  531|  3.23k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  3.23k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     11|      default:
  ------------------
  |  Branch (532:7): [True: 11, False: 10.6k]
  ------------------
  533|     11|        *nextTokPtr = ptr;
  534|     11|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  535|  10.7k|      }
  536|  10.7k|    }
  537|  3.24k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  13.3k|}
xmltok.c:normal_scanHexCharRef:
  483|  10.0k|                       const char **nextTokPtr) {
  484|  10.0k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  10.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  10.0k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 10.0k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  10.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  1.23k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.23k, False: 8.81k]
  ------------------
  487|  10.0k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 8.80k, False: 1.24k]
  ------------------
  488|  10.0k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 10.0k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  10.0k|    }
  493|  35.1k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  10.0k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  25.1k|#  define MINBPC(enc) 1
  ------------------
  494|  35.1k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  35.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  35.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  9.21k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 9.21k, False: 25.9k]
  ------------------
  496|  25.1k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 15.8k, False: 19.2k]
  ------------------
  497|  25.1k|        break;
  498|  10.0k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 10.0k, False: 25.1k]
  ------------------
  499|  10.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  10.0k|#  define MINBPC(enc) 1
  ------------------
  500|  10.0k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  10.0k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|      9|      default:
  ------------------
  |  Branch (501:7): [True: 9, False: 35.1k]
  ------------------
  502|      9|        *nextTokPtr = ptr;
  503|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  504|  35.1k|      }
  505|  35.1k|    }
  506|  10.0k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  10.0k|}
xmltok.c:normal_cdataSectionTok:
  356|   156k|                        const char **nextTokPtr) {
  357|   156k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 174, False: 156k]
  ------------------
  358|    174|    return XML_TOK_NONE;
  ------------------
  |  |   51|    174|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   156k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   156k|#  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|   156k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   156k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   156k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  58.0k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 58.0k, False: 98.0k]
  ------------------
  370|  58.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  58.0k|#  define MINBPC(enc) 1
  ------------------
  371|  58.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  58.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  58.0k|    {                                                                          \
  |  |  |  |  135|  58.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  58.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  58.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 58.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  58.0k|    }
  |  |  ------------------
  ------------------
  372|  58.0k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  58.0k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 40.4k, False: 17.6k]
  ------------------
  373|  40.4k|      break;
  374|  17.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  17.6k|#  define MINBPC(enc) 1
  ------------------
  375|  17.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.6k|    {                                                                          \
  |  |  |  |  135|  17.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  17.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  17.6k|    }
  |  |  ------------------
  ------------------
  376|  17.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  17.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 16.5k, False: 1.06k]
  ------------------
  377|  16.5k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  16.5k|#  define MINBPC(enc) 1
  ------------------
  378|  16.5k|      break;
  379|  16.5k|    }
  380|  1.06k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.06k|#  define MINBPC(enc) 1
  ------------------
  381|  1.06k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.06k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  35.1k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 35.1k, False: 120k]
  ------------------
  383|  35.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  35.1k|#  define MINBPC(enc) 1
  ------------------
  384|  35.1k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  35.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  35.1k|    {                                                                          \
  |  |  |  |  135|  35.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  35.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  35.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 35.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  35.1k|    }
  |  |  ------------------
  ------------------
  385|  35.1k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  35.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  35.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 195, False: 34.9k]
  ------------------
  386|    195|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    195|#  define MINBPC(enc) 1
  ------------------
  387|  35.1k|    *nextTokPtr = ptr;
  388|  35.1k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  35.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  32.9k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 32.9k, False: 123k]
  ------------------
  390|  32.9k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  32.9k|#  define MINBPC(enc) 1
  ------------------
  391|  32.9k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  32.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  32.9k|    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: 153k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.37k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 2.37k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.36k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#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: 10, False: 2.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     10|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     10|    }                                                                          \
  |  |  |  |   56|  2.37k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.36k|    break;
  |  |  ------------------
  |  |   61|  3.44k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.43k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.44k, False: 152k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.44k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.44k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.43k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.44k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.44k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.44k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 3.43k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  3.44k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.43k|    break;
  |  |  ------------------
  |  |   62|  8.02k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.02k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.02k, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.02k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 8.02k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.02k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.02k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.02k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  8.02k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 8.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  8.02k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.02k|    break;
  |  |  ------------------
  |  |   63|  8.02k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 26, False: 156k]
  |  |  ------------------
  |  |   64|     28|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 156k]
  |  |  ------------------
  |  |   65|     30|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 156k]
  |  |  ------------------
  |  |   66|     30|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     30|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  16.1k|  default:
  ------------------
  |  Branch (393:3): [True: 16.1k, False: 140k]
  ------------------
  394|  16.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.1k|#  define MINBPC(enc) 1
  ------------------
  395|  16.1k|    break;
  396|   156k|  }
  397|  6.21M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  6.21M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.21M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.21M|  (((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|  14.1k|      LEAD_CASE(2)
  ------------------
  |  |  400|  14.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 14.1k, False: 6.19M]
  |  |  ------------------
  |  |  401|  14.1k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  14.1k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  14.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 14.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 14.1k]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|  14.1k|    ptr += n;                                                                  \
  |  |  406|  14.1k|    break;
  ------------------
  408|  5.53M|      LEAD_CASE(3)
  ------------------
  |  |  400|  5.53M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 5.53M, False: 679k]
  |  |  ------------------
  |  |  401|  5.53M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  5.53M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  5.53M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 5.53M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 5.53M]
  |  |  ------------------
  |  |  402|      5|      *nextTokPtr = ptr;                                                       \
  |  |  403|      5|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      5|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      5|    }                                                                          \
  |  |  405|  5.53M|    ptr += n;                                                                  \
  |  |  406|  5.53M|    break;
  ------------------
  409|  12.8k|      LEAD_CASE(4)
  ------------------
  |  |  400|  12.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 12.8k, False: 6.20M]
  |  |  ------------------
  |  |  401|  12.8k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  12.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  12.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 12.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 12.8k]
  |  |  ------------------
  |  |  402|      2|      *nextTokPtr = ptr;                                                       \
  |  |  403|      2|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      2|    }                                                                          \
  |  |  405|  12.8k|    ptr += n;                                                                  \
  |  |  406|  12.8k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     19|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 19, False: 6.21M]
  ------------------
  412|     20|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 1, False: 6.21M]
  ------------------
  413|     21|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 1, False: 6.21M]
  ------------------
  414|  34.6k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 34.5k, False: 6.17M]
  ------------------
  415|  61.7k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 27.1k, False: 6.18M]
  ------------------
  416|  86.7k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 25.0k, False: 6.18M]
  ------------------
  417|  86.7k|      *nextTokPtr = ptr;
  418|  86.7k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  86.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   565k|    default:
  ------------------
  |  Branch (419:5): [True: 565k, False: 5.64M]
  ------------------
  420|   565k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   565k|#  define MINBPC(enc) 1
  ------------------
  421|   565k|      break;
  422|  6.21M|    }
  423|  6.21M|  }
  424|    144|  *nextTokPtr = ptr;
  425|    144|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    144|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  86.9k|}
xmltok.c:normal_attributeValueTok:
 1262|  35.3M|                          const char **nextTokPtr) {
 1263|  35.3M|  const char *start;
 1264|  35.3M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.04M, False: 33.2M]
  ------------------
 1265|  2.04M|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.04M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  33.2M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  33.2M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  33.2M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  33.2M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 33.2M]
  ------------------
 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|  33.2M|  start = ptr;
 1275|  1.10G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.10G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.10G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.10G|  (((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|  6.59M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  6.59M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 6.59M, False: 1.09G]
  |  |  ------------------
  |  | 1279|  6.59M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  6.59M|    break;
  ------------------
 1282|   866M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   866M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 866M, False: 237M]
  |  |  ------------------
  |  | 1279|   866M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   866M|    break;
  ------------------
 1283|  21.3M|      LEAD_CASE(4)
  ------------------
  |  | 1278|  21.3M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 21.3M, False: 1.08G]
  |  |  ------------------
  |  | 1279|  21.3M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  21.3M|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  2.85M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 2.85M, False: 1.10G]
  ------------------
 1286|  2.85M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 2.34M, False: 511k]
  ------------------
 1287|  2.34M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.34M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.34M|#  define MINBPC(enc) 1
  ------------------
 1288|   511k|      *nextTokPtr = ptr;
 1289|   511k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   511k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      4|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 4, False: 1.10G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      4|      *nextTokPtr = ptr;
 1293|      4|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
 1294|  22.6M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 22.6M, False: 1.08G]
  ------------------
 1295|  22.6M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 16.1M, False: 6.47M]
  ------------------
 1296|  16.1M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  16.1M|#  define MINBPC(enc) 1
  ------------------
 1297|  16.1M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.1M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  16.1M|      }
 1299|  6.47M|      *nextTokPtr = ptr;
 1300|  6.47M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.47M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   834k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 834k, False: 1.10G]
  ------------------
 1302|   834k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 482k, False: 351k]
  ------------------
 1303|   482k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   482k|#  define MINBPC(enc) 1
  ------------------
 1304|   482k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   482k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   482k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   482k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 568, False: 482k]
  ------------------
 1305|    568|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    568|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   482k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   482k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   482k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 47.7k, False: 434k]
  ------------------
 1307|  47.7k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  47.7k|#  define MINBPC(enc) 1
  ------------------
 1308|   482k|        *nextTokPtr = ptr;
 1309|   482k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   482k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   482k|      }
 1311|   351k|      *nextTokPtr = ptr;
 1312|   351k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   351k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  5.27M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 5.27M, False: 1.09G]
  ------------------
 1314|  5.27M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 3.58M, False: 1.69M]
  ------------------
 1315|  3.58M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.58M|#  define MINBPC(enc) 1
  ------------------
 1316|  3.58M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  3.58M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  3.58M|      }
 1318|  1.69M|      *nextTokPtr = ptr;
 1319|  1.69M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.69M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   177M|    default:
  ------------------
  |  Branch (1320:5): [True: 177M, False: 925M]
  ------------------
 1321|   177M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   177M|#  define MINBPC(enc) 1
  ------------------
 1322|   177M|      break;
 1323|  1.10G|    }
 1324|  1.10G|  }
 1325|  1.63M|  *nextTokPtr = ptr;
 1326|  1.63M|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.63M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  33.2M|}
xmltok.c:normal_entityValueTok:
 1331|   629k|                       const char **nextTokPtr) {
 1332|   629k|  const char *start;
 1333|   629k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 4.34k, False: 624k]
  ------------------
 1334|  4.34k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.34k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   624k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   624k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   624k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   624k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 624k]
  ------------------
 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|   624k|  start = ptr;
 1344|  12.5M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  12.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  12.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.5M|  (((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|    490|      LEAD_CASE(2)
  ------------------
  |  | 1347|    490|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 490, False: 12.5M]
  |  |  ------------------
  |  | 1348|    490|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    490|    break;
  ------------------
 1351|    625|      LEAD_CASE(3)
  ------------------
  |  | 1347|    625|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 625, False: 12.5M]
  |  |  ------------------
  |  | 1348|    625|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    625|    break;
  ------------------
 1352|    482|      LEAD_CASE(4)
  ------------------
  |  | 1347|    482|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 482, False: 12.5M]
  |  |  ------------------
  |  | 1348|    482|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    482|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  15.6k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 15.6k, False: 12.5M]
  ------------------
 1355|  15.6k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 11.8k, False: 3.77k]
  ------------------
 1356|  11.8k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.8k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.8k|#  define MINBPC(enc) 1
  ------------------
 1357|  3.77k|      *nextTokPtr = ptr;
 1358|  3.77k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.77k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      5|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 5, False: 12.5M]
  ------------------
 1360|      5|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 4, False: 1]
  ------------------
 1361|      4|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      4|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      4|#  define MINBPC(enc) 1
  ------------------
 1362|      4|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      4|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 3]
  ------------------
 1363|      4|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|   234k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 234k, False: 12.3M]
  ------------------
 1367|   234k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 228k, False: 6.03k]
  ------------------
 1368|   228k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   228k|#  define MINBPC(enc) 1
  ------------------
 1369|   228k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   228k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|   228k|      }
 1371|  6.03k|      *nextTokPtr = ptr;
 1372|  6.03k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.03k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   373k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 373k, False: 12.1M]
  ------------------
 1374|   373k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 345k, False: 28.6k]
  ------------------
 1375|   345k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   345k|#  define MINBPC(enc) 1
  ------------------
 1376|   345k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   345k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   345k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   345k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 240, False: 344k]
  ------------------
 1377|    240|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    240|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   344k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   344k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   344k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 2.53k, False: 342k]
  ------------------
 1379|  2.53k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.53k|#  define MINBPC(enc) 1
  ------------------
 1380|   344k|        *nextTokPtr = ptr;
 1381|   344k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   344k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   345k|      }
 1383|  28.6k|      *nextTokPtr = ptr;
 1384|  28.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  28.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  11.9M|    default:
  ------------------
  |  Branch (1385:5): [True: 11.9M, False: 625k]
  ------------------
 1386|  11.9M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.9M|#  define MINBPC(enc) 1
  ------------------
 1387|  11.9M|      break;
 1388|  12.5M|    }
 1389|  12.5M|  }
 1390|  1.28k|  *nextTokPtr = ptr;
 1391|  1.28k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.28k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   624k|}
xmltok.c:normal_nameMatchesAscii:
 1715|   100k|                         const char *end1, const char *ptr2) {
 1716|   100k|  UNUSED_P(enc);
  ------------------
  |  |  135|   100k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   501k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   400k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 439k, False: 62.1k]
  ------------------
 1718|   439k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   439k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 29, False: 439k]
  ------------------
 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|   439k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   439k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 38.6k, False: 400k]
  ------------------
 1727|  38.6k|      return 0;
 1728|   439k|  }
 1729|  62.1k|  return ptr1 == end1;
 1730|   100k|}
xmltok.c:normal_nameLength:
 1733|  3.91M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  3.91M|  const char *start = ptr;
 1735|  8.95M|  for (;;) {
 1736|  8.95M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.95M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.95M|  (((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|  3.12k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  3.12k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 3.12k, False: 8.94M]
  |  |  ------------------
  |  | 1739|  3.12k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  3.12k|    break;
  ------------------
 1742|   779k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   779k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 779k, False: 8.17M]
  |  |  ------------------
  |  | 1739|   779k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   779k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 8.95M]
  |  |  ------------------
  |  | 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: 8.95M]
  ------------------
 1746|  4.00M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 4.00M, False: 4.95M]
  ------------------
 1747|  4.00M|#  ifdef XML_NS
 1748|  4.00M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 8.95M]
  ------------------
 1749|  4.00M|#  endif
 1750|  4.19M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 195k, False: 8.75M]
  ------------------
 1751|  4.21M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 20.7k, False: 8.93M]
  ------------------
 1752|  4.21M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 383, False: 8.95M]
  ------------------
 1753|  4.25M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 36.1k, False: 8.91M]
  ------------------
 1754|  4.25M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.25M|#  define MINBPC(enc) 1
  ------------------
 1755|  4.25M|      break;
 1756|  3.91M|    default:
  ------------------
  |  Branch (1756:5): [True: 3.91M, False: 5.03M]
  ------------------
 1757|  3.91M|      return (int)(ptr - start);
 1758|  8.95M|    }
 1759|  8.95M|  }
 1760|  3.91M|}
xmltok.c:normal_getAtts:
 1510|  3.80M|                ATTRIBUTE *atts) {
 1511|  3.80M|  enum { other, inName, inValue } state = inName;
 1512|  3.80M|  int nAtts = 0;
 1513|  3.80M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  44.6M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.80M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  40.8M|#  define MINBPC(enc) 1
  ------------------
 1517|  44.6M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  44.6M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  44.6M|  (((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|  2.11M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  2.11M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 2.11M, False: 42.5M]
  |  |  ------------------
  |  | 1528|  2.11M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  2.11M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 1.85M, False: 264k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  1.85M|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 927k, False: 926k]
  |  |  |  |  ------------------
  |  |  |  | 1521|   927k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|   927k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|   927k|      }                                                                        \
  |  |  |  | 1524|  1.85M|      state = inName;                                                          \
  |  |  |  | 1525|  1.85M|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  2.11M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  2.11M|    break;
  ------------------
 1531|  2.71M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  2.71M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 2.71M, False: 41.9M]
  |  |  ------------------
  |  | 1528|  2.71M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  2.71M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 8.10k, False: 2.70M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  8.10k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 4.44k, False: 3.65k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  4.44k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  4.44k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  4.44k|      }                                                                        \
  |  |  |  | 1524|  8.10k|      state = inName;                                                          \
  |  |  |  | 1525|  8.10k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  2.71M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  2.71M|    break;
  ------------------
 1532|  5.14k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  5.14k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 5.14k, False: 44.6M]
  |  |  ------------------
  |  | 1528|  5.14k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  5.14k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 5.14k]
  |  |  |  |  ------------------
  |  |  |  | 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|  5.14k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  5.14k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 44.6M]
  ------------------
 1535|  11.9M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 11.9M, False: 32.6M]
  ------------------
 1536|  16.6M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 4.74M, False: 39.8M]
  ------------------
 1537|  16.6M|      START_NAME
  ------------------
  |  | 1519|  16.6M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 1.77M, False: 14.9M]
  |  |  ------------------
  |  | 1520|  1.77M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 928k, False: 850k]
  |  |  ------------------
  |  | 1521|   928k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   928k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   928k|      }                                                                        \
  |  | 1524|  1.77M|      state = inName;                                                          \
  |  | 1525|  1.77M|    }
  ------------------
 1538|  16.6M|      break;
 1539|      0|#  undef START_NAME
 1540|   493k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 493k, False: 44.1M]
  ------------------
 1541|   493k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 98.1k, False: 395k]
  ------------------
 1542|  98.1k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 87.0k, False: 11.1k]
  ------------------
 1543|  87.0k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  87.0k|#  define MINBPC(enc) 1
  ------------------
 1544|  98.1k|        state = inValue;
 1545|  98.1k|        open = BT_QUOT;
 1546|   395k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 98.1k, False: 297k]
  ------------------
 1547|  98.1k|        state = other;
 1548|  98.1k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 87.0k, False: 11.1k]
  ------------------
 1549|  87.0k|          atts[nAtts].valueEnd = ptr;
 1550|  98.1k|        nAtts++;
 1551|  98.1k|      }
 1552|   493k|      break;
 1553|  7.14M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 7.14M, False: 37.4M]
  ------------------
 1554|  7.14M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 3.54M, False: 3.59M]
  ------------------
 1555|  3.54M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 1.77M, False: 1.76M]
  ------------------
 1556|  1.77M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.77M|#  define MINBPC(enc) 1
  ------------------
 1557|  3.54M|        state = inValue;
 1558|  3.54M|        open = BT_APOS;
 1559|  3.59M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 3.54M, False: 56.3k]
  ------------------
 1560|  3.54M|        state = other;
 1561|  3.54M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 1.77M, False: 1.76M]
  ------------------
 1562|  1.77M|          atts[nAtts].valueEnd = ptr;
 1563|  3.54M|        nAtts++;
 1564|  3.54M|      }
 1565|  7.14M|      break;
 1566|  21.5k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 21.5k, False: 44.6M]
  ------------------
 1567|  21.5k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 19.8k, False: 1.68k]
  ------------------
 1568|  19.8k|        atts[nAtts].normalized = 0;
 1569|  21.5k|      break;
 1570|  1.99M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.99M, False: 42.6M]
  ------------------
 1571|  1.99M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 46.3k, False: 1.94M]
  ------------------
 1572|  46.3k|        state = other;
 1573|  1.94M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 233k, False: 1.71M]
  |  Branch (1573:36): [True: 159k, False: 74.3k]
  |  Branch (1573:55): [True: 80.2k, False: 78.7k]
  ------------------
 1574|  1.94M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.72k, False: 78.5k]
  ------------------
 1575|  80.2k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  78.5k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   158k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 646, False: 77.8k]
  ------------------
 1576|  80.2k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  77.8k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   158k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 3.62k, False: 74.2k]
  ------------------
 1577|  80.2k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|  74.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  74.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 459, False: 73.7k]
  ------------------
 1578|  6.46k|        atts[nAtts].normalized = 0;
 1579|  1.99M|      break;
 1580|  2.66M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 2.66M, False: 41.9M]
  ------------------
 1581|  3.06M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 404k, False: 44.2M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  3.06M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.33k, False: 3.06M]
  ------------------
 1585|  2.33k|        state = other;
 1586|  3.06M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 860k, False: 2.20M]
  |  Branch (1586:36): [True: 829k, False: 31.1k]
  ------------------
 1587|   829k|        atts[nAtts].normalized = 0;
 1588|  3.06M|      break;
 1589|  3.77M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 3.77M, False: 40.8M]
  ------------------
 1590|  3.85M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 77.5k, False: 44.5M]
  ------------------
 1591|  3.85M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 3.80M, False: 48.1k]
  ------------------
 1592|  3.80M|        return nAtts;
 1593|  48.1k|      break;
 1594|  6.53M|    default:
  ------------------
  |  Branch (1594:5): [True: 6.53M, False: 38.1M]
  ------------------
 1595|  6.53M|      break;
 1596|  44.6M|    }
 1597|  44.6M|  }
 1598|       |  /* not reached */
 1599|  3.80M|}
xmltok.c:normal_charRefNumber:
 1602|  11.2k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  11.2k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  11.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  11.2k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  11.2k|#  define MINBPC(enc) 1
  ------------------
 1607|  11.2k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  11.2k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 8.26k, False: 3.02k]
  |  |  ------------------
  ------------------
 1608|  37.6k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  8.26k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  37.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 29.4k, False: 8.23k]
  ------------------
 1609|  29.4k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  29.3k|#  define MINBPC(enc) 1
  ------------------
 1610|  29.4k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  29.4k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  29.4k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 29.4k]
  ------------------
 1612|  1.26k|      case ASCII_0:
  ------------------
  |  |   90|  1.26k|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 1.26k, False: 28.1k]
  ------------------
 1613|  1.99k|      case ASCII_1:
  ------------------
  |  |   91|  1.99k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 731, False: 28.6k]
  ------------------
 1614|  2.75k|      case ASCII_2:
  ------------------
  |  |   92|  2.75k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 762, False: 28.6k]
  ------------------
 1615|  4.77k|      case ASCII_3:
  ------------------
  |  |   93|  4.77k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 2.02k, False: 27.3k]
  ------------------
 1616|  6.50k|      case ASCII_4:
  ------------------
  |  |   94|  6.50k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 1.72k, False: 27.6k]
  ------------------
 1617|  6.81k|      case ASCII_5:
  ------------------
  |  |   95|  6.81k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 315, False: 29.0k]
  ------------------
 1618|  8.06k|      case ASCII_6:
  ------------------
  |  |   96|  8.06k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 1.25k, False: 28.1k]
  ------------------
 1619|  8.31k|      case ASCII_7:
  ------------------
  |  |   97|  8.31k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 244, False: 29.1k]
  ------------------
 1620|  8.72k|      case ASCII_8:
  ------------------
  |  |   98|  8.72k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 413, False: 28.9k]
  ------------------
 1621|  8.98k|      case ASCII_9:
  ------------------
  |  |   99|  8.98k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 254, False: 29.1k]
  ------------------
 1622|  8.98k|        result <<= 4;
 1623|  8.98k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.98k|#define ASCII_0 0x30
  ------------------
 1624|  8.98k|        break;
 1625|    583|      case ASCII_A:
  ------------------
  |  |   36|    583|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 583, False: 28.8k]
  ------------------
 1626|    910|      case ASCII_B:
  ------------------
  |  |   37|    910|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 327, False: 29.0k]
  ------------------
 1627|  1.33k|      case ASCII_C:
  ------------------
  |  |   38|  1.33k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 423, False: 28.9k]
  ------------------
 1628|  5.28k|      case ASCII_D:
  ------------------
  |  |   39|  5.28k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 3.95k, False: 25.4k]
  ------------------
 1629|  6.48k|      case ASCII_E:
  ------------------
  |  |   40|  6.48k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 1.19k, False: 28.2k]
  ------------------
 1630|  17.8k|      case ASCII_F:
  ------------------
  |  |   41|  17.8k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 11.3k, False: 18.0k]
  ------------------
 1631|  17.8k|        result <<= 4;
 1632|  17.8k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  17.8k|#define ASCII_A 0x41
  ------------------
 1633|  17.8k|        break;
 1634|    209|      case ASCII_a:
  ------------------
  |  |   63|    209|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 209, False: 29.1k]
  ------------------
 1635|    450|      case ASCII_b:
  ------------------
  |  |   64|    450|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 241, False: 29.1k]
  ------------------
 1636|  1.06k|      case ASCII_c:
  ------------------
  |  |   65|  1.06k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 613, False: 28.7k]
  ------------------
 1637|  1.50k|      case ASCII_d:
  ------------------
  |  |   66|  1.50k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 441, False: 28.9k]
  ------------------
 1638|  1.99k|      case ASCII_e:
  ------------------
  |  |   67|  1.99k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 488, False: 28.9k]
  ------------------
 1639|  2.54k|      case ASCII_f:
  ------------------
  |  |   68|  2.54k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 557, False: 28.8k]
  ------------------
 1640|  2.54k|        result <<= 4;
 1641|  2.54k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.54k|#define ASCII_a 0x61
  ------------------
 1642|  2.54k|        break;
 1643|  29.4k|      }
 1644|  29.4k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 36, False: 29.3k]
  ------------------
 1645|     36|        return -1;
 1646|  29.4k|    }
 1647|  8.26k|  } else {
 1648|  12.5k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  12.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  9.51k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 9.52k, False: 3.01k]
  ------------------
 1649|  9.52k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  9.52k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  9.52k|      result *= 10;
 1651|  9.52k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  9.52k|#define ASCII_0 0x30
  ------------------
 1652|  9.52k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 9, False: 9.51k]
  ------------------
 1653|      9|        return -1;
 1654|  9.52k|    }
 1655|  3.02k|  }
 1656|  11.2k|  return checkCharRefNumber(result);
 1657|  11.2k|}
xmltok.c:normal_predefinedEntityName:
 1661|  2.74M|                             const char *end) {
 1662|  2.74M|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.74M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  2.74M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  2.74M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 2.30M, False: 435k]
  ------------------
 1664|  68.6k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 68.6k, False: 2.67M]
  ------------------
 1665|  68.6k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  68.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 67.5k, False: 1.06k]
  |  |  ------------------
  ------------------
 1666|  67.5k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  67.5k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 0, False: 67.5k]
  |  |  ------------------
  ------------------
 1667|  67.3k|      case ASCII_l:
  ------------------
  |  |   74|  67.3k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 67.3k, False: 198]
  ------------------
 1668|  67.3k|        return ASCII_LT;
  ------------------
  |  |  111|  67.3k|#define ASCII_LT 0x3C
  ------------------
 1669|    198|      case ASCII_g:
  ------------------
  |  |   69|    198|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 198, False: 67.3k]
  ------------------
 1670|    198|        return ASCII_GT;
  ------------------
  |  |  113|    198|#define ASCII_GT 0x3E
  ------------------
 1671|  67.5k|      }
 1672|  67.5k|    }
 1673|  1.06k|    break;
 1674|  1.24k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.24k, False: 2.74M]
  ------------------
 1675|  1.24k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.24k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 814, False: 435]
  |  |  ------------------
  ------------------
 1676|    814|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    814|#  define MINBPC(enc) 1
  ------------------
 1677|    814|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    814|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 608, False: 206]
  |  |  ------------------
  ------------------
 1678|    608|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    608|#  define MINBPC(enc) 1
  ------------------
 1679|    608|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    608|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 414, False: 194]
  |  |  ------------------
  ------------------
 1680|    414|          return ASCII_AMP;
  ------------------
  |  |  105|    414|#define ASCII_AMP 0x26
  ------------------
 1681|    608|      }
 1682|    814|    }
 1683|    835|    break;
 1684|   365k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 365k, False: 2.37M]
  ------------------
 1685|   365k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|   365k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 421, False: 365k]
  |  |  ------------------
  ------------------
 1686|   360k|    case ASCII_q:
  ------------------
  |  |   79|   360k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 360k, False: 5.08k]
  ------------------
 1687|   360k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   360k|#  define MINBPC(enc) 1
  ------------------
 1688|   360k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|   360k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 360k, False: 204]
  |  |  ------------------
  ------------------
 1689|   360k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   360k|#  define MINBPC(enc) 1
  ------------------
 1690|   360k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|   360k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 360k, False: 204]
  |  |  ------------------
  ------------------
 1691|   360k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   360k|#  define MINBPC(enc) 1
  ------------------
 1692|   360k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|   360k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 360k, False: 205]
  |  |  ------------------
  ------------------
 1693|   360k|            return ASCII_QUOT;
  ------------------
  |  |  104|   360k|#define ASCII_QUOT 0x22
  ------------------
 1694|   360k|        }
 1695|   360k|      }
 1696|    613|      break;
 1697|  4.66k|    case ASCII_a:
  ------------------
  |  |   63|  4.66k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 4.66k, False: 361k]
  ------------------
 1698|  4.66k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.66k|#  define MINBPC(enc) 1
  ------------------
 1699|  4.66k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  4.66k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.45k, False: 208]
  |  |  ------------------
  ------------------
 1700|  4.45k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.45k|#  define MINBPC(enc) 1
  ------------------
 1701|  4.45k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  4.45k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.25k, False: 205]
  |  |  ------------------
  ------------------
 1702|  4.25k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.25k|#  define MINBPC(enc) 1
  ------------------
 1703|  4.25k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|  4.25k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.02k, False: 223]
  |  |  ------------------
  ------------------
 1704|  4.02k|            return ASCII_APOS;
  ------------------
  |  |  106|  4.02k|#define ASCII_APOS 0x27
  ------------------
 1705|  4.25k|        }
 1706|  4.45k|      }
 1707|    636|      break;
 1708|   365k|    }
 1709|  2.74M|  }
 1710|  2.30M|  return 0;
 1711|  2.74M|}
xmltok.c:normal_updatePosition:
 1779|  4.78k|                       POSITION *pos) {
 1780|  4.30M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.30M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.30M|  (((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.94k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.94k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.94k, False: 4.29M]
  |  |  ------------------
  |  | 1784|  1.94k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.94k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.94k|    break;
  ------------------
 1788|  2.04k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  2.04k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 2.04k, False: 4.29M]
  |  |  ------------------
  |  | 1784|  2.04k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  2.04k|    pos->columnNumber++;                                                       \
  |  | 1786|  2.04k|    break;
  ------------------
 1789|    813|      LEAD_CASE(4)
  ------------------
  |  | 1783|    813|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 813, False: 4.29M]
  |  |  ------------------
  |  | 1784|    813|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    813|    pos->columnNumber++;                                                       \
  |  | 1786|    813|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  1.21M|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 1.21M, False: 3.08M]
  ------------------
 1792|  1.21M|      pos->columnNumber = 0;
 1793|  1.21M|      pos->lineNumber++;
 1794|  1.21M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.21M|#  define MINBPC(enc) 1
  ------------------
 1795|  1.21M|      break;
 1796|   146k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 146k, False: 4.15M]
  ------------------
 1797|   146k|      pos->lineNumber++;
 1798|   146k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   146k|#  define MINBPC(enc) 1
  ------------------
 1799|   146k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   146k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   292k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   146k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 146k, False: 86]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   146k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   146k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.66k, False: 143k]
  ------------------
 1800|  2.66k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.66k|#  define MINBPC(enc) 1
  ------------------
 1801|   146k|      pos->columnNumber = 0;
 1802|   146k|      break;
 1803|  2.93M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.93M, False: 1.36M]
  ------------------
 1804|  2.93M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.93M|#  define MINBPC(enc) 1
  ------------------
 1805|  2.93M|      pos->columnNumber++;
 1806|  2.93M|      break;
 1807|  4.30M|    }
 1808|  4.30M|  }
 1809|  4.78k|}
xmltok.c:normal_isPublicId:
 1450|  1.76k|                   const char **badPtr) {
 1451|  1.76k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.76k|#  define MINBPC(enc) 1
  ------------------
 1452|  1.76k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  1.76k|#  define MINBPC(enc) 1
  ------------------
 1453|  38.6k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  38.6k|#  define MINBPC(enc) 1
  ------------------
 1454|  38.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  38.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  38.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  5.04k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 5.04k, False: 33.6k]
  ------------------
 1456|  6.85k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.80k, False: 36.8k]
  ------------------
 1457|  7.09k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 244, False: 38.4k]
  ------------------
 1458|  7.94k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 851, False: 37.8k]
  ------------------
 1459|  20.8k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 12.9k, False: 25.7k]
  ------------------
 1460|  21.7k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 912, False: 37.7k]
  ------------------
 1461|  22.0k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 240, False: 38.4k]
  ------------------
 1462|  22.2k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 199, False: 38.4k]
  ------------------
 1463|  22.5k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 305, False: 38.3k]
  ------------------
 1464|  22.8k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 365, False: 38.2k]
  ------------------
 1465|  23.0k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 197, False: 38.4k]
  ------------------
 1466|  25.1k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 2.03k, False: 36.6k]
  ------------------
 1467|  33.5k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 8.46k, False: 30.1k]
  ------------------
 1468|  33.7k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 208, False: 38.4k]
  ------------------
 1469|  34.1k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 397, False: 38.2k]
  ------------------
 1470|  34.5k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 330, False: 38.3k]
  ------------------
 1471|  35.1k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 617, False: 38.0k]
  ------------------
 1472|  35.3k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 268, False: 38.3k]
  ------------------
 1473|  35.3k|#  ifdef XML_NS
 1474|  35.3k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 38.6k]
  ------------------
 1475|  35.3k|#  endif
 1476|  35.3k|      break;
 1477|    336|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 336, False: 38.3k]
  ------------------
 1478|    336|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    336|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 335]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    335|      break;
 1483|    335|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 291, False: 38.3k]
  ------------------
 1484|  2.45k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.16k, False: 36.4k]
  ------------------
 1485|  2.45k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  2.45k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 2.45k, False: 0]
  ------------------
 1486|  2.45k|        break;
 1487|       |      /* fall through */
 1488|    467|    default:
  ------------------
  |  Branch (1488:5): [True: 467, False: 38.1k]
  ------------------
 1489|    467|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    467|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    225|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 225, False: 242]
  ------------------
 1491|    457|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 232, False: 235]
  ------------------
 1492|    457|        break;
 1493|     10|      default:
  ------------------
  |  Branch (1493:7): [True: 10, False: 457]
  ------------------
 1494|     10|        *badPtr = ptr;
 1495|     10|        return 0;
 1496|    467|      }
 1497|    457|      break;
 1498|  38.6k|    }
 1499|  38.6k|  }
 1500|  1.75k|  return 1;
 1501|  1.76k|}
xmltok.c:little2_prologTok:
 1018|  88.8k|                  const char **nextTokPtr) {
 1019|  88.8k|  int tok;
 1020|  88.8k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 313, False: 88.5k]
  ------------------
 1021|    313|    return XML_TOK_NONE;
  ------------------
  |  |   51|    313|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  88.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  88.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  88.5k|    size_t n = end - ptr;
 1024|  88.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  88.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 26.5k, False: 62.0k]
  ------------------
 1025|  26.5k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  26.5k|#  define MINBPC(enc) 2
  ------------------
 1026|  26.5k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 18, False: 26.5k]
  ------------------
 1027|     18|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  26.5k|      end = ptr + n;
 1029|  26.5k|    }
 1030|  88.5k|  }
 1031|  88.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  88.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  88.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  86.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 86.2k, False: 2.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    754|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 754, False: 87.7k]
  ------------------
 1033|    754|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    754|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    754|#  define MINBPC(enc) 2
  ------------------
 1034|  4.15k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.15k, False: 84.3k]
  ------------------
 1035|  4.15k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.15k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.15k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.8k, False: 75.7k]
  ------------------
 1037|  12.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.8k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.8k|    {                                                                          \
  |  |  |  |  135|  12.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  12.8k|    }
  |  |  ------------------
  ------------------
 1039|  12.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  12.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 6, False: 12.8k]
  |  |  |  |  |  Branch (737:4): [True: 11.0k, False: 1.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.28k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.28k, False: 5.53k]
  ------------------
 1041|  7.28k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.28k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.28k|#  define MINBPC(enc) 2
  ------------------
 1042|  1.83k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 1.83k, False: 10.9k]
  ------------------
 1043|  1.83k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.83k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.83k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.41k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.41k, False: 11.4k]
  ------------------
 1045|  1.95k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 545, False: 12.2k]
  ------------------
 1046|  3.67k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.71k, False: 11.1k]
  ------------------
 1047|  3.67k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.8k]
  ------------------
 1048|  3.67k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.8k]
  ------------------
 1049|  3.69k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 24, False: 12.7k]
  ------------------
 1050|  3.69k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.69k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.69k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.69k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.8k|    }
 1053|      6|    *nextTokPtr = ptr;
 1054|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.8k|  }
 1056|  4.87k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.87k, False: 83.6k]
  ------------------
 1057|  4.87k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.87k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 44, False: 4.83k]
  ------------------
 1058|     44|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     44|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     44|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     44|    }
 1062|       |    /* fall through */
 1063|  20.0k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 15.2k, False: 73.3k]
  ------------------
 1064|  25.6k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.65k, False: 82.8k]
  ------------------
 1065|  28.4k|    for (;;) {
 1066|  28.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  28.4k|#  define MINBPC(enc) 2
  ------------------
 1067|  28.4k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  28.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  28.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  28.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 162, False: 28.2k]
  ------------------
 1068|    162|        break;
 1069|  28.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  28.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  28.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.8k, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.07k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.07k, False: 27.1k]
  ------------------
 1071|  1.73k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 660, False: 27.6k]
  ------------------
 1072|  1.73k|        break;
 1073|  1.01k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.01k, False: 27.2k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.01k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|  1.01k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 1.00k, False: 10]
  ------------------
 1076|  1.00k|          break;
 1077|       |        /* fall through */
 1078|  25.5k|      default:
  ------------------
  |  Branch (1078:7): [True: 25.5k, False: 2.74k]
  ------------------
 1079|  25.5k|        *nextTokPtr = ptr;
 1080|  25.5k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  25.5k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  28.2k|      }
 1082|  28.2k|    }
 1083|    162|    *nextTokPtr = ptr;
 1084|    162|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    162|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.42k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.42k, False: 86.1k]
  ------------------
 1086|  2.42k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.42k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.42k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.85k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.85k, False: 86.6k]
  ------------------
 1088|  1.85k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.85k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.85k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.85k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.18k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.18k, False: 87.3k]
  ------------------
 1091|  1.18k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.18k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.18k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.18k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    659|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 659, False: 87.8k]
  ------------------
 1094|    659|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    659|#  define MINBPC(enc) 2
  ------------------
 1095|    659|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    659|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    659|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    659|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 658]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    658|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    658|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    658|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 649, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 44, False: 605]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     44|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     44|    {                                                                          \
  |  |  135|     44|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     44|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     44|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 43]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     44|    }
  ------------------
 1099|     43|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     43|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     43|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 25, False: 18]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     43|    }
 1104|    656|    *nextTokPtr = ptr;
 1105|    656|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    656|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.54k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.54k, False: 84.0k]
  ------------------
 1107|  4.54k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.54k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.54k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.54k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.57k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.57k, False: 84.9k]
  ------------------
 1110|  3.57k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.57k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.57k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.57k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.57k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 3, False: 3.57k]
  ------------------
 1112|      3|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      3|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.57k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.57k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.57k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 39, False: 3.53k]
  |  |  |  |  |  Branch (737:4): [True: 3.53k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  1.09k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 1.09k, False: 2.47k]
  ------------------
 1115|  1.09k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.09k|#  define MINBPC(enc) 2
  ------------------
 1116|  1.09k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  1.09k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    221|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 221, False: 3.34k]
  ------------------
 1118|    221|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    221|#  define MINBPC(enc) 2
  ------------------
 1119|    221|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    221|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    267|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 267, False: 3.30k]
  ------------------
 1121|    267|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    267|#  define MINBPC(enc) 2
  ------------------
 1122|    267|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    267|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    303|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 303, False: 3.26k]
  ------------------
 1124|    536|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 233, False: 3.33k]
  ------------------
 1125|    837|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 301, False: 3.26k]
  ------------------
 1126|    976|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 139, False: 3.43k]
  ------------------
 1127|  1.25k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 280, False: 3.29k]
  ------------------
 1128|  1.53k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 281, False: 3.28k]
  ------------------
 1129|  1.94k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 407, False: 3.16k]
  ------------------
 1130|  1.94k|      *nextTokPtr = ptr;
 1131|  1.94k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  1.94k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.57k|    }
 1133|     39|    *nextTokPtr = ptr;
 1134|     39|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
 1135|  4.26k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 4.26k, False: 84.2k]
  ------------------
 1136|  4.26k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.26k|#  define MINBPC(enc) 2
  ------------------
 1137|  4.26k|    return XML_TOK_OR;
  ------------------
  |  |   88|  4.26k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.49k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.49k, False: 83.0k]
  ------------------
 1139|  5.49k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.49k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.49k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.49k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.45k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.45k, False: 86.0k]
  ------------------
 1142|  2.45k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.45k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.45k|#  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: 88.5k]
  |  |  ------------------
  |  | 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: 88.5k]
  |  |  ------------------
  |  | 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|     77|    LEAD_CASE(4)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 23, False: 88.5k]
  |  |  ------------------
  |  | 1145|     23|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 18]
  |  |  ------------------
  |  | 1146|     18|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     18|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     18|#    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|     18|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     18|#  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|     18|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     18|#  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|     18|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  8.69k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 8.69k, False: 79.8k]
  ------------------
 1168|  15.6k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.95k, False: 81.5k]
  ------------------
 1169|  15.6k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  15.6k|#define XML_TOK_NAME 18
  ------------------
 1170|  15.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.6k|#  define MINBPC(enc) 2
  ------------------
 1171|  15.6k|    break;
 1172|    230|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 230, False: 88.3k]
  ------------------
 1173|    432|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 202, False: 88.3k]
  ------------------
 1174|    640|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 208, False: 88.3k]
  ------------------
 1175|    640|#  ifdef XML_NS
 1176|    640|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 88.5k]
  ------------------
 1177|    640|#  endif
 1178|    640|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    640|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    640|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    640|#  define MINBPC(enc) 2
  ------------------
 1180|    640|    break;
 1181|  2.31k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.31k, False: 86.2k]
  ------------------
 1182|  2.31k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  2.31k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  2.31k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.31k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.88k, False: 422]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.88k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.88k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.88k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.88k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.88k|      break;
 1186|  1.88k|    }
 1187|    422|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    422|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    422|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    422|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 378, False: 44]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    378|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    378|#  define MINBPC(enc) 2
  ------------------
 1189|    378|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    378|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    378|      break;
 1191|    378|    }
 1192|       |    /* fall through */
 1193|     61|  default:
  ------------------
  |  Branch (1193:3): [True: 17, False: 88.5k]
  ------------------
 1194|     61|    *nextTokPtr = ptr;
 1195|     61|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     61|#define XML_TOK_INVALID 0
  ------------------
 1196|  88.5k|  }
 1197|  37.1k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  37.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  37.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  37.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  35.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 35.6k, False: 1.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  66.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  18.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.45k, False: 35.6k]
  |  |  ------------------
  |  |   82|  18.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.45k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.45k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.45k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 33, False: 1.42k]
  |  |  ------------------
  |  |   83|     33|      *nextTokPtr = ptr;                                                       \
  |  |   84|     33|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     33|    }                                                                          \
  |  |   86|  18.6k|    /* fall through */                                                         \
  |  |   87|  18.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 8.88k, False: 28.2k]
  |  |  ------------------
  |  |   88|  18.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 7.76k, False: 29.3k]
  |  |  ------------------
  |  |   89|  18.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 208, False: 36.9k]
  |  |  ------------------
  |  |   90|  18.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 36.9k]
  |  |  ------------------
  |  |   91|  18.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 216, False: 36.9k]
  |  |  ------------------
  |  |   92|  18.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  18.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  18.6k|    break;                                                                     \
  |  |   94|  18.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 37.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: 37.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|     26|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 26, False: 37.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|     26|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 22]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     44|#    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|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     22|    }                                                                          \
  |  |  |  |   77|     22|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    642|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 642, False: 36.4k]
  ------------------
 1201|  2.28k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.63k, False: 35.4k]
  ------------------
 1202|  2.85k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 578, False: 36.5k]
  ------------------
 1203|  5.52k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 2.67k, False: 34.4k]
  ------------------
 1204|  6.35k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 824, False: 36.3k]
  ------------------
 1205|  6.35k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 37.1k]
  ------------------
 1206|  13.5k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 7.22k, False: 29.9k]
  ------------------
 1207|  15.4k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.84k, False: 35.2k]
  ------------------
 1208|  17.6k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.22k, False: 34.9k]
  ------------------
 1209|  17.6k|      *nextTokPtr = ptr;
 1210|  17.6k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 37.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|    302|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 302, False: 36.8k]
  ------------------
 1232|    302|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    302|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 301]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    301|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    301|#  define MINBPC(enc) 2
  ------------------
 1237|    301|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    301|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    216|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 216, False: 36.9k]
  ------------------
 1239|    216|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    216|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 215]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    215|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    215|#  define MINBPC(enc) 2
  ------------------
 1244|    215|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    215|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    211|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 211, False: 36.9k]
  ------------------
 1246|    211|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    211|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 210]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    210|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    210|#  define MINBPC(enc) 2
  ------------------
 1251|    210|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    210|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     11|    default:
  ------------------
  |  Branch (1252:5): [True: 11, False: 37.1k]
  ------------------
 1253|     11|      *nextTokPtr = ptr;
 1254|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1255|  37.1k|    }
 1256|  37.1k|  }
 1257|    120|  return -tok;
 1258|  18.5k|}
xmltok.c:little2_scanLit:
  984|  4.90k|                const char **nextTokPtr) {
  985|  26.3M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  26.3M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  26.3M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  26.3M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   256k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 256k, False: 26.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  26.3M|    switch (t) {
  988|   150k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 26.3M]
  |  |  |  |  ------------------
  |  |  |  |   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: 26.3M]
  |  |  |  |  ------------------
  |  |  |  |   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|  75.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  75.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 75.1k, False: 26.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  75.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 33, False: 75.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  75.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     33|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  75.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  75.1k|#    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|  75.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  75.1k|    break;
  |  |  ------------------
  |  |   63|  75.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 26.3M]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 26.3M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 26.3M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  13.8k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 13.8k, False: 26.3M]
  ------------------
  990|  18.5k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.62k, False: 26.3M]
  ------------------
  991|  18.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  18.5k|#  define MINBPC(enc) 2
  ------------------
  992|  18.5k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 13.7k, False: 4.79k]
  ------------------
  993|  13.7k|        break;
  994|  4.79k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.79k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.79k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 4.79k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  4.79k|      *nextTokPtr = ptr;
  997|  4.79k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.79k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.79k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.75k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.05k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.05k, False: 3.73k]
  ------------------
  999|  2.33k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.28k, False: 3.51k]
  ------------------
 1000|  3.11k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 775, False: 4.01k]
  ------------------
 1001|  4.66k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.54k, False: 3.24k]
  ------------------
 1002|  4.74k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 86, False: 4.70k]
  ------------------
 1003|  4.75k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 10, False: 4.78k]
  ------------------
 1004|  4.75k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  4.75k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     34|      default:
  ------------------
  |  Branch (1005:7): [True: 34, False: 4.75k]
  ------------------
 1006|     34|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
 1007|  4.79k|      }
 1008|  26.2M|    default:
  ------------------
  |  Branch (1008:5): [True: 26.2M, False: 93.6k]
  ------------------
 1009|  26.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  26.2M|#  define MINBPC(enc) 2
  ------------------
 1010|  26.2M|      break;
 1011|  26.3M|    }
 1012|  26.3M|  }
 1013|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  4.90k|}
xmltok.c:little2_scanDecl:
  183|  7.28k|                 const char **nextTokPtr) {
  184|  7.28k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.28k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.28k|    {                                                                          \
  |  |  |  |  135|  7.28k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.28k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 7.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  7.28k|    }
  |  |  ------------------
  ------------------
  185|  7.28k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.28k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.28k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.25k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.25k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    417|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 417, False: 6.86k]
  ------------------
  187|    417|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    417|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    417|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.28k]
  ------------------
  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|    673|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 673, False: 6.60k]
  ------------------
  192|  6.84k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.16k, False: 1.11k]
  ------------------
  193|  6.84k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.84k|#  define MINBPC(enc) 2
  ------------------
  194|  6.84k|    break;
  195|     23|  default:
  ------------------
  |  Branch (195:3): [True: 23, False: 7.25k]
  ------------------
  196|     23|    *nextTokPtr = ptr;
  197|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  198|  7.28k|  }
  199|  46.0k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  46.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  46.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  46.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  46.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 46.0k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     35|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 35, False: 46.0k]
  ------------------
  202|     35|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     35|    {                                                                          \
  |  |  135|     35|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     35|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     35|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 34]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     35|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     34|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     34|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     34|  ((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: 30, False: 4]
  |  |  |  |  |  Branch (737:4): [True: 9, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 33]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 33]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 33]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 33]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     34|      }
  212|       |      /* fall through */
  213|  4.70k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.67k, False: 41.4k]
  ------------------
  214|  5.60k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 897, False: 45.1k]
  ------------------
  215|  6.77k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.17k, False: 44.9k]
  ------------------
  216|  6.77k|      *nextTokPtr = ptr;
  217|  6.77k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.77k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  32.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 32.1k, False: 13.9k]
  ------------------
  219|  39.2k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 7.13k, False: 38.9k]
  ------------------
  220|  39.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  39.2k|#  define MINBPC(enc) 2
  ------------------
  221|  39.2k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 46.0k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  46.0k|    }
  226|  46.0k|  }
  227|     31|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.84k|}
xmltok.c:little2_scanComment:
  146|    774|                    const char **nextTokPtr) {
  147|    774|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    774|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    774|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    774|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 762, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    762|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    762|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    762|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 754, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 742, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     20|      *nextTokPtr = ptr;
  150|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  151|     20|    }
  152|    742|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    742|#  define MINBPC(enc) 2
  ------------------
  153|   345k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   345k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   345k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   345k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  19.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 19.8k, False: 325k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  10.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: 345k]
  |  |  |  |  ------------------
  |  |  |  |   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: 345k]
  |  |  |  |  ------------------
  |  |  |  |   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|  5.06k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.03k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.06k, False: 339k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.06k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 5.03k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.03k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.03k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.03k|#    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|  5.03k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.03k|    break;
  |  |  ------------------
  |  |   63|  5.03k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 25, False: 344k]
  |  |  ------------------
  |  |   64|     25|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 345k]
  |  |  ------------------
  |  |   65|     30|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 345k]
  |  |  ------------------
  |  |   66|     30|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     30|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.31k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.31k, False: 343k]
  ------------------
  157|  1.31k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.31k|#  define MINBPC(enc) 2
  ------------------
  158|  1.31k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.31k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.31k|    {                                                                          \
  |  |  |  |  135|  1.31k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.31k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.31k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.31k|    }
  |  |  ------------------
  ------------------
  159|  1.31k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.31k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.31k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 941, False: 371]
  |  |  |  |  |  Branch (739:52): [True: 614, False: 327]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    614|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    614|#  define MINBPC(enc) 2
  ------------------
  161|    614|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    614|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    614|    {                                                                          \
  |  |  |  |  135|    614|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    614|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    614|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 613]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    614|    }
  |  |  ------------------
  ------------------
  162|    613|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    613|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    613|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 598, False: 15]
  |  |  |  |  |  Branch (739:52): [True: 588, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     25|            *nextTokPtr = ptr;
  164|     25|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  165|     25|          }
  166|    588|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    588|#  define MINBPC(enc) 2
  ------------------
  167|    588|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    588|#define XML_TOK_COMMENT 13
  ------------------
  168|    613|        }
  169|    698|        break;
  170|   338k|      default:
  ------------------
  |  Branch (170:7): [True: 338k, False: 6.41k]
  ------------------
  171|   338k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   338k|#  define MINBPC(enc) 2
  ------------------
  172|   338k|        break;
  173|   345k|      }
  174|   345k|    }
  175|    742|  }
  176|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    774|}
xmltok.c:little2_scanPi:
  277|  4.95k|               const char **nextTokPtr) {
  278|  4.95k|  int tok;
  279|  4.95k|  const char *target = ptr;
  280|  4.95k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.95k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.95k|    {                                                                          \
  |  |  |  |  135|  4.95k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.95k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.95k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 4.93k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  4.95k|    }
  |  |  ------------------
  ------------------
  281|  4.93k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.93k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.93k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.02k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.02k, False: 913]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.25k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.89k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 883, False: 4.05k]
  |  |  ------------------
  |  |  111|  4.89k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    883|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    883|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    883|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 870]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  4.89k|    /* fall through */                                                         \
  |  |  116|  4.89k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.45k, False: 1.48k]
  |  |  ------------------
  |  |  117|  4.89k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 569, False: 4.36k]
  |  |  ------------------
  |  |  118|  4.89k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.89k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.89k|    break;                                                                     \
  |  |  120|  4.89k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.93k]
  |  |  |  |  ------------------
  |  |  |  |  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: 4.93k]
  |  |  |  |  ------------------
  |  |  |  |  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|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 4.91k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    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|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 4.92k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  4.93k|  }
  287|   332k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   332k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   332k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   332k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.5k, False: 321k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.62M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   327k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 321k, False: 10.6k]
  |  |  ------------------
  |  |   82|   327k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|   321k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   321k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   321k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 321k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|   327k|    /* fall through */                                                         \
  |  |   87|   327k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.16k, False: 328k]
  |  |  ------------------
  |  |   88|   327k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.04k, False: 331k]
  |  |  ------------------
  |  |   89|   327k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 202, False: 332k]
  |  |  ------------------
  |  |   90|   327k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 200, False: 332k]
  |  |  ------------------
  |  |   91|   327k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 200, False: 332k]
  |  |  ------------------
  |  |   92|   327k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   327k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   327k|    break;                                                                     \
  |  |   94|   327k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 332k]
  |  |  |  |  ------------------
  |  |  |  |   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: 332k]
  |  |  |  |  ------------------
  |  |  |  |   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: 332k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  290|    490|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 490, False: 331k]
  ------------------
  291|  1.55k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.06k, False: 331k]
  ------------------
  292|  2.48k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 929, False: 331k]
  ------------------
  293|  2.48k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.48k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.48k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.48k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.48k|#  define MINBPC(enc) 2
  ------------------
  298|   107k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   107k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   107k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   107k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.21k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.21k, False: 98.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  5.63k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 107k]
  |  |  |  |  ------------------
  |  |  |  |   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: 107k]
  |  |  |  |  ------------------
  |  |  |  |   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.82k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.78k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.82k, False: 105k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 35, False: 2.78k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.78k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     35|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.78k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.78k|#    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.78k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.78k|    break;
  |  |  ------------------
  |  |   63|  2.78k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 107k]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 107k]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 107k]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.11k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.11k, False: 104k]
  ------------------
  302|  3.11k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.11k|#  define MINBPC(enc) 2
  ------------------
  303|  3.11k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.11k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.11k|    {                                                                          \
  |  |  |  |  135|  3.11k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.11k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 3.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  3.11k|    }
  |  |  ------------------
  ------------------
  304|  3.11k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  3.11k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.11k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.77k, False: 338]
  |  |  |  |  |  Branch (739:52): [True: 2.29k, False: 478]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.29k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.29k|#  define MINBPC(enc) 2
  ------------------
  306|  2.29k|            return tok;
  307|  2.29k|          }
  308|    816|          break;
  309|   101k|        default:
  ------------------
  |  Branch (309:9): [True: 101k, False: 5.95k]
  ------------------
  310|   101k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   101k|#  define MINBPC(enc) 2
  ------------------
  311|   101k|          break;
  312|   107k|        }
  313|   107k|      }
  314|    127|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    127|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.28k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.28k, False: 330k]
  ------------------
  316|  2.28k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.28k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.28k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.28k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.28k|#  define MINBPC(enc) 2
  ------------------
  321|  2.28k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.28k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.28k|    {                                                                          \
  |  |  |  |  135|  2.28k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.28k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|  2.28k|    }
  |  |  ------------------
  ------------------
  322|  2.25k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.25k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.25k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.23k, False: 15]
  |  |  |  |  |  Branch (739:52): [True: 2.22k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.22k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.22k|#  define MINBPC(enc) 2
  ------------------
  324|  2.22k|        return tok;
  325|  2.22k|      }
  326|       |      /* fall through */
  327|     33|    default:
  ------------------
  |  Branch (327:5): [True: 7, False: 332k]
  ------------------
  328|     33|      *nextTokPtr = ptr;
  329|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  330|   332k|    }
  331|   332k|  }
  332|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.89k|}
xmltok.c:little2_checkPiTarget:
  232|  4.77k|                      int *tokPtr) {
  233|  4.77k|  int upper = 0;
  234|  4.77k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.77k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.77k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.77k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.77k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  4.77k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.82k, False: 2.94k]
  ------------------
  237|  1.82k|    return 1;
  238|  2.94k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.94k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.94k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.41k, False: 528]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    780|  case ASCII_x:
  ------------------
  |  |   86|    780|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 780, False: 2.16k]
  ------------------
  240|    780|    break;
  241|  1.51k|  case ASCII_X:
  ------------------
  |  |   59|  1.51k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.51k, False: 1.42k]
  ------------------
  242|  1.51k|    upper = 1;
  243|  1.51k|    break;
  244|    644|  default:
  ------------------
  |  Branch (244:3): [True: 644, False: 2.29k]
  ------------------
  245|    644|    return 1;
  246|  2.94k|  }
  247|  2.29k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.29k|#  define MINBPC(enc) 2
  ------------------
  248|  2.29k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.29k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.29k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.47k, False: 823]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    882|  case ASCII_m:
  ------------------
  |  |   75|    882|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 882, False: 1.41k]
  ------------------
  250|    882|    break;
  251|    574|  case ASCII_M:
  ------------------
  |  |   48|    574|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 574, False: 1.72k]
  ------------------
  252|    574|    upper = 1;
  253|    574|    break;
  254|    843|  default:
  ------------------
  |  Branch (254:3): [True: 843, False: 1.45k]
  ------------------
  255|    843|    return 1;
  256|  2.29k|  }
  257|  1.45k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.45k|#  define MINBPC(enc) 2
  ------------------
  258|  1.45k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.45k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.45k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 920, False: 536]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     37|  case ASCII_l:
  ------------------
  |  |   74|     37|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 37, False: 1.41k]
  ------------------
  260|     37|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.45k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.41k|  default:
  ------------------
  |  Branch (264:3): [True: 1.41k, False: 39]
  ------------------
  265|  1.41k|    return 1;
  266|  1.45k|  }
  267|     39|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 36]
  ------------------
  268|      3|    return 0;
  269|     36|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     36|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     36|  return 1;
  271|     39|}
xmltok.c:little2_scanPercent:
  924|  2.42k|                    const char **nextTokPtr) {
  925|  2.42k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.42k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.42k|    {                                                                          \
  |  |  |  |  135|  2.42k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.42k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.42k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 85, False: 2.34k]
  |  |  |  |  ------------------
  |  |  |  |  136|     85|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     85|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     85|      }                                                                        \
  |  |  |  |  138|  2.42k|    }
  |  |  ------------------
  ------------------
  926|  2.34k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.34k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.34k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.94k, False: 402]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.47k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.42k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 380, False: 1.96k]
  |  |  ------------------
  |  |  111|  1.42k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    380|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    380|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    380|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 368]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  1.42k|    /* fall through */                                                         \
  |  |  116|  1.42k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 694, False: 1.65k]
  |  |  ------------------
  |  |  117|  1.42k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 365, False: 1.97k]
  |  |  ------------------
  |  |  118|  1.42k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.42k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.42k|    break;                                                                     \
  |  |  120|  1.42k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.34k]
  |  |  |  |  ------------------
  |  |  |  |  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.34k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  928|    271|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 271, False: 2.07k]
  ------------------
  929|    656|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 385, False: 1.95k]
  ------------------
  930|    880|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 224, False: 2.12k]
  ------------------
  931|    883|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.34k]
  ------------------
  932|    883|    *nextTokPtr = ptr;
  933|    883|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    883|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 2.33k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  2.34k|  }
  938|  2.93k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.93k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.93k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.93k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.36k, False: 574]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.90k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.57k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 559, False: 2.37k]
  |  |  ------------------
  |  |   82|  1.57k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    559|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    559|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    559|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 23, False: 536]
  |  |  ------------------
  |  |   83|     23|      *nextTokPtr = ptr;                                                       \
  |  |   84|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     23|    }                                                                          \
  |  |   86|  1.57k|    /* fall through */                                                         \
  |  |   87|  1.57k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 239, False: 2.69k]
  |  |  ------------------
  |  |   88|    988|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 213, False: 2.72k]
  |  |  ------------------
  |  |   89|  1.18k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 197, False: 2.73k]
  |  |  ------------------
  |  |   90|  1.38k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 2.73k]
  |  |  ------------------
  |  |   91|  1.57k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 2.74k]
  |  |  ------------------
  |  |   92|  1.57k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.57k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.57k|    break;                                                                     \
  |  |   94|  1.57k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.93k]
  |  |  |  |  ------------------
  |  |  |  |   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.93k]
  |  |  |  |  ------------------
  |  |  |  |   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|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 2.92k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      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;
  |  |  ------------------
  ------------------
  941|  1.31k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.31k, False: 1.62k]
  ------------------
  942|  1.31k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.31k|#  define MINBPC(enc) 2
  ------------------
  943|  1.31k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.31k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     14|    default:
  ------------------
  |  Branch (944:5): [True: 14, False: 2.92k]
  ------------------
  945|     14|      *nextTokPtr = ptr;
  946|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  947|  2.93k|    }
  948|  2.93k|  }
  949|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.42k|}
xmltok.c:little2_scanPoundName:
  954|  2.45k|                      const char **nextTokPtr) {
  955|  2.45k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.45k|    {                                                                          \
  |  |  |  |  135|  2.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.45k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.45k|    }
  |  |  ------------------
  ------------------
  956|  2.45k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.45k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.45k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.33k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.33k, False: 122]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.95k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.41k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 95, False: 2.35k]
  |  |  ------------------
  |  |  111|  2.41k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     95|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     95|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     95|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 84]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  2.41k|    /* fall through */                                                         \
  |  |  116|  2.41k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.73k, False: 719]
  |  |  ------------------
  |  |  117|  2.41k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 597, False: 1.85k]
  |  |  ------------------
  |  |  118|  2.41k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.41k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.41k|    break;                                                                     \
  |  |  120|  2.41k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |  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.45k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.43k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 2.44k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  2.45k|  }
  962|  15.5k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  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|  14.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.9k, False: 593]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  44.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  13.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 574, False: 14.9k]
  |  |  ------------------
  |  |   82|  13.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    574|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    574|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    574|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 29, False: 545]
  |  |  ------------------
  |  |   83|     29|      *nextTokPtr = ptr;                                                       \
  |  |   84|     29|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     29|    }                                                                          \
  |  |   86|  13.2k|    /* fall through */                                                         \
  |  |   87|  13.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.89k, False: 10.6k]
  |  |  ------------------
  |  |   88|  12.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 7.16k, False: 8.38k]
  |  |  ------------------
  |  |   89|  12.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 197, False: 15.3k]
  |  |  ------------------
  |  |   90|  13.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 203, False: 15.3k]
  |  |  ------------------
  |  |   91|  13.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 15.3k]
  |  |  ------------------
  |  |   92|  13.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  13.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  13.2k|    break;                                                                     \
  |  |   94|  13.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 15.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 15.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  965|    225|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 225, False: 15.3k]
  ------------------
  966|    579|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 354, False: 15.2k]
  ------------------
  967|    972|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 393, False: 15.1k]
  ------------------
  968|  1.56k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 594, False: 14.9k]
  ------------------
  969|  1.81k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 245, False: 15.3k]
  ------------------
  970|  1.81k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 15.5k]
  ------------------
  971|  2.30k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 489, False: 15.0k]
  ------------------
  972|  2.30k|      *nextTokPtr = ptr;
  973|  2.30k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.30k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     11|    default:
  ------------------
  |  Branch (974:5): [True: 11, False: 15.5k]
  ------------------
  975|     11|      *nextTokPtr = ptr;
  976|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  977|  15.5k|    }
  978|  15.5k|  }
  979|     62|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     62|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.41k|}
xmltok.c:little2_contentTok:
  824|  54.3k|                   const char **nextTokPtr) {
  825|  54.3k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.13k, False: 53.1k]
  ------------------
  826|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  53.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  53.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  53.1k|    size_t n = end - ptr;
  829|  53.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  53.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 13.0k, False: 40.0k]
  ------------------
  830|  13.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  13.0k|#  define MINBPC(enc) 2
  ------------------
  831|  13.0k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 60, False: 13.0k]
  ------------------
  832|     60|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  13.0k|      end = ptr + n;
  834|  13.0k|    }
  835|  53.1k|  }
  836|  53.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  53.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  53.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  42.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 42.9k, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  15.1k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 15.1k, False: 37.9k]
  ------------------
  838|  15.1k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  15.1k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  15.1k|#  define MINBPC(enc) 2
  ------------------
  839|  9.07k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.07k, False: 44.0k]
  ------------------
  840|  9.07k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  9.07k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  9.07k|#  define MINBPC(enc) 2
  ------------------
  841|  11.3k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 11.3k, False: 41.7k]
  ------------------
  842|  11.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.3k|#  define MINBPC(enc) 2
  ------------------
  843|  11.3k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  11.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  11.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 17, False: 11.3k]
  ------------------
  844|     17|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     17|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  11.3k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  11.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.60k, False: 6.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 488, False: 10.8k]
  ------------------
  846|    488|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    488|#  define MINBPC(enc) 2
  ------------------
  847|  11.3k|    *nextTokPtr = ptr;
  848|  11.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  11.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.75k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.75k, False: 51.3k]
  ------------------
  850|  1.75k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.75k|#  define MINBPC(enc) 2
  ------------------
  851|  1.75k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.75k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  2.73k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 2.73k, False: 50.3k]
  ------------------
  853|  2.73k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.73k|#  define MINBPC(enc) 2
  ------------------
  854|  2.73k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.73k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.73k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.73k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 4, False: 2.73k]
  ------------------
  855|      4|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      4|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  2.73k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  2.73k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.73k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.97k, False: 751]
  |  |  |  |  |  Branch (739:52): [True: 1.61k, False: 364]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.11k|      break;
  858|  1.61k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.61k|#  define MINBPC(enc) 2
  ------------------
  859|  1.61k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.61k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.61k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 7, False: 1.60k]
  ------------------
  860|      7|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      7|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.60k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.60k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.60k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 632, False: 976]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 630]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.60k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.60k|#  define MINBPC(enc) 2
  ------------------
  863|  1.60k|      break;
  864|  1.60k|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  11.2k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 53.1k]
  |  |  |  |  ------------------
  |  |  |  |   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: 53.1k]
  |  |  |  |  ------------------
  |  |  |  |   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|  5.59k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.54k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.59k, False: 47.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.59k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 51, False: 5.54k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.54k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     51|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.54k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.54k|#    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|  5.54k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.54k|    break;
  |  |  ------------------
  |  |   63|  5.54k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 53.0k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 53.1k]
  |  |  ------------------
  |  |   65|     49|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 53.1k]
  |  |  ------------------
  |  |   66|     49|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     49|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     49|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  7.43k|  default:
  ------------------
  |  Branch (868:3): [True: 7.43k, False: 45.6k]
  ------------------
  869|  7.43k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.43k|#  define MINBPC(enc) 2
  ------------------
  870|  7.43k|    break;
  871|  53.1k|  }
  872|   756k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   756k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   756k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   756k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 33.5k, False: 722k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 756k]
  |  |  ------------------
  |  |  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: 756k]
  |  |  ------------------
  |  |  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|  6.14k|      LEAD_CASE(4)
  ------------------
  |  |  875|  6.09k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 6.14k, False: 750k]
  |  |  ------------------
  |  |  876|  6.14k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  6.09k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 46, False: 6.09k]
  |  |  ------------------
  |  |  877|     46|      *nextTokPtr = ptr;                                                       \
  |  |  878|     46|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     46|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     46|    }                                                                          \
  |  |  880|  6.09k|    ptr += n;                                                                  \
  |  |  881|  6.09k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  4.20k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 4.20k, False: 751k]
  ------------------
  887|  4.20k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  4.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  4.20k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 4.20k, False: 2]
  |  |  ------------------
  ------------------
  888|  4.20k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  4.20k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.20k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.51k, False: 1.68k]
  |  |  |  |  |  Branch (739:52): [True: 942, False: 1.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  3.26k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.26k|#  define MINBPC(enc) 2
  ------------------
  890|  3.26k|          break;
  891|  3.26k|        }
  892|    942|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    942|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|    942|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 936, False: 6]
  |  |  ------------------
  ------------------
  893|    936|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|    936|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    936|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 602, False: 334]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 601]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    935|            ptr += MINBPC(enc);
  ------------------
  |  |  783|    935|#  define MINBPC(enc) 2
  ------------------
  895|    935|            break;
  896|    935|          }
  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|    936|        }
  900|    942|      }
  901|       |      /* fall through */
  902|  2.03k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 2.02k, False: 754k]
  ------------------
  903|  5.13k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.10k, False: 753k]
  ------------------
  904|  5.16k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 32, False: 756k]
  ------------------
  905|  5.16k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 756k]
  ------------------
  906|  5.17k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 756k]
  ------------------
  907|  14.2k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 9.11k, False: 747k]
  ------------------
  908|  15.3k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.05k, False: 755k]
  ------------------
  909|  15.3k|      *nextTokPtr = ptr;
  910|  15.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  15.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   730k|    default:
  ------------------
  |  Branch (911:5): [True: 730k, False: 25.6k]
  ------------------
  912|   730k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   730k|#  define MINBPC(enc) 2
  ------------------
  913|   730k|      break;
  914|   756k|    }
  915|   756k|  }
  916|    315|  *nextTokPtr = ptr;
  917|    315|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    315|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  15.7k|}
xmltok.c:little2_scanLt:
  726|  15.1k|               const char **nextTokPtr) {
  727|  15.1k|#  ifdef XML_NS
  728|  15.1k|  int hadColon;
  729|  15.1k|#  endif
  730|  15.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.1k|    {                                                                          \
  |  |  |  |  135|  15.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  15.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  15.1k|    }
  |  |  ------------------
  ------------------
  731|  15.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.3k, False: 3.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  11.6k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.75k, False: 11.3k]
  |  |  ------------------
  |  |  111|  9.37k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.75k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.75k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.75k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 3.73k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  9.37k|    /* fall through */                                                         \
  |  |  116|  9.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.14k, False: 10.9k]
  |  |  ------------------
  |  |  117|  9.37k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.49k, False: 13.6k]
  |  |  ------------------
  |  |  118|  9.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.37k|    break;                                                                     \
  |  |  120|  9.37k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 15.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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;
  |  |  ------------------
  ------------------
  733|  1.08k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.08k, False: 14.0k]
  ------------------
  734|  1.08k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.08k|#  define MINBPC(enc) 2
  ------------------
  735|  1.08k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.08k|    {                                                                          \
  |  |  |  |  135|  1.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.08k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.08k|    }
  |  |  ------------------
  ------------------
  736|  1.07k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.07k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.07k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 26, False: 1.05k]
  |  |  |  |  |  Branch (737:4): [True: 1.05k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    357|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 357, False: 722]
  ------------------
  738|    357|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    357|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    357|#  define MINBPC(enc) 2
  ------------------
  739|    696|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 696, False: 383]
  ------------------
  740|    696|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    696|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    696|#  define MINBPC(enc) 2
  ------------------
  741|  1.07k|    }
  742|     26|    *nextTokPtr = ptr;
  743|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  744|  3.12k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.12k, False: 12.0k]
  ------------------
  745|  3.12k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.12k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.12k|#  define MINBPC(enc) 2
  ------------------
  746|  1.50k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.50k, False: 13.6k]
  ------------------
  747|  1.50k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.50k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.50k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 15.1k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  15.1k|  }
  752|  9.37k|#  ifdef XML_NS
  753|  9.37k|  hadColon = 0;
  754|  9.37k|#  endif
  755|       |  /* we have a start-tag */
  756|  1.01M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  1.01M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.01M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.01M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.0k, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  5.02M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.00M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.00M, False: 12.0k]
  |  |  ------------------
  |  |   82|  1.00M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.00M|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.00M|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.00M|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 1.00M]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  1.00M|    /* fall through */                                                         \
  |  |   87|  1.00M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.20k, False: 1.01M]
  |  |  ------------------
  |  |   88|  1.00M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 314, False: 1.01M]
  |  |  ------------------
  |  |   89|  1.00M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 645, False: 1.01M]
  |  |  ------------------
  |  |   90|  1.00M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 228, False: 1.01M]
  |  |  ------------------
  |  |   91|  1.00M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 401, False: 1.01M]
  |  |  ------------------
  |  |   92|  1.00M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.00M|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.00M|    break;                                                                     \
  |  |   94|  1.00M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   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: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   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|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 1.01M]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 1.01M]
  ------------------
  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.74k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.74k, False: 1.01M]
  ------------------
  777|  2.60k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 857, False: 1.01M]
  ------------------
  778|  4.07k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.47k, False: 1.01M]
  ------------------
  779|  4.07k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.07k|#  define MINBPC(enc) 2
  ------------------
  780|  5.03k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.03k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.03k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.03k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.68k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.68k, False: 1.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.74k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.87k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.32k, False: 3.70k]
  |  |  ------------------
  |  |  111|  2.87k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.32k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.32k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.32k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.31k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  2.87k|    /* fall through */                                                         \
  |  |  116|  2.87k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.06k, False: 3.96k]
  |  |  ------------------
  |  |  117|  2.87k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 491, False: 4.54k]
  |  |  ------------------
  |  |  118|  2.87k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.87k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.87k|    break;                                                                     \
  |  |  120|  2.87k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.03k]
  |  |  |  |  ------------------
  |  |  |  |  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.03k]
  |  |  |  |  ------------------
  |  |  |  |  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|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 5.01k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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;
  |  |  ------------------
  ------------------
  783|    814|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 814, False: 4.22k]
  ------------------
  784|    814|          goto gt;
  785|    310|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 310, False: 4.72k]
  ------------------
  786|    310|          goto sol;
  787|    268|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 268, False: 4.76k]
  ------------------
  788|    618|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 350, False: 4.68k]
  ------------------
  789|    999|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 381, False: 4.65k]
  ------------------
  790|    999|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    999|#  define MINBPC(enc) 2
  ------------------
  791|    999|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.02k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.03k|        }
  796|  2.87k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.87k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.03k|      }
  798|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.07k|    }
  800|  4.91k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.91k, False: 1.01M]
  ------------------
  801|  5.73k|    gt:
  802|  5.73k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.73k|#  define MINBPC(enc) 2
  ------------------
  803|  5.73k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.73k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    283|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 283, False: 1.01M]
  ------------------
  805|    593|    sol:
  806|    593|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    593|#  define MINBPC(enc) 2
  ------------------
  807|    593|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    593|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    593|    {                                                                          \
  |  |  |  |  135|    593|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    593|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    593|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 582]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    593|    }
  |  |  ------------------
  ------------------
  808|    582|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    582|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    582|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 573, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 561, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     21|        *nextTokPtr = ptr;
  810|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  811|     21|      }
  812|    561|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    561|#  define MINBPC(enc) 2
  ------------------
  813|    561|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    561|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      7|    default:
  ------------------
  |  Branch (814:5): [True: 7, False: 1.01M]
  ------------------
  815|      7|      *nextTokPtr = ptr;
  816|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  817|  1.01M|    }
  818|  1.01M|  }
  819|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.37k|}
xmltok.c:little2_scanCdataSection:
  337|    696|                         const char **nextTokPtr) {
  338|    696|  static const char CDATA_LSQB[]
  339|    696|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    696|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    696|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    696|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    696|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    696|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    696|#define ASCII_LSQB 0x5B
  ------------------
  340|    696|  int i;
  341|    696|  UNUSED_P(enc);
  ------------------
  |  |  135|    696|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    696|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    696|    {                                                                          \
  |  |  135|    696|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    696|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    696|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 7, False: 689]
  |  |  ------------------
  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      7|      }                                                                        \
  |  |  138|    696|    }
  ------------------
  344|  4.77k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.08k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 4.09k, False: 677]
  ------------------
  345|  4.09k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  4.09k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.09k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.08k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 4.08k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     12|      *nextTokPtr = ptr;
  347|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  348|     12|    }
  349|  4.09k|  }
  350|    677|  *nextTokPtr = ptr;
  351|    677|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    677|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    689|}
xmltok.c:little2_scanEndTag:
  432|  1.50k|                   const char **nextTokPtr) {
  433|  1.50k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.50k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.50k|    {                                                                          \
  |  |  |  |  135|  1.50k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.50k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.50k|    }
  |  |  ------------------
  ------------------
  434|  1.50k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.50k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.50k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.18k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.18k, False: 313]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.32k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.47k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 294, False: 1.20k]
  |  |  ------------------
  |  |  111|  1.47k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    294|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    294|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    294|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 292]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.47k|    /* fall through */                                                         \
  |  |  116|  1.47k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 718, False: 782]
  |  |  ------------------
  |  |  117|  1.47k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 469, False: 1.03k]
  |  |  ------------------
  |  |  118|  1.47k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.47k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.47k|    break;                                                                     \
  |  |  120|  1.47k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  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.50k]
  |  |  |  |  ------------------
  |  |  |  |  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|     14|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 1.48k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    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|     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;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.49k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.50k|  }
  440|  2.93k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.93k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.93k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.93k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.39k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.39k, False: 538]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.60k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.51k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 507, False: 2.42k]
  |  |  ------------------
  |  |   82|  1.51k|    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: 13, False: 494]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.51k|    /* fall through */                                                         \
  |  |   87|  1.51k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 221, False: 2.70k]
  |  |  ------------------
  |  |   88|    913|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 198, False: 2.73k]
  |  |  ------------------
  |  |   89|  1.10k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 2.73k]
  |  |  ------------------
  |  |   90|  1.32k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 211, False: 2.71k]
  |  |  ------------------
  |  |   91|  1.51k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 196, False: 2.73k]
  |  |  ------------------
  |  |   92|  1.51k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.51k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.51k|    break;                                                                     \
  |  |   94|  1.51k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.93k]
  |  |  |  |  ------------------
  |  |  |  |   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.93k]
  |  |  |  |  ------------------
  |  |  |  |   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|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 2.90k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    343|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 343, False: 2.58k]
  ------------------
  444|    550|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 207, False: 2.72k]
  ------------------
  445|  1.01k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 469, False: 2.46k]
  ------------------
  446|  1.84k|      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|    878|#  define MINBPC(enc) 2
  ------------------
  447|  1.84k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.84k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.84k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.83k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.83k, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    233|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 233, False: 1.61k]
  ------------------
  449|    666|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 433, False: 1.41k]
  ------------------
  450|    878|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 212, False: 1.63k]
  ------------------
  451|    878|          break;
  452|    955|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 955, False: 892]
  ------------------
  453|    955|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    955|#  define MINBPC(enc) 2
  ------------------
  454|    955|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    955|#define XML_TOK_END_TAG 5
  ------------------
  455|     14|        default:
  ------------------
  |  Branch (455:9): [True: 14, False: 1.83k]
  ------------------
  456|     14|          *nextTokPtr = ptr;
  457|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  458|  1.84k|        }
  459|  1.84k|      }
  460|     50|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     50|#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.93k]
  ------------------
  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|    351|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 351, False: 2.57k]
  ------------------
  469|    351|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    351|#  define MINBPC(enc) 2
  ------------------
  470|    351|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    351|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 2.92k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  2.93k|    }
  475|  2.93k|  }
  476|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.47k|}
xmltok.c:little2_scanAtts:
  573|  2.87k|                 const char **nextTokPtr) {
  574|  2.87k|#  ifdef XML_NS
  575|  2.87k|  int hadColon = 0;
  576|  2.87k|#  endif
  577|   312k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   312k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   312k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   312k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   300k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 300k, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  64.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  13.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 11.1k, False: 300k]
  |  |  ------------------
  |  |   82|  13.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  11.1k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  11.1k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  11.1k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 11.1k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  13.9k|    /* fall through */                                                         \
  |  |   87|  13.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.92k, False: 310k]
  |  |  ------------------
  |  |   88|  13.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 320, False: 311k]
  |  |  ------------------
  |  |   89|  13.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 194, False: 311k]
  |  |  ------------------
  |  |   90|  13.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 311k]
  |  |  ------------------
  |  |   91|  13.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 311k]
  |  |  ------------------
  |  |   92|  13.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  13.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  13.9k|    break;                                                                     \
  |  |   94|  13.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 312k]
  |  |  |  |  ------------------
  |  |  |  |   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: 312k]
  |  |  |  |  ------------------
  |  |  |  |   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|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 312k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    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|      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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 312k]
  ------------------
  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|    496|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 496, False: 311k]
  ------------------
  598|    905|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 409, False: 311k]
  ------------------
  599|  1.20k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 302, False: 311k]
  ------------------
  600|  1.79k|      for (;;) {
  601|  1.79k|        int t;
  602|       |
  603|  1.79k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.79k|#  define MINBPC(enc) 2
  ------------------
  604|  1.79k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.79k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.79k|    {                                                                          \
  |  |  |  |  135|  1.79k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.79k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  1.79k|    }
  |  |  ------------------
  ------------------
  605|  1.74k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.74k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.74k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.73k, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.74k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.15k, False: 597]
  ------------------
  607|  1.15k|          break;
  608|    597|        switch (t) {
  609|    194|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 194, False: 403]
  ------------------
  610|    389|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 195, False: 402]
  ------------------
  611|    583|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 194, False: 403]
  ------------------
  612|    583|          break;
  613|     14|        default:
  ------------------
  |  Branch (613:9): [True: 14, False: 583]
  ------------------
  614|     14|          *nextTokPtr = ptr;
  615|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  616|    597|        }
  617|    597|      }
  618|       |      /* fall through */
  619|   298k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 296k, False: 15.1k]
  ------------------
  620|   298k|      int open;
  621|   298k|#  ifdef XML_NS
  622|   298k|      hadColon = 0;
  623|   298k|#  endif
  624|   299k|      for (;;) {
  625|   299k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   299k|#  define MINBPC(enc) 2
  ------------------
  626|   299k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   299k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   299k|    {                                                                          \
  |  |  |  |  135|   299k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   299k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   299k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 299k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   299k|    }
  |  |  ------------------
  ------------------
  627|   299k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   299k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   299k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   299k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 299k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   299k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 10.3k, False: 288k]
  |  Branch (628:32): [True: 287k, False: 1.15k]
  ------------------
  629|   298k|          break;
  630|  1.15k|        switch (open) {
  631|    482|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 482, False: 671]
  ------------------
  632|    920|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 438, False: 715]
  ------------------
  633|  1.12k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 206, False: 947]
  ------------------
  634|  1.12k|          break;
  635|     27|        default:
  ------------------
  |  Branch (635:9): [True: 27, False: 1.12k]
  ------------------
  636|     27|          *nextTokPtr = ptr;
  637|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  638|  1.15k|        }
  639|  1.15k|      }
  640|   298k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   298k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  3.79M|      for (;;) {
  643|  3.79M|        int t;
  644|  3.79M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.79M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.79M|    {                                                                          \
  |  |  |  |  135|  3.79M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.79M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.79M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 60, False: 3.79M]
  |  |  |  |  ------------------
  |  |  |  |  136|     60|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     60|      }                                                                        \
  |  |  |  |  138|  3.79M|    }
  |  |  ------------------
  ------------------
  645|  3.79M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  3.79M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.79M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.28M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.28M, False: 2.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  3.79M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 297k, False: 3.49M]
  ------------------
  647|   297k|          break;
  648|  3.49M|        switch (t) {
  649|   396k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.49M]
  |  |  |  |  ------------------
  |  |  |  |   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: 3.49M]
  |  |  |  |  ------------------
  |  |  |  |   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|   198k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   198k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 198k, False: 3.29M]
  |  |  |  |  ------------------
  |  |  |  |   50|   198k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 198k]
  |  |  |  |  ------------------
  |  |  |  |   51|   198k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   198k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   198k|#    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|   198k|    ptr += n;                                                                  \
  |  |  |  |   57|   198k|    break;
  |  |  ------------------
  |  |   63|   198k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 3.49M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.49M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 3.49M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  10.1k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 10.1k, False: 3.48M]
  ------------------
  651|  10.1k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  10.1k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  10.1k|#  define MINBPC(enc) 2
  ------------------
  652|  10.1k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 10.1k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 7, False: 4]
  ------------------
  654|      7|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  10.1k|          break;
  658|  10.1k|        }
  659|  10.1k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 3, False: 3.49M]
  ------------------
  660|      3|          *nextTokPtr = ptr;
  661|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  662|  3.28M|        default:
  ------------------
  |  Branch (662:9): [True: 3.28M, False: 208k]
  ------------------
  663|  3.28M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.28M|#  define MINBPC(enc) 2
  ------------------
  664|  3.28M|          break;
  665|  3.49M|        }
  666|  3.49M|      }
  667|   297k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   297k|#  define MINBPC(enc) 2
  ------------------
  668|   297k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   297k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   297k|    {                                                                          \
  |  |  |  |  135|   297k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   297k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   297k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 297k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   297k|    }
  |  |  ------------------
  ------------------
  669|   297k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   297k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   297k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   297k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 297k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   292k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 292k, False: 5.72k]
  ------------------
  671|   294k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.33k, False: 295k]
  ------------------
  672|   295k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.44k, False: 296k]
  ------------------
  673|   295k|        break;
  674|    420|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 420, False: 297k]
  ------------------
  675|    420|        goto sol;
  676|  1.49k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.49k, False: 296k]
  ------------------
  677|  1.49k|        goto gt;
  678|     24|      default:
  ------------------
  |  Branch (678:7): [True: 24, False: 297k]
  ------------------
  679|     24|        *nextTokPtr = ptr;
  680|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  681|   297k|      }
  682|       |      /* ptr points to closing quote */
  683|   302k|      for (;;) {
  684|   302k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   302k|#  define MINBPC(enc) 2
  ------------------
  685|   302k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   302k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   302k|    {                                                                          \
  |  |  |  |  135|   302k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   302k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   302k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 302k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   302k|    }
  |  |  ------------------
  ------------------
  686|   302k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   302k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   302k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   301k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 301k, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   231k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   295k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.31k, False: 301k]
  |  |  ------------------
  |  |  111|   295k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.31k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.31k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.31k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 4, False: 1.31k]
  |  |  ------------------
  |  |  112|      4|      *nextTokPtr = ptr;                                                       \
  |  |  113|      4|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      4|    }                                                                          \
  |  |  115|   295k|    /* fall through */                                                         \
  |  |  116|   295k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 229k, False: 73.4k]
  |  |  ------------------
  |  |  117|   295k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 65.0k, False: 237k]
  |  |  ------------------
  |  |  118|   295k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   295k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   295k|    break;                                                                     \
  |  |  120|   295k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 302k]
  |  |  |  |  ------------------
  |  |  |  |  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: 302k]
  |  |  |  |  ------------------
  |  |  |  |  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|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 302k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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;
  |  |  ------------------
  ------------------
  688|  5.93k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 5.93k, False: 296k]
  ------------------
  689|  6.31k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 385, False: 302k]
  ------------------
  690|  6.65k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 341, False: 302k]
  ------------------
  691|  6.65k|          continue;
  692|    197|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 197, False: 302k]
  ------------------
  693|  1.69k|        gt:
  694|  1.69k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.69k|#  define MINBPC(enc) 2
  ------------------
  695|  1.69k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.69k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    280|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 280, False: 302k]
  ------------------
  697|    700|        sol:
  698|    700|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    700|#  define MINBPC(enc) 2
  ------------------
  699|    700|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    700|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    700|    {                                                                          \
  |  |  |  |  135|    700|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    700|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    700|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 692]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|    700|    }
  |  |  ------------------
  ------------------
  700|    692|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    692|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    692|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 688, False: 4]
  |  |  |  |  |  Branch (739:52): [True: 683, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|      9|            *nextTokPtr = ptr;
  702|      9|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  703|      9|          }
  704|    683|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    683|#  define MINBPC(enc) 2
  ------------------
  705|    683|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    683|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      7|        default:
  ------------------
  |  Branch (706:9): [True: 7, False: 302k]
  ------------------
  707|      7|          *nextTokPtr = ptr;
  708|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  709|   302k|        }
  710|   295k|        break;
  711|   302k|      }
  712|   295k|      break;
  713|   295k|    }
  714|   295k|    default:
  ------------------
  |  Branch (714:5): [True: 7, False: 312k]
  ------------------
  715|      7|      *nextTokPtr = ptr;
  716|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  717|   312k|    }
  718|   312k|  }
  719|     96|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     96|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.87k|}
xmltok.c:little2_scanRef:
  545|  28.2k|                const char **nextTokPtr) {
  546|  28.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  28.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  28.2k|    {                                                                          \
  |  |  |  |  135|  28.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  28.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  28.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 28, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     28|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     28|      }                                                                        \
  |  |  |  |  138|  28.2k|    }
  |  |  ------------------
  ------------------
  547|  28.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  28.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  28.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.1k, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  7.18k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  22.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.04k, False: 26.2k]
  |  |  ------------------
  |  |  111|  22.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.04k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.04k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.04k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 2.04k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|  22.0k|    /* fall through */                                                         \
  |  |  116|  22.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.07k, False: 25.1k]
  |  |  ------------------
  |  |  117|  22.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 16.9k, False: 11.3k]
  |  |  ------------------
  |  |  118|  22.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  22.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  22.0k|    break;                                                                     \
  |  |  120|  22.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  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: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  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|     12|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  6.15k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 6.15k, False: 22.1k]
  ------------------
  550|  6.15k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.15k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.15k|#  define MINBPC(enc) 2
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 28.2k]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|  28.2k|  }
  555|  38.6k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  38.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  38.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  38.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 34.7k, False: 3.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  66.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.89k, False: 34.7k]
  |  |  ------------------
  |  |   82|  16.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  3.89k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.89k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.89k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 3.87k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  16.6k|    /* fall through */                                                         \
  |  |   87|  16.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 10.7k, False: 27.9k]
  |  |  ------------------
  |  |   88|  15.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.11k, False: 37.5k]
  |  |  ------------------
  |  |   89|  15.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 251, False: 38.3k]
  |  |  ------------------
  |  |   90|  16.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 429, False: 38.2k]
  |  |  ------------------
  |  |   91|  16.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 206, False: 38.4k]
  |  |  ------------------
  |  |   92|  16.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  16.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.6k|    break;                                                                     \
  |  |   94|  16.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 38.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: 38.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|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 38.6k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  558|  21.9k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 21.9k, False: 16.6k]
  ------------------
  559|  21.9k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  21.9k|#  define MINBPC(enc) 2
  ------------------
  560|  21.9k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  21.9k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      8|    default:
  ------------------
  |  Branch (561:5): [True: 8, False: 38.6k]
  ------------------
  562|      8|      *nextTokPtr = ptr;
  563|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  564|  38.6k|    }
  565|  38.6k|  }
  566|     48|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     48|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  22.0k|}
xmltok.c:little2_scanCharRef:
  514|  6.15k|                    const char **nextTokPtr) {
  515|  6.15k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.15k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.15k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.15k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.15k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  6.15k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  6.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.15k, False: 3]
  |  |  |  |  |  Branch (739:52): [True: 4.32k, False: 1.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.32k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.32k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.32k|#  define MINBPC(enc) 2
  ------------------
  518|  1.83k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.83k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.83k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.82k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.82k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.82k, False: 5]
  ------------------
  520|  1.82k|      break;
  521|      5|    default:
  ------------------
  |  Branch (521:5): [True: 5, False: 1.82k]
  ------------------
  522|      5|      *nextTokPtr = ptr;
  523|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  524|  1.83k|    }
  525|  4.41k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.82k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.59k|#  define MINBPC(enc) 2
  ------------------
  526|  4.41k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.41k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.41k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.39k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.39k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  2.59k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 2.59k, False: 1.81k]
  ------------------
  528|  2.59k|        break;
  529|  1.79k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.79k, False: 2.61k]
  ------------------
  530|  1.79k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.79k|#  define MINBPC(enc) 2
  ------------------
  531|  1.79k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.79k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     21|      default:
  ------------------
  |  Branch (532:7): [True: 21, False: 4.39k]
  ------------------
  533|     21|        *nextTokPtr = ptr;
  534|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  535|  4.41k|      }
  536|  4.41k|    }
  537|  1.82k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  6.15k|}
xmltok.c:little2_scanHexCharRef:
  483|  4.32k|                       const char **nextTokPtr) {
  484|  4.32k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.32k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.32k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.32k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.32k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.32k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.32k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.32k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.32k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  2.47k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.47k, False: 1.85k]
  ------------------
  487|  4.31k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.84k, False: 2.47k]
  ------------------
  488|  4.31k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 4.31k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  4.32k|    }
  493|  15.0k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.31k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
  494|  15.0k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.0k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  6.19k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 6.19k, False: 8.88k]
  ------------------
  496|  10.7k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 4.58k, False: 10.4k]
  ------------------
  497|  10.7k|        break;
  498|  4.27k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.27k, False: 10.8k]
  ------------------
  499|  4.27k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.27k|#  define MINBPC(enc) 2
  ------------------
  500|  4.27k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.27k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     26|      default:
  ------------------
  |  Branch (501:7): [True: 26, False: 15.0k]
  ------------------
  502|     26|        *nextTokPtr = ptr;
  503|     26|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  504|  15.0k|      }
  505|  15.0k|    }
  506|  4.31k|  }
  507|     18|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.32k|}
xmltok.c:little2_cdataSectionTok:
  356|  31.2k|                        const char **nextTokPtr) {
  357|  31.2k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 144, False: 31.0k]
  ------------------
  358|    144|    return XML_TOK_NONE;
  ------------------
  |  |   51|    144|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  31.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  31.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  31.0k|    size_t n = end - ptr;
  361|  31.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  31.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 5.75k, False: 25.3k]
  ------------------
  362|  5.75k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  5.75k|#  define MINBPC(enc) 2
  ------------------
  363|  5.75k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 13, False: 5.74k]
  ------------------
  364|     13|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  5.74k|      end = ptr + n;
  366|  5.74k|    }
  367|  31.0k|  }
  368|  31.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  31.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  31.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.9k, False: 9.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  5.79k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 5.79k, False: 25.2k]
  ------------------
  370|  5.79k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.79k|#  define MINBPC(enc) 2
  ------------------
  371|  5.79k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.79k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.79k|    {                                                                          \
  |  |  |  |  135|  5.79k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.79k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 5.79k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  5.79k|    }
  |  |  ------------------
  ------------------
  372|  5.79k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  5.79k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.79k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.04k, False: 1.74k]
  |  |  |  |  |  Branch (739:52): [True: 2.52k, False: 1.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  3.27k|      break;
  374|  2.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.52k|#  define MINBPC(enc) 2
  ------------------
  375|  2.52k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.52k|    {                                                                          \
  |  |  |  |  135|  2.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 2.51k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  2.52k|    }
  |  |  ------------------
  ------------------
  376|  2.51k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.86k, False: 652]
  |  |  |  |  |  Branch (739:52): [True: 383, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  2.13k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  2.13k|#  define MINBPC(enc) 2
  ------------------
  378|  2.13k|      break;
  379|  2.13k|    }
  380|    383|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    383|#  define MINBPC(enc) 2
  ------------------
  381|    383|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    383|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  12.4k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 12.4k, False: 18.6k]
  ------------------
  383|  12.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.4k|#  define MINBPC(enc) 2
  ------------------
  384|  12.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.4k|    {                                                                          \
  |  |  |  |  135|  12.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 18, False: 12.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     18|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     18|      }                                                                        \
  |  |  |  |  138|  12.4k|    }
  |  |  ------------------
  ------------------
  385|  12.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  12.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.17k, False: 8.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 379, False: 12.0k]
  ------------------
  386|    379|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    379|#  define MINBPC(enc) 2
  ------------------
  387|  12.4k|    *nextTokPtr = ptr;
  388|  12.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.93k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.93k, False: 29.1k]
  ------------------
  390|  1.93k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.93k|#  define MINBPC(enc) 2
  ------------------
  391|  1.93k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.93k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  13.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: 31.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: 31.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|  6.78k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.72k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.78k, False: 24.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.78k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 63, False: 6.72k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.72k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     63|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.72k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.72k|#    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|  6.72k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.72k|    break;
  |  |  ------------------
  |  |   63|  6.72k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 31.0k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 31.0k]
  |  |  ------------------
  |  |   65|     45|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 31.0k]
  |  |  ------------------
  |  |   66|     45|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     45|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     45|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.06k|  default:
  ------------------
  |  Branch (393:3): [True: 4.06k, False: 27.0k]
  ------------------
  394|  4.06k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.06k|#  define MINBPC(enc) 2
  ------------------
  395|  4.06k|    break;
  396|  31.0k|  }
  397|  1.44M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.44M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.44M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.44M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 41.7k, False: 1.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 1.44M]
  |  |  ------------------
  |  |  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: 1.44M]
  |  |  ------------------
  |  |  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|  10.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  10.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 10.6k, False: 1.43M]
  |  |  ------------------
  |  |  401|  10.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  10.6k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 56, False: 10.6k]
  |  |  ------------------
  |  |  402|     56|      *nextTokPtr = ptr;                                                       \
  |  |  403|     56|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     56|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     56|    }                                                                          \
  |  |  405|  10.6k|    ptr += n;                                                                  \
  |  |  406|  10.6k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     37|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 37, False: 1.44M]
  ------------------
  412|     37|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.44M]
  ------------------
  413|     42|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 1.44M]
  ------------------
  414|  10.7k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 10.6k, False: 1.43M]
  ------------------
  415|  12.4k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.68k, False: 1.43M]
  ------------------
  416|  16.0k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.59k, False: 1.43M]
  ------------------
  417|  16.0k|      *nextTokPtr = ptr;
  418|  16.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.41M|    default:
  ------------------
  |  Branch (419:5): [True: 1.41M, False: 26.6k]
  ------------------
  420|  1.41M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.41M|#  define MINBPC(enc) 2
  ------------------
  421|  1.41M|      break;
  422|  1.44M|    }
  423|  1.44M|  }
  424|    128|  *nextTokPtr = ptr;
  425|    128|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    128|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  16.1k|}
xmltok.c:little2_attributeValueTok:
 1262|  42.8k|                          const char **nextTokPtr) {
 1263|  42.8k|  const char *start;
 1264|  42.8k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.16k, False: 40.7k]
  ------------------
 1265|  2.16k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.16k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  40.7k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  40.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  40.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  40.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 40.7k]
  ------------------
 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|  40.7k|  start = ptr;
 1275|  1.67M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.67M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.67M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.67M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  69.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 69.6k, False: 1.60M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 1.67M]
  |  |  ------------------
  |  | 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: 1.67M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  13.5k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  13.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 13.5k, False: 1.65M]
  |  |  ------------------
  |  | 1279|  13.5k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  13.5k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  12.0k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 12.0k, False: 1.65M]
  ------------------
 1286|  12.0k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 6.33k, False: 5.71k]
  ------------------
 1287|  6.33k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.33k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.33k|#  define MINBPC(enc) 2
  ------------------
 1288|  5.71k|      *nextTokPtr = ptr;
 1289|  5.71k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.71k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      2|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 2, False: 1.67M]
  ------------------
 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|  7.55k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 7.55k, False: 1.66M]
  ------------------
 1295|  7.55k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 4.98k, False: 2.56k]
  ------------------
 1296|  4.98k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.98k|#  define MINBPC(enc) 2
  ------------------
 1297|  4.98k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.98k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  4.98k|      }
 1299|  2.56k|      *nextTokPtr = ptr;
 1300|  2.56k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.56k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  12.9k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 12.9k, False: 1.65M]
  ------------------
 1302|  12.9k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 8.19k, False: 4.80k]
  ------------------
 1303|  8.19k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  8.19k|#  define MINBPC(enc) 2
  ------------------
 1304|  8.19k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.19k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  8.19k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 339, False: 7.85k]
  ------------------
 1305|    339|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    339|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  7.85k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  7.85k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.85k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.46k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.46k, False: 2.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 1.78k, False: 6.06k]
  ------------------
 1307|  1.78k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1308|  7.85k|        *nextTokPtr = ptr;
 1309|  7.85k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.85k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  8.19k|      }
 1311|  4.80k|      *nextTokPtr = ptr;
 1312|  4.80k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.80k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  7.48k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 7.48k, False: 1.66M]
  ------------------
 1314|  7.48k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.60k, False: 2.87k]
  ------------------
 1315|  4.60k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.60k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.60k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.60k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.60k|      }
 1318|  2.87k|      *nextTokPtr = ptr;
 1319|  2.87k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.87k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.61M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.61M, False: 53.6k]
  ------------------
 1321|  1.61M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.61M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.61M|      break;
 1323|  1.67M|    }
 1324|  1.67M|  }
 1325|    646|  *nextTokPtr = ptr;
 1326|    646|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    646|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  40.7k|}
xmltok.c:little2_entityValueTok:
 1331|   112k|                       const char **nextTokPtr) {
 1332|   112k|  const char *start;
 1333|   112k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.90k, False: 110k]
  ------------------
 1334|  1.90k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.90k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   110k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   110k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   110k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   110k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 110k]
  ------------------
 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|   110k|  start = ptr;
 1344|  25.4M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  25.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  25.4M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  25.4M|  ((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: 25.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 25.4M]
  |  |  ------------------
  |  | 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: 25.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  71.5k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  71.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 71.5k, False: 25.3M]
  |  |  ------------------
  |  | 1348|  71.5k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  71.5k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  5.18k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 5.18k, False: 25.4M]
  ------------------
 1355|  5.18k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 2.68k, False: 2.49k]
  ------------------
 1356|  2.68k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.68k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.68k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.49k|      *nextTokPtr = ptr;
 1358|  2.49k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.49k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 25.4M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 2]
  ------------------
 1361|      6|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      6|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      6|#  define MINBPC(enc) 2
  ------------------
 1362|      6|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      6|#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: 4]
  ------------------
 1363|      6|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  23.2k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 23.2k, False: 25.4M]
  ------------------
 1367|  23.2k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 12.3k, False: 10.9k]
  ------------------
 1368|  12.3k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  12.3k|#  define MINBPC(enc) 2
  ------------------
 1369|  12.3k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  12.3k|      }
 1371|  10.9k|      *nextTokPtr = ptr;
 1372|  10.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  10.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  80.6k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 80.6k, False: 25.3M]
  ------------------
 1374|  80.6k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 43.4k, False: 37.1k]
  ------------------
 1375|  43.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  43.4k|#  define MINBPC(enc) 2
  ------------------
 1376|  43.4k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  43.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  43.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  43.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 210, False: 43.2k]
  ------------------
 1377|    210|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    210|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  43.2k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  43.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  43.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.9k, False: 24.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.37k, False: 41.9k]
  ------------------
 1379|  1.37k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.37k|#  define MINBPC(enc) 2
  ------------------
 1380|  43.2k|        *nextTokPtr = ptr;
 1381|  43.2k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  43.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  43.4k|      }
 1383|  37.1k|      *nextTokPtr = ptr;
 1384|  37.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  37.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  25.2M|    default:
  ------------------
  |  Branch (1385:5): [True: 25.2M, False: 180k]
  ------------------
 1386|  25.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  25.2M|#  define MINBPC(enc) 2
  ------------------
 1387|  25.2M|      break;
 1388|  25.4M|    }
 1389|  25.4M|  }
 1390|  1.15k|  *nextTokPtr = ptr;
 1391|  1.15k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.15k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   110k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  24.0k|                         const char *end1, const char *ptr2) {
 1716|  24.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   100k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  75.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 87.2k, False: 12.7k]
  ------------------
 1718|  87.2k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  87.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 36, False: 87.2k]
  ------------------
 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|     36|      return 0; /* LCOV_EXCL_LINE */
 1725|     36|    }
 1726|  87.2k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  87.2k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  87.2k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 87.2k, False: 55]
  |  |  |  |  |  Branch (739:52): [True: 75.9k, False: 11.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  11.3k|      return 0;
 1728|  87.2k|  }
 1729|  12.7k|  return ptr1 == end1;
 1730|  24.0k|}
xmltok.c:little2_nameLength:
 1733|  12.9k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.9k|  const char *start = ptr;
 1735|  1.03M|  for (;;) {
 1736|  1.03M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.03M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.03M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 22.7k, False: 1.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 1.03M]
  |  |  ------------------
  |  | 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: 1.03M]
  |  |  ------------------
  |  | 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: 1.03M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  1.00M|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 1.00M, False: 22.7k]
  ------------------
 1746|  1.01M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 6.55k, False: 1.02M]
  ------------------
 1747|  1.01M|#  ifdef XML_NS
 1748|  1.01M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 1.03M]
  ------------------
 1749|  1.01M|#  endif
 1750|  1.01M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 2.52k, False: 1.02M]
  ------------------
 1751|  1.01M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 451, False: 1.03M]
  ------------------
 1752|  1.01M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 32, False: 1.03M]
  ------------------
 1753|  1.01M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 206, False: 1.03M]
  ------------------
 1754|  1.01M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.01M|#  define MINBPC(enc) 2
  ------------------
 1755|  1.01M|      break;
 1756|  12.9k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.9k, False: 1.01M]
  ------------------
 1757|  12.9k|      return (int)(ptr - start);
 1758|  1.03M|    }
 1759|  1.03M|  }
 1760|  12.9k|}
xmltok.c:little2_getAtts:
 1510|  8.78k|                ATTRIBUTE *atts) {
 1511|  8.78k|  enum { other, inName, inValue } state = inName;
 1512|  8.78k|  int nAtts = 0;
 1513|  8.78k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  8.75M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.78k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.74M|#  define MINBPC(enc) 2
  ------------------
 1517|  8.75M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.75M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.75M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.87M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.87M, False: 3.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: 8.75M]
  |  |  ------------------
  |  | 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: 8.75M]
  |  |  ------------------
  |  | 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|  63.8k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  63.8k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 63.8k, False: 8.69M]
  |  |  ------------------
  |  | 1528|  63.8k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  63.8k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 63.8k]
  |  |  |  |  ------------------
  |  |  |  | 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|  63.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  63.8k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  3.81M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 3.81M, False: 4.94M]
  ------------------
 1535|  4.36M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 554k, False: 8.20M]
  ------------------
 1536|  4.53M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 163k, False: 8.59M]
  ------------------
 1537|  4.53M|      START_NAME
  ------------------
  |  | 1519|  4.53M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 589k, False: 3.94M]
  |  |  ------------------
  |  | 1520|   589k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 297k, False: 291k]
  |  |  ------------------
  |  | 1521|   297k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   297k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   297k|      }                                                                        \
  |  | 1524|   589k|      state = inName;                                                          \
  |  | 1525|   589k|    }
  ------------------
 1538|  4.53M|      break;
 1539|      0|#  undef START_NAME
 1540|  49.7k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 49.7k, False: 8.70M]
  ------------------
 1541|  49.7k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 16.6k, False: 33.0k]
  ------------------
 1542|  16.6k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 9.55k, False: 7.11k]
  ------------------
 1543|  9.55k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  9.55k|#  define MINBPC(enc) 2
  ------------------
 1544|  16.6k|        state = inValue;
 1545|  16.6k|        open = BT_QUOT;
 1546|  33.0k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 16.6k, False: 16.3k]
  ------------------
 1547|  16.6k|        state = other;
 1548|  16.6k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 9.55k, False: 7.11k]
  ------------------
 1549|  9.55k|          atts[nAtts].valueEnd = ptr;
 1550|  16.6k|        nAtts++;
 1551|  16.6k|      }
 1552|  49.7k|      break;
 1553|  1.14M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.14M, False: 7.61M]
  ------------------
 1554|  1.14M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 572k, False: 573k]
  ------------------
 1555|   572k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 288k, False: 284k]
  ------------------
 1556|   288k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   288k|#  define MINBPC(enc) 2
  ------------------
 1557|   572k|        state = inValue;
 1558|   572k|        open = BT_APOS;
 1559|   573k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 572k, False: 726]
  ------------------
 1560|   572k|        state = other;
 1561|   572k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 288k, False: 284k]
  ------------------
 1562|   288k|          atts[nAtts].valueEnd = ptr;
 1563|   572k|        nAtts++;
 1564|   572k|      }
 1565|  1.14M|      break;
 1566|  13.6k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 13.6k, False: 8.74M]
  ------------------
 1567|  13.6k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 10.0k, False: 3.53k]
  ------------------
 1568|  10.0k|        atts[nAtts].normalized = 0;
 1569|  13.6k|      break;
 1570|  1.57M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.57M, False: 7.18M]
  ------------------
 1571|  1.57M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.81k, False: 1.57M]
  ------------------
 1572|  1.81k|        state = other;
 1573|  1.57M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 978k, False: 593k]
  |  Branch (1573:36): [True: 493k, False: 485k]
  |  Branch (1573:55): [True: 252k, False: 241k]
  ------------------
 1574|  1.57M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 58.3k, False: 193k]
  ------------------
 1575|   252k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   193k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   193k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 193k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   445k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 8.97k, False: 184k]
  ------------------
 1576|   252k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   184k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   184k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 173k, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   436k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 110k, False: 74.1k]
  ------------------
 1577|   252k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  74.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  74.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  62.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 62.4k, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 54.6k, False: 19.5k]
  ------------------
 1578|   232k|        atts[nAtts].normalized = 0;
 1579|  1.57M|      break;
 1580|   138k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 138k, False: 8.61M]
  ------------------
 1581|   148k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 10.5k, False: 8.74M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   148k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.64k, False: 146k]
  ------------------
 1585|  2.64k|        state = other;
 1586|   146k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 141k, False: 5.32k]
  |  Branch (1586:36): [True: 77.9k, False: 63.0k]
  ------------------
 1587|  77.9k|        atts[nAtts].normalized = 0;
 1588|   148k|      break;
 1589|   228k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 228k, False: 8.52M]
  ------------------
 1590|   230k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 1.64k, False: 8.75M]
  ------------------
 1591|   230k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.78k, False: 221k]
  ------------------
 1592|  8.78k|        return nAtts;
 1593|   221k|      break;
 1594|   997k|    default:
  ------------------
  |  Branch (1594:5): [True: 997k, False: 7.75M]
  ------------------
 1595|   997k|      break;
 1596|  8.75M|    }
 1597|  8.75M|  }
 1598|       |  /* not reached */
 1599|  8.78k|}
xmltok.c:little2_charRefNumber:
 1602|  5.20k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.20k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.20k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.20k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.20k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  5.20k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.20k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  5.20k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.20k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.20k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.92k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  18.0k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  3.92k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  18.0k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  18.0k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 18.0k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.90k, False: 14.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  14.1k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  14.0k|#  define MINBPC(enc) 2
  ------------------
 1610|  14.1k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  14.1k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  14.1k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 14.1k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  14.1k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 14.1k]
  ------------------
 1612|    544|      case ASCII_0:
  ------------------
  |  |   90|    544|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 544, False: 13.5k]
  ------------------
 1613|  1.49k|      case ASCII_1:
  ------------------
  |  |   91|  1.49k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 947, False: 13.1k]
  ------------------
 1614|  3.67k|      case ASCII_2:
  ------------------
  |  |   92|  3.67k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 2.18k, False: 11.9k]
  ------------------
 1615|  4.04k|      case ASCII_3:
  ------------------
  |  |   93|  4.04k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 369, False: 13.7k]
  ------------------
 1616|  4.39k|      case ASCII_4:
  ------------------
  |  |   94|  4.39k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 351, False: 13.7k]
  ------------------
 1617|  6.02k|      case ASCII_5:
  ------------------
  |  |   95|  6.02k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.63k, False: 12.4k]
  ------------------
 1618|  6.62k|      case ASCII_6:
  ------------------
  |  |   96|  6.62k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 594, False: 13.5k]
  ------------------
 1619|  6.97k|      case ASCII_7:
  ------------------
  |  |   97|  6.97k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 357, False: 13.7k]
  ------------------
 1620|  7.69k|      case ASCII_8:
  ------------------
  |  |   98|  7.69k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 719, False: 13.3k]
  ------------------
 1621|  8.23k|      case ASCII_9:
  ------------------
  |  |   99|  8.23k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 537, False: 13.5k]
  ------------------
 1622|  8.23k|        result <<= 4;
 1623|  8.23k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.23k|#define ASCII_0 0x30
  ------------------
 1624|  8.23k|        break;
 1625|    868|      case ASCII_A:
  ------------------
  |  |   36|    868|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 868, False: 13.2k]
  ------------------
 1626|  2.33k|      case ASCII_B:
  ------------------
  |  |   37|  2.33k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 1.46k, False: 12.6k]
  ------------------
 1627|  2.53k|      case ASCII_C:
  ------------------
  |  |   38|  2.53k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 201, False: 13.9k]
  ------------------
 1628|  2.97k|      case ASCII_D:
  ------------------
  |  |   39|  2.97k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 443, False: 13.6k]
  ------------------
 1629|  3.18k|      case ASCII_E:
  ------------------
  |  |   40|  3.18k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 201, False: 13.9k]
  ------------------
 1630|  4.17k|      case ASCII_F:
  ------------------
  |  |   41|  4.17k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 990, False: 13.1k]
  ------------------
 1631|  4.17k|        result <<= 4;
 1632|  4.17k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.17k|#define ASCII_A 0x41
  ------------------
 1633|  4.17k|        break;
 1634|    356|      case ASCII_a:
  ------------------
  |  |   63|    356|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 356, False: 13.7k]
  ------------------
 1635|    637|      case ASCII_b:
  ------------------
  |  |   64|    637|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 281, False: 13.8k]
  ------------------
 1636|    843|      case ASCII_c:
  ------------------
  |  |   65|    843|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 206, False: 13.9k]
  ------------------
 1637|  1.19k|      case ASCII_d:
  ------------------
  |  |   66|  1.19k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 355, False: 13.7k]
  ------------------
 1638|  1.44k|      case ASCII_e:
  ------------------
  |  |   67|  1.44k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 247, False: 13.8k]
  ------------------
 1639|  1.70k|      case ASCII_f:
  ------------------
  |  |   68|  1.70k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 263, False: 13.8k]
  ------------------
 1640|  1.70k|        result <<= 4;
 1641|  1.70k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  1.70k|#define ASCII_a 0x61
  ------------------
 1642|  1.70k|        break;
 1643|  14.1k|      }
 1644|  14.1k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 19, False: 14.0k]
  ------------------
 1645|     19|        return -1;
 1646|  14.1k|    }
 1647|  3.92k|  } else {
 1648|  4.71k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  4.71k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.71k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.71k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1.27k, False: 3.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.43k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.43k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  3.43k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.43k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.43k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.43k|      result *= 10;
 1651|  3.43k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.43k|#define ASCII_0 0x30
  ------------------
 1652|  3.43k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 3.43k]
  ------------------
 1653|      5|        return -1;
 1654|  3.43k|    }
 1655|  1.28k|  }
 1656|  5.18k|  return checkCharRefNumber(result);
 1657|  5.20k|}
xmltok.c:little2_predefinedEntityName:
 1661|  13.4k|                             const char *end) {
 1662|  13.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  13.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  13.4k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  13.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 7.28k, False: 6.12k]
  ------------------
 1664|  1.37k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.37k, False: 12.0k]
  ------------------
 1665|  1.37k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.37k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.37k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.12k, False: 247]
  |  |  |  |  |  Branch (739:52): [True: 823, False: 301]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    823|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    823|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    823|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 330, False: 493]
  |  |  |  |  |  Branch (738:35): [True: 512, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    248|      case ASCII_l:
  ------------------
  |  |   74|    248|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 248, False: 575]
  ------------------
 1668|    248|        return ASCII_LT;
  ------------------
  |  |  111|    248|#define ASCII_LT 0x3C
  ------------------
 1669|    245|      case ASCII_g:
  ------------------
  |  |   69|    245|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 245, False: 578]
  ------------------
 1670|    245|        return ASCII_GT;
  ------------------
  |  |  113|    245|#define ASCII_GT 0x3E
  ------------------
 1671|    823|      }
 1672|    823|    }
 1673|    878|    break;
 1674|  1.70k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.70k, False: 11.7k]
  ------------------
 1675|  1.70k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.70k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.70k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.47k, False: 227]
  |  |  |  |  |  Branch (739:52): [True: 1.11k, False: 360]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.11k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.11k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.11k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.11k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 914, False: 202]
  |  |  |  |  |  Branch (739:52): [True: 604, False: 310]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    604|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    604|#  define MINBPC(enc) 2
  ------------------
 1679|    604|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    604|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    604|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 407, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 205, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    205|          return ASCII_AMP;
  ------------------
  |  |  105|    205|#define ASCII_AMP 0x26
  ------------------
 1681|    604|      }
 1682|  1.11k|    }
 1683|  1.49k|    break;
 1684|  3.05k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.05k, False: 10.3k]
  ------------------
 1685|  3.05k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.05k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.05k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 212, False: 2.83k]
  |  |  |  |  |  Branch (738:35): [True: 2.84k, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.42k|    case ASCII_q:
  ------------------
  |  |   79|  1.42k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.42k, False: 1.63k]
  ------------------
 1687|  1.42k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.42k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.42k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.42k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.42k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.22k, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 1.02k, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.02k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.02k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.02k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.02k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 827, False: 198]
  |  |  |  |  |  Branch (739:52): [True: 630, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    630|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    630|#  define MINBPC(enc) 2
  ------------------
 1692|    630|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    630|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    630|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 431, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 229, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    229|            return ASCII_QUOT;
  ------------------
  |  |  104|    229|#define ASCII_QUOT 0x22
  ------------------
 1694|    630|        }
 1695|  1.02k|      }
 1696|  1.19k|      break;
 1697|  1.41k|    case ASCII_a:
  ------------------
  |  |   63|  1.41k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.41k, False: 1.63k]
  ------------------
 1698|  1.41k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.41k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.41k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.41k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.41k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.21k, False: 206]
  |  |  |  |  |  Branch (739:52): [True: 1.00k, False: 208]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.00k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.00k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.00k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.00k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 806, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 605, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    605|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    605|#  define MINBPC(enc) 2
  ------------------
 1703|    605|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    605|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    605|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 409, False: 196]
  |  |  |  |  |  Branch (739:52): [True: 198, False: 211]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    198|            return ASCII_APOS;
  ------------------
  |  |  106|    198|#define ASCII_APOS 0x27
  ------------------
 1705|    605|        }
 1706|  1.00k|      }
 1707|  1.22k|      break;
 1708|  3.05k|    }
 1709|  13.4k|  }
 1710|  12.2k|  return 0;
 1711|  13.4k|}
xmltok.c:little2_updatePosition:
 1779|  3.51k|                       POSITION *pos) {
 1780|  4.28M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.28M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.28M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.28M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   265k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 265k, False: 4.01M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.28M]
  |  |  ------------------
  |  | 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.28M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  36.3k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  36.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 36.3k, False: 4.24M]
  |  |  ------------------
  |  | 1784|  36.3k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  36.3k|    pos->columnNumber++;                                                       \
  |  | 1786|  36.3k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  9.79k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 9.79k, False: 4.27M]
  ------------------
 1792|  9.79k|      pos->columnNumber = 0;
 1793|  9.79k|      pos->lineNumber++;
 1794|  9.79k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.79k|#  define MINBPC(enc) 2
  ------------------
 1795|  9.79k|      break;
 1796|  28.3k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 28.3k, False: 4.25M]
  ------------------
 1797|  28.3k|      pos->lineNumber++;
 1798|  28.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  28.3k|#  define MINBPC(enc) 2
  ------------------
 1799|  28.3k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  28.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  56.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  28.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 28.2k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  28.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  28.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.0k, False: 14.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.87k, False: 26.4k]
  ------------------
 1800|  1.87k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.87k|#  define MINBPC(enc) 2
  ------------------
 1801|  28.3k|      pos->columnNumber = 0;
 1802|  28.3k|      break;
 1803|  4.20M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.20M, False: 74.4k]
  ------------------
 1804|  4.20M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.20M|#  define MINBPC(enc) 2
  ------------------
 1805|  4.20M|      pos->columnNumber++;
 1806|  4.20M|      break;
 1807|  4.28M|    }
 1808|  4.28M|  }
 1809|  3.51k|}
xmltok.c:little2_isPublicId:
 1450|    905|                   const char **badPtr) {
 1451|    905|  ptr += MINBPC(enc);
  ------------------
  |  |  783|    905|#  define MINBPC(enc) 2
  ------------------
 1452|    905|  end -= MINBPC(enc);
  ------------------
  |  |  783|    905|#  define MINBPC(enc) 2
  ------------------
 1453|  7.32k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.28k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.32k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.32k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.32k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.29k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    318|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 318, False: 7.00k]
  ------------------
 1456|    734|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 416, False: 6.90k]
  ------------------
 1457|    981|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 247, False: 7.07k]
  ------------------
 1458|  1.31k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 329, False: 6.99k]
  ------------------
 1459|  1.58k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 274, False: 7.05k]
  ------------------
 1460|  1.84k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 264, False: 7.06k]
  ------------------
 1461|  2.17k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 325, False: 7.00k]
  ------------------
 1462|  2.44k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 271, False: 7.05k]
  ------------------
 1463|  2.65k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 209, False: 7.11k]
  ------------------
 1464|  3.26k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 613, False: 6.71k]
  ------------------
 1465|  3.48k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 217, False: 7.10k]
  ------------------
 1466|  3.78k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 305, False: 7.02k]
  ------------------
 1467|  4.00k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 214, False: 7.11k]
  ------------------
 1468|  4.22k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 224, False: 7.10k]
  ------------------
 1469|  4.70k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 476, False: 6.84k]
  ------------------
 1470|  4.95k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 250, False: 7.07k]
  ------------------
 1471|  5.28k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 334, False: 6.99k]
  ------------------
 1472|  5.55k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 266, False: 7.05k]
  ------------------
 1473|  5.55k|#  ifdef XML_NS
 1474|  5.55k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.32k]
  ------------------
 1475|  5.55k|#  endif
 1476|  5.55k|      break;
 1477|    312|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 312, False: 7.01k]
  ------------------
 1478|    312|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    312|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    312|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 312, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    311|      break;
 1483|    311|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 212, False: 7.11k]
  ------------------
 1484|    620|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 408, False: 6.91k]
  ------------------
 1485|    620|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|    620|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    620|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 620, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 612, False: 8]
  ------------------
 1486|    612|        break;
 1487|       |      /* fall through */
 1488|    849|    default:
  ------------------
  |  Branch (1488:5): [True: 841, False: 6.48k]
  ------------------
 1489|    849|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    849|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    849|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 823, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    289|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 289, False: 560]
  ------------------
 1491|    814|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 525, False: 324]
  ------------------
 1492|    814|        break;
 1493|     35|      default:
  ------------------
  |  Branch (1493:7): [True: 35, False: 814]
  ------------------
 1494|     35|        *badPtr = ptr;
 1495|     35|        return 0;
 1496|    849|      }
 1497|    814|      break;
 1498|  7.32k|    }
 1499|  7.32k|  }
 1500|    869|  return 1;
 1501|    905|}
xmltok.c:big2_prologTok:
 1018|  87.8k|                  const char **nextTokPtr) {
 1019|  87.8k|  int tok;
 1020|  87.8k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 322, False: 87.5k]
  ------------------
 1021|    322|    return XML_TOK_NONE;
  ------------------
  |  |   51|    322|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  87.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  87.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  87.5k|    size_t n = end - ptr;
 1024|  87.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  87.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 29.9k, False: 57.5k]
  ------------------
 1025|  29.9k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  29.9k|#  define MINBPC(enc) 2
  ------------------
 1026|  29.9k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 26, False: 29.9k]
  ------------------
 1027|     26|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  29.9k|      end = ptr + n;
 1029|  29.9k|    }
 1030|  87.5k|  }
 1031|  87.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  87.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  87.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  85.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 85.3k, False: 2.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    965|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 965, False: 86.5k]
  ------------------
 1033|    965|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    965|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    965|#  define MINBPC(enc) 2
  ------------------
 1034|  3.90k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 3.90k, False: 83.5k]
  ------------------
 1035|  3.90k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.90k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.90k|#  define MINBPC(enc) 2
  ------------------
 1036|  13.5k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 13.5k, False: 73.9k]
  ------------------
 1037|  13.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.5k|#  define MINBPC(enc) 2
  ------------------
 1038|  13.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.5k|    {                                                                          \
  |  |  |  |  135|  13.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  13.5k|    }
  |  |  ------------------
  ------------------
 1039|  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.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 8, False: 13.5k]
  |  |  |  |  |  Branch (870:4): [True: 12.0k, False: 1.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.50k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.50k, False: 6.02k]
  ------------------
 1041|  7.50k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.50k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.50k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.14k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.14k, False: 11.3k]
  ------------------
 1043|  2.14k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.14k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.14k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.25k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.25k, False: 12.2k]
  ------------------
 1045|  2.36k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.11k, False: 12.4k]
  ------------------
 1046|  3.86k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.49k, False: 12.0k]
  ------------------
 1047|  3.86k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 13.5k]
  ------------------
 1048|  3.86k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 13.5k]
  ------------------
 1049|  3.88k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 17, False: 13.5k]
  ------------------
 1050|  3.88k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.88k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.88k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.88k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  13.5k|    }
 1053|      8|    *nextTokPtr = ptr;
 1054|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1055|  13.5k|  }
 1056|  4.98k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.98k, False: 82.4k]
  ------------------
 1057|  4.98k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  4.98k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 51, False: 4.93k]
  ------------------
 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|  18.8k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 13.9k, False: 73.5k]
  ------------------
 1064|  24.8k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.99k, False: 81.4k]
  ------------------
 1065|  27.2k|    for (;;) {
 1066|  27.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  27.2k|#  define MINBPC(enc) 2
  ------------------
 1067|  27.2k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  27.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 178, False: 27.0k]
  ------------------
 1068|    178|        break;
 1069|  27.0k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  27.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  27.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  25.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 25.8k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    751|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 751, False: 26.3k]
  ------------------
 1071|  1.58k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 833, False: 26.2k]
  ------------------
 1072|  1.58k|        break;
 1073|    804|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 804, False: 26.2k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    804|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    804|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 801, False: 3]
  ------------------
 1076|    801|          break;
 1077|       |        /* fall through */
 1078|  24.7k|      default:
  ------------------
  |  Branch (1078:7): [True: 24.7k, False: 2.38k]
  ------------------
 1079|  24.7k|        *nextTokPtr = ptr;
 1080|  24.7k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  24.7k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  27.0k|      }
 1082|  27.0k|    }
 1083|    178|    *nextTokPtr = ptr;
 1084|    178|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    178|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.35k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.35k, False: 85.1k]
  ------------------
 1086|  2.35k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.35k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.35k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.22k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.22k, False: 85.2k]
  ------------------
 1088|  2.22k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.22k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.22k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.22k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.25k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.25k, False: 86.2k]
  ------------------
 1091|  1.25k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.25k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.25k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.25k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    709|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 709, False: 86.7k]
  ------------------
 1094|    709|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    709|#  define MINBPC(enc) 2
  ------------------
 1095|    709|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    709|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    709|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    709|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 708]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    708|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    708|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    708|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 703, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 37, False: 666]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     37|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     37|    {                                                                          \
  |  |  135|     37|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     37|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     37|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 36]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     37|    }
  ------------------
 1099|     36|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     36|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     36|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 22, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     36|    }
 1104|    706|    *nextTokPtr = ptr;
 1105|    706|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    706|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.53k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.53k, False: 82.9k]
  ------------------
 1107|  4.53k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.53k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.53k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.53k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.89k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.89k, False: 83.5k]
  ------------------
 1110|  3.89k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.89k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.89k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.89k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.89k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.89k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 6, False: 3.88k]
  ------------------
 1112|      6|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      6|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.88k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.88k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.88k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 27, False: 3.86k]
  |  |  |  |  |  Branch (870:4): [True: 3.86k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    733|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 733, False: 3.15k]
  ------------------
 1115|    733|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    733|#  define MINBPC(enc) 2
  ------------------
 1116|    733|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    733|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    306|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 306, False: 3.58k]
  ------------------
 1118|    306|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    306|#  define MINBPC(enc) 2
  ------------------
 1119|    306|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    306|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    280|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 280, False: 3.60k]
  ------------------
 1121|    280|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    280|#  define MINBPC(enc) 2
  ------------------
 1122|    280|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    280|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    303|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 303, False: 3.58k]
  ------------------
 1124|    497|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 194, False: 3.69k]
  ------------------
 1125|    936|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 439, False: 3.44k]
  ------------------
 1126|  1.48k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 553, False: 3.33k]
  ------------------
 1127|  1.77k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 290, False: 3.59k]
  ------------------
 1128|  2.07k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 296, False: 3.59k]
  ------------------
 1129|  2.54k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 466, False: 3.42k]
  ------------------
 1130|  2.54k|      *nextTokPtr = ptr;
 1131|  2.54k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.54k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.88k|    }
 1133|     27|    *nextTokPtr = ptr;
 1134|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1135|  3.23k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 3.23k, False: 84.2k]
  ------------------
 1136|  3.23k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.23k|#  define MINBPC(enc) 2
  ------------------
 1137|  3.23k|    return XML_TOK_OR;
  ------------------
  |  |   88|  3.23k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.66k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.66k, False: 81.8k]
  ------------------
 1139|  5.66k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.66k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.66k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.66k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.07k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.07k, False: 85.4k]
  ------------------
 1142|  2.07k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.07k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.07k|#  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: 87.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)) {                                         \
  |  |  ------------------
  |  |  |  |  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: 87.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)) {                                         \
  |  |  ------------------
  |  |  |  |  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|     65|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 20, False: 87.4k]
  |  |  ------------------
  |  | 1145|     20|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 15]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     15|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     15|#    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|     15|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     15|#  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|     15|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     15|#  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|     15|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.13k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.13k, False: 78.3k]
  ------------------
 1168|  15.4k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.27k, False: 81.2k]
  ------------------
 1169|  15.4k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  15.4k|#define XML_TOK_NAME 18
  ------------------
 1170|  15.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  15.4k|#  define MINBPC(enc) 2
  ------------------
 1171|  15.4k|    break;
 1172|    239|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 239, False: 87.2k]
  ------------------
 1173|    446|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 207, False: 87.2k]
  ------------------
 1174|    672|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 226, False: 87.2k]
  ------------------
 1175|    672|#  ifdef XML_NS
 1176|    672|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 87.4k]
  ------------------
 1177|    672|#  endif
 1178|    672|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    672|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    672|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    672|#  define MINBPC(enc) 2
  ------------------
 1180|    672|    break;
 1181|  2.06k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.06k, False: 85.4k]
  ------------------
 1182|  2.06k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  2.06k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  2.06k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.06k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.82k, False: 243]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.82k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.82k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.82k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.82k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.82k|      break;
 1186|  1.82k|    }
 1187|    243|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    243|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    243|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    243|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 208, False: 35]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    208|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    208|#  define MINBPC(enc) 2
  ------------------
 1189|    208|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    208|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    208|      break;
 1191|    208|    }
 1192|       |    /* fall through */
 1193|     62|  default:
  ------------------
  |  Branch (1193:3): [True: 27, False: 87.4k]
  ------------------
 1194|     62|    *nextTokPtr = ptr;
 1195|     62|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     62|#define XML_TOK_INVALID 0
  ------------------
 1196|  87.4k|  }
 1197|  45.7k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  45.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  45.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  45.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 31.5k, False: 14.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   116k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  27.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 14.1k, False: 31.5k]
  |  |  ------------------
  |  |   82|  27.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  14.1k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  14.1k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  14.1k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 30, False: 14.1k]
  |  |  ------------------
  |  |   83|     30|      *nextTokPtr = ptr;                                                       \
  |  |   84|     30|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     30|    }                                                                          \
  |  |   86|  27.7k|    /* fall through */                                                         \
  |  |   87|  27.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.30k, False: 39.4k]
  |  |  ------------------
  |  |   88|  27.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.66k, False: 39.0k]
  |  |  ------------------
  |  |   89|  27.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 213, False: 45.5k]
  |  |  ------------------
  |  |   90|  27.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 45.5k]
  |  |  ------------------
  |  |   91|  27.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 208, False: 45.5k]
  |  |  ------------------
  |  |   92|  27.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  27.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  27.7k|    break;                                                                     \
  |  |   94|  27.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 45.7k]
  |  |  |  |  ------------------
  |  |  |  |   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: 45.7k]
  |  |  |  |  ------------------
  |  |  |  |   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: 45.7k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      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|    878|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 878, False: 44.8k]
  ------------------
 1201|  2.52k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.64k, False: 44.0k]
  ------------------
 1202|  3.25k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 726, False: 44.9k]
  ------------------
 1203|  4.88k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.63k, False: 44.0k]
  ------------------
 1204|  5.90k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.02k, False: 44.7k]
  ------------------
 1205|  5.91k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 4, False: 45.7k]
  ------------------
 1206|  12.5k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 6.62k, False: 39.0k]
  ------------------
 1207|  14.5k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 2.03k, False: 43.6k]
  ------------------
 1208|  16.8k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.26k, False: 43.4k]
  ------------------
 1209|  16.8k|      *nextTokPtr = ptr;
 1210|  16.8k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 45.7k]
  ------------------
 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|    561|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 561, False: 45.1k]
  ------------------
 1232|    561|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    561|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 560]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    560|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    560|#  define MINBPC(enc) 2
  ------------------
 1237|    560|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    560|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    291|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 291, False: 45.4k]
  ------------------
 1239|    291|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    291|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 290]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    290|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    290|#  define MINBPC(enc) 2
  ------------------
 1244|    290|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    290|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    237|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 237, False: 45.4k]
  ------------------
 1246|    237|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    237|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 236]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    236|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    236|#  define MINBPC(enc) 2
  ------------------
 1251|    236|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    236|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|      9|    default:
  ------------------
  |  Branch (1252:5): [True: 9, False: 45.7k]
  ------------------
 1253|      9|      *nextTokPtr = ptr;
 1254|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1255|  45.7k|    }
 1256|  45.7k|  }
 1257|    138|  return -tok;
 1258|  18.1k|}
xmltok.c:big2_scanLit:
  984|  4.86k|                const char **nextTokPtr) {
  985|  25.2M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  25.2M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  25.2M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.2M|  ((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: 25.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  25.2M|    switch (t) {
  988|  94.0k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 25.2M]
  |  |  |  |  ------------------
  |  |  |  |   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: 25.2M]
  |  |  |  |  ------------------
  |  |  |  |   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|  47.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  47.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 47.0k, False: 25.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  47.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 47.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  47.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  47.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  47.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|  47.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  47.0k|    break;
  |  |  ------------------
  |  |   63|  47.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 25.2M]
  |  |  ------------------
  |  |   64|      5|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 25.2M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 25.2M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  5.78k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 5.78k, False: 25.2M]
  ------------------
  990|  9.89k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.11k, False: 25.2M]
  ------------------
  991|  9.89k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.89k|#  define MINBPC(enc) 2
  ------------------
  992|  9.89k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 5.12k, False: 4.76k]
  ------------------
  993|  5.12k|        break;
  994|  4.76k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.76k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.76k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 4.76k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  4.76k|      *nextTokPtr = ptr;
  997|  4.76k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.76k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.76k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.74k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.74k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.01k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.01k, False: 3.74k]
  ------------------
  999|  2.01k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 998, False: 3.76k]
  ------------------
 1000|  2.99k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 979, False: 3.78k]
  ------------------
 1001|  4.67k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.68k, False: 3.08k]
  ------------------
 1002|  4.72k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 47, False: 4.71k]
  ------------------
 1003|  4.74k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 18, False: 4.74k]
  ------------------
 1004|  4.74k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  4.74k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     23|      default:
  ------------------
  |  Branch (1005:7): [True: 23, False: 4.74k]
  ------------------
 1006|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
 1007|  4.76k|      }
 1008|  25.2M|    default:
  ------------------
  |  Branch (1008:5): [True: 25.2M, False: 56.9k]
  ------------------
 1009|  25.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  25.2M|#  define MINBPC(enc) 2
  ------------------
 1010|  25.2M|      break;
 1011|  25.2M|    }
 1012|  25.2M|  }
 1013|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  4.86k|}
xmltok.c:big2_scanDecl:
  183|  7.50k|                 const char **nextTokPtr) {
  184|  7.50k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.50k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.50k|    {                                                                          \
  |  |  |  |  135|  7.50k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.50k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 7.49k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  7.50k|    }
  |  |  ------------------
  ------------------
  185|  7.49k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.49k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.49k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.47k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.47k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    460|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 460, False: 7.03k]
  ------------------
  187|    460|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    460|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    460|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.49k]
  ------------------
  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|    463|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 463, False: 7.03k]
  ------------------
  192|  7.00k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.54k, False: 952]
  ------------------
  193|  7.00k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.00k|#  define MINBPC(enc) 2
  ------------------
  194|  7.00k|    break;
  195|     28|  default:
  ------------------
  |  Branch (195:3): [True: 28, False: 7.47k]
  ------------------
  196|     28|    *nextTokPtr = ptr;
  197|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  198|  7.49k|  }
  199|  47.1k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  47.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  47.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  47.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  47.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 47.1k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     38|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 38, False: 47.1k]
  ------------------
  202|     38|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     38|    {                                                                          \
  |  |  135|     38|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     38|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     38|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 37]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     38|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     37|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     37|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     37|  ((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: 33, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 6, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 36]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 36]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 36]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 36]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     37|      }
  212|       |      /* fall through */
  213|  4.71k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.67k, False: 42.5k]
  ------------------
  214|  5.71k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.00k, False: 46.1k]
  ------------------
  215|  6.94k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.22k, False: 45.9k]
  ------------------
  216|  6.94k|      *nextTokPtr = ptr;
  217|  6.94k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.94k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  33.8k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 33.8k, False: 13.2k]
  ------------------
  219|  40.1k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 6.31k, False: 40.8k]
  ------------------
  220|  40.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  40.1k|#  define MINBPC(enc) 2
  ------------------
  221|  40.1k|      break;
  222|     34|    default:
  ------------------
  |  Branch (222:5): [True: 34, False: 47.1k]
  ------------------
  223|     34|      *nextTokPtr = ptr;
  224|     34|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  225|  47.1k|    }
  226|  47.1k|  }
  227|     27|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     27|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  7.00k|}
xmltok.c:big2_scanComment:
  146|    716|                    const char **nextTokPtr) {
  147|    716|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    716|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    716|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    716|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 704, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    704|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    704|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    704|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 692, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 690, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     14|      *nextTokPtr = ptr;
  150|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  151|     14|    }
  152|    690|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    690|#  define MINBPC(enc) 2
  ------------------
  153|  63.1k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  63.1k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  63.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  63.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.94k, False: 56.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  6.65k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 63.1k]
  |  |  |  |  ------------------
  |  |  |  |   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: 63.1k]
  |  |  |  |  ------------------
  |  |  |  |   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.31k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.27k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.31k, False: 59.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 34, False: 3.27k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.27k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     34|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.27k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.27k|#    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|  3.27k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.27k|    break;
  |  |  ------------------
  |  |   63|  3.27k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 33, False: 63.0k]
  |  |  ------------------
  |  |   64|     33|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 63.1k]
  |  |  ------------------
  |  |   65|     42|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 63.1k]
  |  |  ------------------
  |  |   66|     42|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     42|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.31k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.31k, False: 61.8k]
  ------------------
  157|  1.31k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
  158|  1.31k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.31k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.31k|    {                                                                          \
  |  |  |  |  135|  1.31k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.31k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.31k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.31k|    }
  |  |  ------------------
  ------------------
  159|  1.31k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.31k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.31k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 974, False: 339]
  |  |  |  |  |  Branch (872:49): [True: 552, False: 422]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    552|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    552|#  define MINBPC(enc) 2
  ------------------
  161|    552|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    552|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    552|    {                                                                          \
  |  |  |  |  135|    552|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    552|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    552|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 551]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    552|    }
  |  |  ------------------
  ------------------
  162|    551|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    551|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    551|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 542, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 538, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     13|            *nextTokPtr = ptr;
  164|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  165|     13|          }
  166|    538|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    538|#  define MINBPC(enc) 2
  ------------------
  167|    538|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    538|#define XML_TOK_COMMENT 13
  ------------------
  168|    551|        }
  169|    761|        break;
  170|  58.4k|      default:
  ------------------
  |  Branch (170:7): [True: 58.4k, False: 4.66k]
  ------------------
  171|  58.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  58.4k|#  define MINBPC(enc) 2
  ------------------
  172|  58.4k|        break;
  173|  63.1k|      }
  174|  63.1k|    }
  175|    690|  }
  176|     73|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    716|}
xmltok.c:big2_scanPi:
  277|  4.70k|               const char **nextTokPtr) {
  278|  4.70k|  int tok;
  279|  4.70k|  const char *target = ptr;
  280|  4.70k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.70k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.70k|    {                                                                          \
  |  |  |  |  135|  4.70k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.70k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.70k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  4.70k|    }
  |  |  ------------------
  ------------------
  281|  4.69k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.69k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.69k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.41k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.41k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.49k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.67k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.26k, False: 3.43k]
  |  |  ------------------
  |  |  111|  4.67k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.26k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.26k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.26k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 1.26k]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  4.67k|    /* fall through */                                                         \
  |  |  116|  4.67k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.94k, False: 1.75k]
  |  |  ------------------
  |  |  117|  4.67k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 464, False: 4.23k]
  |  |  ------------------
  |  |  118|  4.67k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.67k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.67k|    break;                                                                     \
  |  |  120|  4.67k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |  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: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |  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|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 4.67k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 4.68k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  4.69k|  }
  287|   363k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   363k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   363k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   363k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.23k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.23k, False: 354k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.78M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   358k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 354k, False: 9.25k]
  |  |  ------------------
  |  |   82|   358k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   354k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   354k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   354k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 354k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|   358k|    /* fall through */                                                         \
  |  |   87|   358k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.58k, False: 359k]
  |  |  ------------------
  |  |   88|   357k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 372, False: 362k]
  |  |  ------------------
  |  |   89|   358k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 258, False: 363k]
  |  |  ------------------
  |  |   90|   358k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 222, False: 363k]
  |  |  ------------------
  |  |   91|   358k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 240, False: 363k]
  |  |  ------------------
  |  |   92|   358k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   358k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   358k|    break;                                                                     \
  |  |   94|   358k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 363k]
  |  |  |  |  ------------------
  |  |  |  |   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: 363k]
  |  |  |  |  ------------------
  |  |  |  |   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|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 363k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    547|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 547, False: 362k]
  ------------------
  291|  1.61k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.06k, False: 362k]
  ------------------
  292|  2.25k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 643, False: 362k]
  ------------------
  293|  2.25k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.25k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.25k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.25k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.25k|#  define MINBPC(enc) 2
  ------------------
  298|   703k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   703k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   703k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   703k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  49.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 49.4k, False: 654k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  21.7k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 703k]
  |  |  |  |  ------------------
  |  |  |  |   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: 703k]
  |  |  |  |  ------------------
  |  |  |  |   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.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.8k, False: 693k]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 10.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  10.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|  10.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.8k|    break;
  |  |  ------------------
  |  |   63|  10.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 42, False: 703k]
  |  |  ------------------
  |  |   64|     42|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 703k]
  |  |  ------------------
  |  |   65|     50|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 703k]
  |  |  ------------------
  |  |   66|     50|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     50|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     50|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  4.15k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 4.15k, False: 699k]
  ------------------
  302|  4.15k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.15k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 4.15k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  4.15k|    }
  |  |  ------------------
  ------------------
  304|  4.15k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  4.15k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.15k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.48k, False: 670]
  |  |  |  |  |  Branch (872:49): [True: 2.05k, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.05k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.05k|#  define MINBPC(enc) 2
  ------------------
  306|  2.05k|            return tok;
  307|  2.05k|          }
  308|  2.09k|          break;
  309|   688k|        default:
  ------------------
  |  Branch (309:9): [True: 688k, False: 15.0k]
  ------------------
  310|   688k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   688k|#  define MINBPC(enc) 2
  ------------------
  311|   688k|          break;
  312|   703k|        }
  313|   703k|      }
  314|    114|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    114|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.30k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.30k, False: 361k]
  ------------------
  316|  2.30k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.30k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.30k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.30k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.30k|#  define MINBPC(enc) 2
  ------------------
  321|  2.30k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.30k|    {                                                                          \
  |  |  |  |  135|  2.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.30k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 50, False: 2.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|     50|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     50|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     50|      }                                                                        \
  |  |  |  |  138|  2.30k|    }
  |  |  ------------------
  ------------------
  322|  2.25k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.25k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.25k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.23k, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 2.22k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.22k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.22k|#  define MINBPC(enc) 2
  ------------------
  324|  2.22k|        return tok;
  325|  2.22k|      }
  326|       |      /* fall through */
  327|     33|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 363k]
  ------------------
  328|     33|      *nextTokPtr = ptr;
  329|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  330|   363k|    }
  331|   363k|  }
  332|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.67k|}
xmltok.c:big2_checkPiTarget:
  232|  4.55k|                      int *tokPtr) {
  233|  4.55k|  int upper = 0;
  234|  4.55k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.55k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.55k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.55k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.55k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  4.55k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.85k, False: 2.69k]
  ------------------
  237|  1.85k|    return 1;
  238|  2.69k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.69k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.69k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.90k, False: 790]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.06k|  case ASCII_x:
  ------------------
  |  |   86|  1.06k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.06k, False: 1.63k]
  ------------------
  240|  1.06k|    break;
  241|    743|  case ASCII_X:
  ------------------
  |  |   59|    743|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 743, False: 1.95k]
  ------------------
  242|    743|    upper = 1;
  243|    743|    break;
  244|    887|  default:
  ------------------
  |  Branch (244:3): [True: 887, False: 1.81k]
  ------------------
  245|    887|    return 1;
  246|  2.69k|  }
  247|  1.81k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.81k|#  define MINBPC(enc) 2
  ------------------
  248|  1.81k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.81k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.81k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.40k, False: 408]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    900|  case ASCII_m:
  ------------------
  |  |   75|    900|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 900, False: 911]
  ------------------
  250|    900|    break;
  251|    418|  case ASCII_M:
  ------------------
  |  |   48|    418|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 418, False: 1.39k]
  ------------------
  252|    418|    upper = 1;
  253|    418|    break;
  254|    493|  default:
  ------------------
  |  Branch (254:3): [True: 493, False: 1.31k]
  ------------------
  255|    493|    return 1;
  256|  1.81k|  }
  257|  1.31k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
  258|  1.31k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.31k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.31k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 758, False: 560]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     39|  case ASCII_l:
  ------------------
  |  |   74|     39|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 39, False: 1.27k]
  ------------------
  260|     39|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.31k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.27k|  default:
  ------------------
  |  Branch (264:3): [True: 1.27k, False: 41]
  ------------------
  265|  1.27k|    return 1;
  266|  1.31k|  }
  267|     41|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 38]
  ------------------
  268|      3|    return 0;
  269|     38|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     38|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     38|  return 1;
  271|     41|}
xmltok.c:big2_scanPercent:
  924|  2.36k|                    const char **nextTokPtr) {
  925|  2.36k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.36k|    {                                                                          \
  |  |  |  |  135|  2.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 48, False: 2.31k]
  |  |  |  |  ------------------
  |  |  |  |  136|     48|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     48|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     48|      }                                                                        \
  |  |  |  |  138|  2.36k|    }
  |  |  ------------------
  ------------------
  926|  2.31k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.31k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.31k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.96k, False: 354]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.44k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.44k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 339, False: 1.97k]
  |  |  ------------------
  |  |  111|  1.44k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    339|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    339|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    339|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 325]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.44k|    /* fall through */                                                         \
  |  |  116|  1.44k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 767, False: 1.54k]
  |  |  ------------------
  |  |  117|  1.44k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 349, False: 1.96k]
  |  |  ------------------
  |  |  118|  1.44k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.44k|    break;                                                                     \
  |  |  120|  1.44k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.31k]
  |  |  |  |  ------------------
  |  |  |  |  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.31k]
  |  |  |  |  ------------------
  |  |  |  |  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|      9|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  928|    194|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 194, False: 2.12k]
  ------------------
  929|    644|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 450, False: 1.86k]
  ------------------
  930|    840|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 196, False: 2.11k]
  ------------------
  931|    843|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.31k]
  ------------------
  932|    843|    *nextTokPtr = ptr;
  933|    843|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    843|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 2.30k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  2.31k|  }
  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.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.60k, False: 913]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  10.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.15k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 892, False: 3.62k]
  |  |  ------------------
  |  |   82|  3.15k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    892|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    892|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    892|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 874]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  3.15k|    /* fall through */                                                         \
  |  |   87|  3.15k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 926, False: 3.59k]
  |  |  ------------------
  |  |   88|  2.23k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 439, False: 4.08k]
  |  |  ------------------
  |  |   89|  2.45k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 216, False: 4.30k]
  |  |  ------------------
  |  |   90|  2.66k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 209, False: 4.31k]
  |  |  ------------------
  |  |   91|  3.15k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 491, False: 4.02k]
  |  |  ------------------
  |  |   92|  3.15k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.15k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.15k|    break;                                                                     \
  |  |   94|  3.15k|    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|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 4.50k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      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;
  |  |  ------------------
  ------------------
  941|  1.31k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.31k, False: 3.20k]
  ------------------
  942|  1.31k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
  943|  1.31k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.31k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     19|    default:
  ------------------
  |  Branch (944:5): [True: 19, False: 4.50k]
  ------------------
  945|     19|      *nextTokPtr = ptr;
  946|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  947|  4.51k|    }
  948|  4.51k|  }
  949|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.44k|}
xmltok.c:big2_scanPoundName:
  954|  2.07k|                      const char **nextTokPtr) {
  955|  2.07k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.07k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.07k|    {                                                                          \
  |  |  |  |  135|  2.07k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.07k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.07k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.07k|    }
  |  |  ------------------
  ------------------
  956|  2.07k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.07k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.07k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.97k, False: 103]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.48k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.03k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 73, False: 2.00k]
  |  |  ------------------
  |  |  111|  2.03k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     73|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     73|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     73|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 60]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  2.03k|    /* fall through */                                                         \
  |  |  116|  2.03k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.30k, False: 772]
  |  |  ------------------
  |  |  117|  2.03k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 669, False: 1.40k]
  |  |  ------------------
  |  |  118|  2.03k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.03k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.03k|    break;                                                                     \
  |  |  120|  2.03k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.07k]
  |  |  |  |  ------------------
  |  |  |  |  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.07k]
  |  |  |  |  ------------------
  |  |  |  |  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|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    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|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 2.06k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  2.07k|  }
  962|   385k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   385k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   385k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   385k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 13.2k, False: 372k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  1.89M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   383k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 372k, False: 13.2k]
  |  |  ------------------
  |  |   82|   383k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   372k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   372k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   372k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 8, False: 372k]
  |  |  ------------------
  |  |   83|      8|      *nextTokPtr = ptr;                                                       \
  |  |   84|      8|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      8|    }                                                                          \
  |  |   86|   383k|    /* fall through */                                                         \
  |  |   87|   383k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.92k, False: 380k]
  |  |  ------------------
  |  |   88|   382k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 5.65k, False: 380k]
  |  |  ------------------
  |  |   89|   383k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 385k]
  |  |  ------------------
  |  |   90|   383k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 385k]
  |  |  ------------------
  |  |   91|   383k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 328, False: 385k]
  |  |  ------------------
  |  |   92|   383k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   383k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   383k|    break;                                                                     \
  |  |   94|   383k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 385k]
  |  |  |  |  ------------------
  |  |  |  |   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: 385k]
  |  |  |  |  ------------------
  |  |  |  |   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|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 385k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      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|    197|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 197, False: 385k]
  ------------------
  966|    656|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 459, False: 385k]
  ------------------
  967|    967|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 311, False: 385k]
  ------------------
  968|  1.16k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 194, False: 385k]
  ------------------
  969|  1.58k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 426, False: 385k]
  ------------------
  970|  1.58k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 385k]
  ------------------
  971|  1.94k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 358, False: 385k]
  ------------------
  972|  1.94k|      *nextTokPtr = ptr;
  973|  1.94k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.94k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      8|    default:
  ------------------
  |  Branch (974:5): [True: 8, False: 385k]
  ------------------
  975|      8|      *nextTokPtr = ptr;
  976|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  977|   385k|    }
  978|   385k|  }
  979|     60|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     60|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.03k|}
xmltok.c:big2_contentTok:
  824|  79.4k|                   const char **nextTokPtr) {
  825|  79.4k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.10k, False: 78.3k]
  ------------------
  826|  1.10k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.10k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  78.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  78.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  78.3k|    size_t n = end - ptr;
  829|  78.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  78.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 20.2k, False: 58.0k]
  ------------------
  830|  20.2k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  20.2k|#  define MINBPC(enc) 2
  ------------------
  831|  20.2k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 102, False: 20.1k]
  ------------------
  832|    102|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    102|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  20.1k|      end = ptr + n;
  834|  20.1k|    }
  835|  78.3k|  }
  836|  78.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  78.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  78.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  64.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 64.5k, False: 13.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  16.5k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 16.5k, False: 61.6k]
  ------------------
  838|  16.5k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  16.5k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  16.5k|#  define MINBPC(enc) 2
  ------------------
  839|  12.3k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 12.3k, False: 65.8k]
  ------------------
  840|  12.3k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.3k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.3k|#  define MINBPC(enc) 2
  ------------------
  841|  19.9k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 19.9k, False: 58.3k]
  ------------------
  842|  19.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  19.9k|#  define MINBPC(enc) 2
  ------------------
  843|  19.9k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  19.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  19.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  19.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 15, False: 19.9k]
  ------------------
  844|     15|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     15|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  19.9k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  19.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  19.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.7k, False: 8.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 494, False: 19.4k]
  ------------------
  846|    494|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    494|#  define MINBPC(enc) 2
  ------------------
  847|  19.9k|    *nextTokPtr = ptr;
  848|  19.9k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.54k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.54k, False: 76.6k]
  ------------------
  850|  1.54k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.54k|#  define MINBPC(enc) 2
  ------------------
  851|  1.54k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.54k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  8.90k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 8.90k, False: 69.3k]
  ------------------
  853|  8.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.90k|#  define MINBPC(enc) 2
  ------------------
  854|  8.90k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.90k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.90k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 8.89k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  8.89k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  8.89k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  8.89k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.69k, False: 1.20k]
  |  |  |  |  |  Branch (872:49): [True: 5.39k, False: 2.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  3.49k|      break;
  858|  5.39k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.39k|#  define MINBPC(enc) 2
  ------------------
  859|  5.39k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.39k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.39k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 6, False: 5.39k]
  ------------------
  860|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  5.39k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.39k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.39k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.63k, False: 2.75k]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  5.39k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  5.39k|#  define MINBPC(enc) 2
  ------------------
  863|  5.39k|      break;
  864|  5.39k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  13.3k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 78.2k]
  |  |  |  |  ------------------
  |  |  |  |   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: 78.2k]
  |  |  |  |  ------------------
  |  |  |  |   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|  6.63k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.57k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.63k, False: 71.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.63k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 60, False: 6.57k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.57k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     60|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.57k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.57k|#    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|  6.57k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.57k|    break;
  |  |  ------------------
  |  |   63|  6.57k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 59, False: 78.1k]
  |  |  ------------------
  |  |   64|     59|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 78.2k]
  |  |  ------------------
  |  |   65|     69|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 78.2k]
  |  |  ------------------
  |  |   66|     69|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     69|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     69|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  12.2k|  default:
  ------------------
  |  Branch (868:3): [True: 12.2k, False: 65.9k]
  ------------------
  869|  12.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.2k|#  define MINBPC(enc) 2
  ------------------
  870|  12.2k|    break;
  871|  78.2k|  }
  872|  1.24M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.24M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.24M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.24M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  60.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 60.8k, False: 1.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 1.24M]
  |  |  ------------------
  |  |  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: 1.24M]
  |  |  ------------------
  |  |  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|  11.3k|      LEAD_CASE(4)
  ------------------
  |  |  875|  11.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 11.3k, False: 1.23M]
  |  |  ------------------
  |  |  876|  11.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  11.3k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 54, False: 11.3k]
  |  |  ------------------
  |  |  877|     54|      *nextTokPtr = ptr;                                                       \
  |  |  878|     54|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     54|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     54|    }                                                                          \
  |  |  880|  11.3k|    ptr += n;                                                                  \
  |  |  881|  11.3k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  12.1k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 12.1k, False: 1.23M]
  ------------------
  887|  12.1k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  12.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  12.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 12.1k, False: 2]
  |  |  ------------------
  ------------------
  888|  12.1k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  12.1k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  12.1k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 8.20k, False: 3.94k]
  |  |  |  |  |  Branch (872:49): [True: 2.69k, False: 5.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  9.45k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.45k|#  define MINBPC(enc) 2
  ------------------
  890|  9.45k|          break;
  891|  9.45k|        }
  892|  2.69k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  2.69k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.69k, False: 5]
  |  |  ------------------
  ------------------
  893|  2.69k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  2.69k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.69k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.23k, False: 460]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 2.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.69k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.69k|#  define MINBPC(enc) 2
  ------------------
  895|  2.69k|            break;
  896|  2.69k|          }
  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|  2.69k|        }
  900|  2.69k|      }
  901|       |      /* fall through */
  902|  5.04k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.03k, False: 1.24M]
  ------------------
  903|  8.88k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.84k, False: 1.24M]
  ------------------
  904|  8.92k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 44, False: 1.24M]
  ------------------
  905|  8.92k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.24M]
  ------------------
  906|  8.93k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 1.24M]
  ------------------
  907|  26.3k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 17.4k, False: 1.23M]
  ------------------
  908|  27.3k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 960, False: 1.24M]
  ------------------
  909|  27.3k|      *nextTokPtr = ptr;
  910|  27.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  27.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.19M|    default:
  ------------------
  |  Branch (911:5): [True: 1.19M, False: 50.8k]
  ------------------
  912|  1.19M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.19M|#  define MINBPC(enc) 2
  ------------------
  913|  1.19M|      break;
  914|  1.24M|    }
  915|  1.24M|  }
  916|    355|  *nextTokPtr = ptr;
  917|    355|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    355|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  27.7k|}
xmltok.c:big2_scanLt:
  726|  16.5k|               const char **nextTokPtr) {
  727|  16.5k|#  ifdef XML_NS
  728|  16.5k|  int hadColon;
  729|  16.5k|#  endif
  730|  16.5k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.5k|    {                                                                          \
  |  |  |  |  135|  16.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  16.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 16.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  16.5k|    }
  |  |  ------------------
  ------------------
  731|  16.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  16.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  16.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 13.5k, False: 2.95k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.93k, False: 13.6k]
  |  |  ------------------
  |  |  111|  11.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.93k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.93k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.93k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 2.91k]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|  11.0k|    /* fall through */                                                         \
  |  |  116|  11.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.27k, False: 12.2k]
  |  |  ------------------
  |  |  117|  11.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.89k, False: 12.6k]
  |  |  ------------------
  |  |  118|  11.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.0k|    break;                                                                     \
  |  |  120|  11.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 16.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 16.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 16.5k]
  |  |  |  |  ------------------
  |  |  |  |  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|  1.01k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.01k, False: 15.5k]
  ------------------
  734|  1.01k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.01k|#  define MINBPC(enc) 2
  ------------------
  735|  1.01k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.01k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.01k|    {                                                                          \
  |  |  |  |  135|  1.01k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.01k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.01k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.01k|    }
  |  |  ------------------
  ------------------
  736|  1.01k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.01k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.01k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.00k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 18, False: 997]
  |  |  |  |  |  Branch (870:4): [True: 1.00k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    256|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 256, False: 759]
  ------------------
  738|    256|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    256|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    256|#  define MINBPC(enc) 2
  ------------------
  739|    741|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 741, False: 274]
  ------------------
  740|    741|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    741|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    741|#  define MINBPC(enc) 2
  ------------------
  741|  1.01k|    }
  742|     18|    *nextTokPtr = ptr;
  743|     18|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  744|  2.56k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.56k, False: 13.9k]
  ------------------
  745|  2.56k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.56k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.56k|#  define MINBPC(enc) 2
  ------------------
  746|  1.82k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.82k, False: 14.7k]
  ------------------
  747|  1.82k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.82k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.82k|#  define MINBPC(enc) 2
  ------------------
  748|     11|  default:
  ------------------
  |  Branch (748:3): [True: 11, False: 16.5k]
  ------------------
  749|     11|    *nextTokPtr = ptr;
  750|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  751|  16.5k|  }
  752|  11.0k|#  ifdef XML_NS
  753|  11.0k|  hadColon = 0;
  754|  11.0k|#  endif
  755|       |  /* we have a start-tag */
  756|   513k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   513k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   513k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   513k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.6k, False: 495k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  2.50M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   502k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 495k, False: 17.6k]
  |  |  ------------------
  |  |   82|   502k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   495k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   495k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   495k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 495k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|   502k|    /* fall through */                                                         \
  |  |   87|   502k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.41k, False: 508k]
  |  |  ------------------
  |  |   88|   501k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 424, False: 513k]
  |  |  ------------------
  |  |   89|   501k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 209, False: 513k]
  |  |  ------------------
  |  |   90|   502k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 513k]
  |  |  ------------------
  |  |   91|   502k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 391, False: 513k]
  |  |  ------------------
  |  |   92|   502k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   502k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   502k|    break;                                                                     \
  |  |   94|   502k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 513k]
  |  |  |  |  ------------------
  |  |  |  |   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: 513k]
  |  |  |  |  ------------------
  |  |  |  |   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|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 513k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    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|      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: 513k]
  ------------------
  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.72k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.72k, False: 510k]
  ------------------
  777|  3.73k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.01k, False: 512k]
  ------------------
  778|  4.81k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.08k, False: 512k]
  ------------------
  779|  4.81k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.81k|#  define MINBPC(enc) 2
  ------------------
  780|  6.16k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  6.16k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.16k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.16k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.17k, False: 989]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.89k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.57k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 968, False: 5.19k]
  |  |  ------------------
  |  |  111|  3.57k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    968|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    968|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    968|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 954]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  3.57k|    /* fall through */                                                         \
  |  |  116|  3.57k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.94k, False: 4.21k]
  |  |  ------------------
  |  |  117|  3.57k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 676, False: 5.49k]
  |  |  ------------------
  |  |  118|  3.57k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.57k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.57k|    break;                                                                     \
  |  |  120|  3.57k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.16k]
  |  |  |  |  ------------------
  |  |  |  |  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.16k]
  |  |  |  |  ------------------
  |  |  |  |  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.15k]
  |  |  |  |  ------------------
  |  |  |  |  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|    791|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 791, False: 5.37k]
  ------------------
  784|    791|          goto gt;
  785|    361|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 361, False: 5.80k]
  ------------------
  786|    361|          goto sol;
  787|    632|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 632, False: 5.53k]
  ------------------
  788|  1.00k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 376, False: 5.79k]
  ------------------
  789|  1.40k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 393, False: 5.77k]
  ------------------
  790|  1.40k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.40k|#  define MINBPC(enc) 2
  ------------------
  791|  1.40k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 6.16k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  6.16k|        }
  796|  3.57k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.57k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  6.16k|      }
  798|     45|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.81k|    }
  800|  5.80k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.80k, False: 507k]
  ------------------
  801|  6.59k|    gt:
  802|  6.59k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.59k|#  define MINBPC(enc) 2
  ------------------
  803|  6.59k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.59k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    361|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 361, False: 513k]
  ------------------
  805|    722|    sol:
  806|    722|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    722|#  define MINBPC(enc) 2
  ------------------
  807|    722|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    722|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    722|    {                                                                          \
  |  |  |  |  135|    722|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    722|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    722|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 709]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|    722|    }
  |  |  ------------------
  ------------------
  808|    709|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    709|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    709|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 696, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 685, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     24|        *nextTokPtr = ptr;
  810|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  811|     24|      }
  812|    685|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    685|#  define MINBPC(enc) 2
  ------------------
  813|    685|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    685|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      7|    default:
  ------------------
  |  Branch (814:5): [True: 7, False: 513k]
  ------------------
  815|      7|      *nextTokPtr = ptr;
  816|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  817|   513k|    }
  818|   513k|  }
  819|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.0k|}
xmltok.c:big2_scanCdataSection:
  337|    741|                         const char **nextTokPtr) {
  338|    741|  static const char CDATA_LSQB[]
  339|    741|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    741|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    741|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    741|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    741|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    741|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    741|#define ASCII_LSQB 0x5B
  ------------------
  340|    741|  int i;
  341|    741|  UNUSED_P(enc);
  ------------------
  |  |  135|    741|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    741|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    741|    {                                                                          \
  |  |  135|    741|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    741|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    741|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 738]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    741|    }
  ------------------
  344|  5.06k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.33k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 4.35k, False: 719]
  ------------------
  345|  4.35k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  4.35k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.35k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.34k, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 4.33k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     19|      *nextTokPtr = ptr;
  347|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  348|     19|    }
  349|  4.35k|  }
  350|    719|  *nextTokPtr = ptr;
  351|    719|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    719|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    738|}
xmltok.c:big2_scanEndTag:
  432|  1.82k|                   const char **nextTokPtr) {
  433|  1.82k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.82k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.82k|    {                                                                          \
  |  |  |  |  135|  1.82k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.82k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.82k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.82k|    }
  |  |  ------------------
  ------------------
  434|  1.82k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.82k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.82k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.32k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.32k, False: 506]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.86k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.79k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 481, False: 1.34k]
  |  |  ------------------
  |  |  111|  1.79k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    481|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    481|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    481|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 478]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  1.79k|    /* fall through */                                                         \
  |  |  116|  1.79k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 866, False: 961]
  |  |  ------------------
  |  |  117|  1.79k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 455, False: 1.37k]
  |  |  ------------------
  |  |  118|  1.79k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.79k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.79k|    break;                                                                     \
  |  |  120|  1.79k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.82k]
  |  |  |  |  ------------------
  |  |  |  |  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.82k]
  |  |  |  |  ------------------
  |  |  |  |  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|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 1.80k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    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|     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;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.82k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.82k|  }
  440|  3.13k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.13k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.13k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.13k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.70k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.70k, False: 430]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.01k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.40k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 403, False: 2.73k]
  |  |  ------------------
  |  |   82|  1.40k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    403|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    403|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    403|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 390]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.40k|    /* fall through */                                                         \
  |  |   87|  1.40k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 206, False: 2.93k]
  |  |  ------------------
  |  |   88|    792|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 196, False: 2.94k]
  |  |  ------------------
  |  |   89|    991|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 199, False: 2.93k]
  |  |  ------------------
  |  |   90|  1.19k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 2.93k]
  |  |  ------------------
  |  |   91|  1.40k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 211, False: 2.92k]
  |  |  ------------------
  |  |   92|  1.40k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.40k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.40k|    break;                                                                     \
  |  |   94|  1.40k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.13k]
  |  |  |  |  ------------------
  |  |  |  |   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.13k]
  |  |  |  |  ------------------
  |  |  |  |   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.11k]
  |  |  |  |  ------------------
  |  |  |  |   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|    398|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 398, False: 2.73k]
  ------------------
  444|    662|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 264, False: 2.87k]
  ------------------
  445|  1.27k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 611, False: 2.52k]
  ------------------
  446|  2.05k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.27k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    821|#  define MINBPC(enc) 2
  ------------------
  447|  2.05k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.05k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.05k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.01k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.01k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    240|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 240, False: 1.81k]
  ------------------
  449|    613|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 373, False: 1.67k]
  ------------------
  450|    821|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 208, False: 1.84k]
  ------------------
  451|    821|          break;
  452|  1.18k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.18k, False: 863]
  ------------------
  453|  1.18k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.18k|#  define MINBPC(enc) 2
  ------------------
  454|  1.18k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.18k|#define XML_TOK_END_TAG 5
  ------------------
  455|     42|        default:
  ------------------
  |  Branch (455:9): [True: 42, False: 2.00k]
  ------------------
  456|     42|          *nextTokPtr = ptr;
  457|     42|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
  458|  2.05k|        }
  459|  2.05k|      }
  460|     43|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#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.13k]
  ------------------
  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|    414|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 414, False: 2.72k]
  ------------------
  469|    414|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    414|#  define MINBPC(enc) 2
  ------------------
  470|    414|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    414|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 3.12k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  3.13k|    }
  475|  3.13k|  }
  476|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.79k|}
xmltok.c:big2_scanAtts:
  573|  3.57k|                 const char **nextTokPtr) {
  574|  3.57k|#  ifdef XML_NS
  575|  3.57k|  int hadColon = 0;
  576|  3.57k|#  endif
  577|   110k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   110k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   110k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   110k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   109k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 109k, False: 861]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  18.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.98k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 830, False: 109k]
  |  |  ------------------
  |  |   82|  4.98k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    830|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    830|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    830|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 811]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  4.98k|    /* fall through */                                                         \
  |  |   87|  4.98k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.09k, False: 107k]
  |  |  ------------------
  |  |   88|  4.30k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 406, False: 110k]
  |  |  ------------------
  |  |   89|  4.58k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 281, False: 110k]
  |  |  ------------------
  |  |   90|  4.78k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 110k]
  |  |  ------------------
  |  |   91|  4.98k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 110k]
  |  |  ------------------
  |  |   92|  4.98k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.98k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  4.98k|    break;                                                                     \
  |  |   94|  4.98k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 110k]
  |  |  |  |  ------------------
  |  |  |  |   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: 110k]
  |  |  |  |  ------------------
  |  |  |  |   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: 110k]
  |  |  |  |  ------------------
  |  |  |  |   71|     25|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    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|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 110k]
  ------------------
  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|    929|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 929, False: 109k]
  ------------------
  598|  1.28k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 354, False: 110k]
  ------------------
  599|  1.64k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 364, False: 110k]
  ------------------
  600|  2.61k|      for (;;) {
  601|  2.61k|        int t;
  602|       |
  603|  2.61k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.61k|#  define MINBPC(enc) 2
  ------------------
  604|  2.61k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.61k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.61k|    {                                                                          \
  |  |  |  |  135|  2.61k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.61k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 47, False: 2.56k]
  |  |  |  |  ------------------
  |  |  |  |  136|     47|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     47|      }                                                                        \
  |  |  |  |  138|  2.61k|    }
  |  |  ------------------
  ------------------
  605|  2.56k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.56k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.56k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.53k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.56k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.57k, False: 993]
  ------------------
  607|  1.57k|          break;
  608|    993|        switch (t) {
  609|    386|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 386, False: 607]
  ------------------
  610|    642|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 256, False: 737]
  ------------------
  611|    964|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 322, False: 671]
  ------------------
  612|    964|          break;
  613|     29|        default:
  ------------------
  |  Branch (613:9): [True: 29, False: 964]
  ------------------
  614|     29|          *nextTokPtr = ptr;
  615|     29|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  616|    993|        }
  617|    993|      }
  618|       |      /* fall through */
  619|   105k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 103k, False: 6.67k]
  ------------------
  620|   105k|      int open;
  621|   105k|#  ifdef XML_NS
  622|   105k|      hadColon = 0;
  623|   105k|#  endif
  624|   106k|      for (;;) {
  625|   106k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   106k|#  define MINBPC(enc) 2
  ------------------
  626|   106k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   106k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   106k|    {                                                                          \
  |  |  |  |  135|   106k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   106k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   106k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 46, False: 106k]
  |  |  |  |  ------------------
  |  |  |  |  136|     46|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     46|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     46|      }                                                                        \
  |  |  |  |  138|   106k|    }
  |  |  ------------------
  ------------------
  627|   106k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   106k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   106k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   106k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 106k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   106k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 36.1k, False: 69.9k]
  |  Branch (628:32): [True: 69.1k, False: 814]
  ------------------
  629|   105k|          break;
  630|    814|        switch (open) {
  631|    242|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 242, False: 572]
  ------------------
  632|    440|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 198, False: 616]
  ------------------
  633|    790|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 350, False: 464]
  ------------------
  634|    790|          break;
  635|     24|        default:
  ------------------
  |  Branch (635:9): [True: 24, False: 790]
  ------------------
  636|     24|          *nextTokPtr = ptr;
  637|     24|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  638|    814|        }
  639|    814|      }
  640|   105k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   105k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  8.03M|      for (;;) {
  643|  8.03M|        int t;
  644|  8.03M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.03M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.03M|    {                                                                          \
  |  |  |  |  135|  8.03M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.03M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.03M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 74, False: 8.03M]
  |  |  |  |  ------------------
  |  |  |  |  136|     74|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     74|      }                                                                        \
  |  |  |  |  138|  8.03M|    }
  |  |  ------------------
  ------------------
  645|  8.03M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  8.03M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.03M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   715k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 715k, False: 7.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  8.03M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 105k, False: 7.92M]
  ------------------
  647|   105k|          break;
  648|  7.92M|        switch (t) {
  649|   160k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 7.92M]
  |  |  |  |  ------------------
  |  |  |  |   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: 7.92M]
  |  |  |  |  ------------------
  |  |  |  |   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|  80.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  80.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 80.0k, False: 7.84M]
  |  |  |  |  ------------------
  |  |  |  |   50|  80.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 80.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  80.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  80.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  80.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|  80.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  80.0k|    break;
  |  |  ------------------
  |  |   63|  80.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 21, False: 7.92M]
  |  |  ------------------
  |  |   64|     21|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 7.92M]
  |  |  ------------------
  |  |   65|     26|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 7.92M]
  |  |  ------------------
  |  |   66|     26|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     26|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|   102k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 102k, False: 7.82M]
  ------------------
  651|   102k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|   102k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|   102k|#  define MINBPC(enc) 2
  ------------------
  652|   102k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 18, False: 102k]
  ------------------
  653|     18|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 11, False: 7]
  ------------------
  654|     11|              *nextTokPtr = ptr;
  655|     18|            return tok;
  656|     18|          }
  657|   102k|          break;
  658|   102k|        }
  659|   102k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 4, False: 7.92M]
  ------------------
  660|      4|          *nextTokPtr = ptr;
  661|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  662|  7.74M|        default:
  ------------------
  |  Branch (662:9): [True: 7.74M, False: 183k]
  ------------------
  663|  7.74M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.74M|#  define MINBPC(enc) 2
  ------------------
  664|  7.74M|          break;
  665|  7.92M|        }
  666|  7.92M|      }
  667|   105k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   105k|#  define MINBPC(enc) 2
  ------------------
  668|   105k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   105k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   105k|    {                                                                          \
  |  |  |  |  135|   105k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   105k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   105k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 105k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|   105k|    }
  |  |  ------------------
  ------------------
  669|   105k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   105k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   105k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   105k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 105k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  71.8k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 71.8k, False: 33.2k]
  ------------------
  671|  73.2k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.36k, False: 103k]
  ------------------
  672|   102k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 29.6k, False: 75.4k]
  ------------------
  673|   102k|        break;
  674|    312|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 312, False: 104k]
  ------------------
  675|    312|        goto sol;
  676|  1.90k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.90k, False: 103k]
  ------------------
  677|  1.90k|        goto gt;
  678|     22|      default:
  ------------------
  |  Branch (678:7): [True: 22, False: 105k]
  ------------------
  679|     22|        *nextTokPtr = ptr;
  680|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  681|   105k|      }
  682|       |      /* ptr points to closing quote */
  683|   104k|      for (;;) {
  684|   104k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   104k|#  define MINBPC(enc) 2
  ------------------
  685|   104k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   104k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   104k|    {                                                                          \
  |  |  |  |  135|   104k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   104k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   104k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   104k|    }
  |  |  ------------------
  ------------------
  686|   104k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   104k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   104k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   103k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 103k, False: 1.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|  87.1k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   101k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.39k, False: 103k]
  |  |  ------------------
  |  |  111|   101k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.39k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.39k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.39k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 10, False: 1.38k]
  |  |  ------------------
  |  |  112|     10|      *nextTokPtr = ptr;                                                       \
  |  |  113|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     10|    }                                                                          \
  |  |  115|   101k|    /* fall through */                                                         \
  |  |  116|   101k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 84.3k, False: 20.2k]
  |  |  ------------------
  |  |  117|   101k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 16.3k, False: 88.2k]
  |  |  ------------------
  |  |  118|   101k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   101k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   101k|    break;                                                                     \
  |  |  120|   101k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  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: 104k]
  |  |  |  |  ------------------
  |  |  |  |  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|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  688|    700|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 700, False: 103k]
  ------------------
  689|    967|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 267, False: 104k]
  ------------------
  690|  1.69k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 726, False: 103k]
  ------------------
  691|  1.69k|          continue;
  692|    373|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 373, False: 104k]
  ------------------
  693|  2.27k|        gt:
  694|  2.27k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.27k|#  define MINBPC(enc) 2
  ------------------
  695|  2.27k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.27k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    432|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 432, False: 104k]
  ------------------
  697|    744|        sol:
  698|    744|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    744|#  define MINBPC(enc) 2
  ------------------
  699|    744|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    744|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    744|    {                                                                          \
  |  |  |  |  135|    744|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    744|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    744|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 737]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|    744|    }
  |  |  ------------------
  ------------------
  700|    737|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    737|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    737|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 728, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 722, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     15|            *nextTokPtr = ptr;
  702|     15|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  703|     15|          }
  704|    722|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    722|#  define MINBPC(enc) 2
  ------------------
  705|    722|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    722|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      8|        default:
  ------------------
  |  Branch (706:9): [True: 8, False: 104k]
  ------------------
  707|      8|          *nextTokPtr = ptr;
  708|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  709|   104k|        }
  710|   101k|        break;
  711|   104k|      }
  712|   101k|      break;
  713|   102k|    }
  714|   101k|    default:
  ------------------
  |  Branch (714:5): [True: 7, False: 110k]
  ------------------
  715|      7|      *nextTokPtr = ptr;
  716|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  717|   110k|    }
  718|   110k|  }
  719|     87|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     87|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.57k|}
xmltok.c:big2_scanRef:
  545|   214k|                const char **nextTokPtr) {
  546|   214k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   214k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   214k|    {                                                                          \
  |  |  |  |  135|   214k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   214k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   214k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 30, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  136|     30|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     30|      }                                                                        \
  |  |  |  |  138|   214k|    }
  |  |  ------------------
  ------------------
  547|   214k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   214k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   214k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   210k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 210k, False: 3.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  11.4k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   202k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.47k, False: 210k]
  |  |  ------------------
  |  |  111|   202k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.47k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.47k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.47k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 9, False: 3.46k]
  |  |  ------------------
  |  |  112|      9|      *nextTokPtr = ptr;                                                       \
  |  |  113|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      9|    }                                                                          \
  |  |  115|   202k|    /* fall through */                                                         \
  |  |  116|   202k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.53k, False: 209k]
  |  |  ------------------
  |  |  117|   202k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 194k, False: 20.1k]
  |  |  ------------------
  |  |  118|   202k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   202k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   202k|    break;                                                                     \
  |  |  120|   202k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  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: 214k]
  |  |  |  |  ------------------
  |  |  |  |  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|      7|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 214k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      4|#    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|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  12.1k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 12.1k, False: 202k]
  ------------------
  550|  12.1k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.1k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.1k|#  define MINBPC(enc) 2
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 214k]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|   214k|  }
  555|   229k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   229k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   229k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   229k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   225k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 225k, False: 3.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   102k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  27.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.96k, False: 225k]
  |  |  ------------------
  |  |   82|  27.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  3.96k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  3.96k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.96k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 25, False: 3.93k]
  |  |  ------------------
  |  |   83|     25|      *nextTokPtr = ptr;                                                       \
  |  |   84|     25|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     25|    }                                                                          \
  |  |   86|  27.5k|    /* fall through */                                                         \
  |  |   87|  27.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 16.2k, False: 213k]
  |  |  ------------------
  |  |   88|  24.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.86k, False: 225k]
  |  |  ------------------
  |  |   89|  26.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 2.79k, False: 226k]
  |  |  ------------------
  |  |   90|  27.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 405, False: 229k]
  |  |  ------------------
  |  |   91|  27.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 378, False: 229k]
  |  |  ------------------
  |  |   92|  27.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  27.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  27.5k|    break;                                                                     \
  |  |   94|  27.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 229k]
  |  |  |  |  ------------------
  |  |  |  |   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: 229k]
  |  |  |  |  ------------------
  |  |  |  |   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|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 229k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   202k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 202k, False: 27.6k]
  ------------------
  559|   202k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   202k|#  define MINBPC(enc) 2
  ------------------
  560|   202k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   202k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      9|    default:
  ------------------
  |  Branch (561:5): [True: 9, False: 229k]
  ------------------
  562|      9|      *nextTokPtr = ptr;
  563|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  564|   229k|    }
  565|   229k|  }
  566|     59|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     59|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   202k|}
xmltok.c:big2_scanCharRef:
  514|  12.1k|                    const char **nextTokPtr) {
  515|  12.1k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  12.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  12.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  12.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 12.1k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  12.1k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  12.1k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  12.1k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 12.1k, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 10.1k, False: 2.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  10.1k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  10.1k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  10.1k|#  define MINBPC(enc) 2
  ------------------
  518|  2.03k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.03k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.03k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.02k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.02k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  2.00k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 2.00k, False: 23]
  ------------------
  520|  2.00k|      break;
  521|     23|    default:
  ------------------
  |  Branch (521:5): [True: 23, False: 2.00k]
  ------------------
  522|     23|      *nextTokPtr = ptr;
  523|     23|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  524|  2.03k|    }
  525|  4.95k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.00k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.95k|#  define MINBPC(enc) 2
  ------------------
  526|  4.95k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.95k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.95k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.93k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  2.95k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 2.95k, False: 1.99k]
  ------------------
  528|  2.95k|        break;
  529|  1.96k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.96k, False: 2.98k]
  ------------------
  530|  1.96k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.96k|#  define MINBPC(enc) 2
  ------------------
  531|  1.96k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.96k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     29|      default:
  ------------------
  |  Branch (532:7): [True: 29, False: 4.92k]
  ------------------
  533|     29|        *nextTokPtr = ptr;
  534|     29|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  535|  4.95k|      }
  536|  4.95k|    }
  537|  2.00k|  }
  538|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  12.1k|}
xmltok.c:big2_scanHexCharRef:
  483|  10.1k|                       const char **nextTokPtr) {
  484|  10.1k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  10.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  10.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 10.1k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  10.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.1k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  8.47k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 8.47k, False: 1.66k]
  ------------------
  487|  10.1k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.65k, False: 8.48k]
  ------------------
  488|  10.1k|      break;
  489|      7|    default:
  ------------------
  |  Branch (489:5): [True: 7, False: 10.1k]
  ------------------
  490|      7|      *nextTokPtr = ptr;
  491|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  492|  10.1k|    }
  493|  36.2k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.1k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  26.1k|#  define MINBPC(enc) 2
  ------------------
  494|  36.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  36.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  36.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 36.2k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  15.6k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 15.6k, False: 20.6k]
  ------------------
  496|  26.1k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 10.5k, False: 25.7k]
  ------------------
  497|  26.1k|        break;
  498|  10.0k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 10.0k, False: 26.1k]
  ------------------
  499|  10.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
  500|  10.0k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  10.0k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     32|      default:
  ------------------
  |  Branch (501:7): [True: 32, False: 36.2k]
  ------------------
  502|     32|        *nextTokPtr = ptr;
  503|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  504|  36.2k|      }
  505|  36.2k|    }
  506|  10.1k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  10.1k|}
xmltok.c:big2_cdataSectionTok:
  356|  52.2k|                        const char **nextTokPtr) {
  357|  52.2k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 143, False: 52.0k]
  ------------------
  358|    143|    return XML_TOK_NONE;
  ------------------
  |  |   51|    143|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  52.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  52.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  52.0k|    size_t n = end - ptr;
  361|  52.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  52.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 22.4k, False: 29.6k]
  ------------------
  362|  22.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  22.4k|#  define MINBPC(enc) 2
  ------------------
  363|  22.4k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 17, False: 22.4k]
  ------------------
  364|     17|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  22.4k|      end = ptr + n;
  366|  22.4k|    }
  367|  52.0k|  }
  368|  52.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  52.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  52.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  40.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 40.3k, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  16.9k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 16.9k, False: 35.1k]
  ------------------
  370|  16.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.9k|#  define MINBPC(enc) 2
  ------------------
  371|  16.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.9k|    {                                                                          \
  |  |  |  |  135|  16.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  16.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 16.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  16.9k|    }
  |  |  ------------------
  ------------------
  372|  16.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  16.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  16.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 15.3k, False: 1.58k]
  |  |  |  |  |  Branch (872:49): [True: 6.85k, False: 8.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  10.0k|      break;
  374|  6.85k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.85k|#  define MINBPC(enc) 2
  ------------------
  375|  6.85k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.85k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.85k|    {                                                                          \
  |  |  |  |  135|  6.85k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.85k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 6.85k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  6.85k|    }
  |  |  ------------------
  ------------------
  376|  6.85k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  6.85k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.85k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.20k, False: 647]
  |  |  |  |  |  Branch (872:49): [True: 426, False: 5.78k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  6.42k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  6.42k|#  define MINBPC(enc) 2
  ------------------
  378|  6.42k|      break;
  379|  6.42k|    }
  380|    426|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    426|#  define MINBPC(enc) 2
  ------------------
  381|    426|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    426|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  20.4k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 20.4k, False: 31.5k]
  ------------------
  383|  20.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  20.4k|#  define MINBPC(enc) 2
  ------------------
  384|  20.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.4k|    {                                                                          \
  |  |  |  |  135|  20.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  20.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 21, False: 20.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     21|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     21|      }                                                                        \
  |  |  |  |  138|  20.4k|    }
  |  |  ------------------
  ------------------
  385|  20.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  20.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  20.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.34k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.34k, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 283, False: 20.1k]
  ------------------
  386|    283|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    283|#  define MINBPC(enc) 2
  ------------------
  387|  20.4k|    *nextTokPtr = ptr;
  388|  20.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  20.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.22k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.22k, False: 50.8k]
  ------------------
  390|  1.22k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.22k|#  define MINBPC(enc) 2
  ------------------
  391|  1.22k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.22k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  17.3k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 52.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: 52.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|  8.68k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.62k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.68k, False: 43.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.68k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 58, False: 8.62k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.62k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     58|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.62k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.62k|#    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|  8.62k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.62k|    break;
  |  |  ------------------
  |  |   63|  8.62k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 35, False: 52.0k]
  |  |  ------------------
  |  |   64|     35|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 52.0k]
  |  |  ------------------
  |  |   65|     44|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 52.0k]
  |  |  ------------------
  |  |   66|     44|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     44|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     44|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.74k|  default:
  ------------------
  |  Branch (393:3): [True: 4.74k, False: 47.3k]
  ------------------
  394|  4.74k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.74k|#  define MINBPC(enc) 2
  ------------------
  395|  4.74k|    break;
  396|  52.0k|  }
  397|  1.30M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.30M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.30M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.30M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  52.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 52.2k, False: 1.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 1.30M]
  |  |  ------------------
  |  |  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: 1.30M]
  |  |  ------------------
  |  |  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|  8.86k|      LEAD_CASE(4)
  ------------------
  |  |  400|  8.80k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 8.86k, False: 1.29M]
  |  |  ------------------
  |  |  401|  8.86k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  8.80k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 54, False: 8.80k]
  |  |  ------------------
  |  |  402|     54|      *nextTokPtr = ptr;                                                       \
  |  |  403|     54|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     54|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     54|    }                                                                          \
  |  |  405|  8.80k|    ptr += n;                                                                  \
  |  |  406|  8.80k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     29|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 29, False: 1.30M]
  ------------------
  412|     29|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.30M]
  ------------------
  413|     34|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 1.30M]
  ------------------
  414|  17.9k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 17.9k, False: 1.28M]
  ------------------
  415|  18.9k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 975, False: 1.30M]
  ------------------
  416|  29.6k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 10.7k, False: 1.29M]
  ------------------
  417|  29.6k|      *nextTokPtr = ptr;
  418|  29.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  29.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.26M|    default:
  ------------------
  |  Branch (419:5): [True: 1.26M, False: 38.5k]
  ------------------
  420|  1.26M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.26M|#  define MINBPC(enc) 2
  ------------------
  421|  1.26M|      break;
  422|  1.30M|    }
  423|  1.30M|  }
  424|    131|  *nextTokPtr = ptr;
  425|    131|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    131|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  29.8k|}
xmltok.c:big2_attributeValueTok:
 1262|   273k|                          const char **nextTokPtr) {
 1263|   273k|  const char *start;
 1264|   273k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.63k, False: 270k]
  ------------------
 1265|  2.63k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.63k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   270k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   270k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   270k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   270k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 270k]
  ------------------
 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|   270k|  start = ptr;
 1275|  6.18M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  6.18M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.18M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.18M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   389k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 389k, False: 5.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 6.18M]
  |  |  ------------------
  |  | 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: 6.18M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  66.9k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  66.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 66.9k, False: 6.11M]
  |  |  ------------------
  |  | 1279|  66.9k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  66.9k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   152k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 152k, False: 6.03M]
  ------------------
 1286|   152k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 96.7k, False: 55.8k]
  ------------------
 1287|  96.7k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  96.7k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  96.7k|#  define MINBPC(enc) 2
  ------------------
 1288|  55.8k|      *nextTokPtr = ptr;
 1289|  55.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  55.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 6.18M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      1|      *nextTokPtr = ptr;
 1293|      1|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1294|  7.85k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 7.85k, False: 6.17M]
  ------------------
 1295|  7.85k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 4.22k, False: 3.63k]
  ------------------
 1296|  4.22k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.22k|#  define MINBPC(enc) 2
  ------------------
 1297|  4.22k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.22k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  4.22k|      }
 1299|  3.63k|      *nextTokPtr = ptr;
 1300|  3.63k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.63k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  88.8k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 88.8k, False: 6.09M]
  ------------------
 1302|  88.8k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 47.9k, False: 40.9k]
  ------------------
 1303|  47.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  47.9k|#  define MINBPC(enc) 2
  ------------------
 1304|  47.9k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  47.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  47.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  47.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 287, False: 47.6k]
  ------------------
 1305|    287|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    287|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  47.6k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  47.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  47.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  24.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 24.5k, False: 23.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 1.97k, False: 45.6k]
  ------------------
 1307|  1.97k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.97k|#  define MINBPC(enc) 2
  ------------------
 1308|  47.6k|        *nextTokPtr = ptr;
 1309|  47.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  47.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  47.9k|      }
 1311|  40.9k|      *nextTokPtr = ptr;
 1312|  40.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  40.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  20.0k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 20.0k, False: 6.16M]
  ------------------
 1314|  20.0k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 14.0k, False: 5.99k]
  ------------------
 1315|  14.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  14.0k|#  define MINBPC(enc) 2
  ------------------
 1316|  14.0k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  14.0k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  14.0k|      }
 1318|  5.99k|      *nextTokPtr = ptr;
 1319|  5.99k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.99k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  5.84M|    default:
  ------------------
  |  Branch (1320:5): [True: 5.84M, False: 336k]
  ------------------
 1321|  5.84M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.84M|#  define MINBPC(enc) 2
  ------------------
 1322|  5.84M|      break;
 1323|  6.18M|    }
 1324|  6.18M|  }
 1325|  1.27k|  *nextTokPtr = ptr;
 1326|  1.27k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.27k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   270k|}
xmltok.c:big2_entityValueTok:
 1331|  69.9k|                       const char **nextTokPtr) {
 1332|  69.9k|  const char *start;
 1333|  69.9k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.65k, False: 68.2k]
  ------------------
 1334|  1.65k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.65k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  68.2k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  68.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  68.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  68.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 68.2k]
  ------------------
 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|  68.2k|  start = ptr;
 1344|  23.9M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  23.9M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  23.9M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  23.9M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   143k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 143k, False: 23.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 23.9M]
  |  |  ------------------
  |  | 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: 23.9M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  46.0k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  46.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 46.0k, False: 23.9M]
  |  |  ------------------
  |  | 1348|  46.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  46.0k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  4.44k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 4.44k, False: 23.9M]
  ------------------
 1355|  4.44k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 2.37k, False: 2.06k]
  ------------------
 1356|  2.37k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.37k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.37k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.06k|      *nextTokPtr = ptr;
 1358|  2.06k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.06k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 23.9M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 1]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      5|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      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|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  6.61k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 6.61k, False: 23.9M]
  ------------------
 1367|  6.61k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 3.57k, False: 3.03k]
  ------------------
 1368|  3.57k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.57k|#  define MINBPC(enc) 2
  ------------------
 1369|  3.57k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.57k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  3.57k|      }
 1371|  3.03k|      *nextTokPtr = ptr;
 1372|  3.03k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.03k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  56.2k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 56.2k, False: 23.9M]
  ------------------
 1374|  56.2k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 29.6k, False: 26.6k]
  ------------------
 1375|  29.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  29.6k|#  define MINBPC(enc) 2
  ------------------
 1376|  29.6k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  29.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  29.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  29.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 208, False: 29.4k]
  ------------------
 1377|    208|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    208|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  29.4k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  29.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.93k, False: 21.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 511, False: 28.8k]
  ------------------
 1379|    511|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    511|#  define MINBPC(enc) 2
  ------------------
 1380|  29.4k|        *nextTokPtr = ptr;
 1381|  29.4k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  29.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  29.6k|      }
 1383|  26.6k|      *nextTokPtr = ptr;
 1384|  26.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  26.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  23.8M|    default:
  ------------------
  |  Branch (1385:5): [True: 23.8M, False: 113k]
  ------------------
 1386|  23.8M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  23.8M|#  define MINBPC(enc) 2
  ------------------
 1387|  23.8M|      break;
 1388|  23.9M|    }
 1389|  23.9M|  }
 1390|    940|  *nextTokPtr = ptr;
 1391|    940|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    940|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  68.2k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  22.6k|                         const char *end1, const char *ptr2) {
 1716|  22.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  94.9k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  72.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 82.9k, False: 12.0k]
  ------------------
 1718|  82.9k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  82.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 39, False: 82.8k]
  ------------------
 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|     39|      return 0; /* LCOV_EXCL_LINE */
 1725|     39|    }
 1726|  82.8k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  82.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  82.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 82.8k, False: 35]
  |  |  |  |  |  Branch (872:49): [True: 72.3k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  10.5k|      return 0;
 1728|  82.8k|  }
 1729|  12.0k|  return ptr1 == end1;
 1730|  22.6k|}
xmltok.c:big2_nameLength:
 1733|  15.6k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  15.6k|  const char *start = ptr;
 1735|   533k|  for (;;) {
 1736|   533k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   533k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   533k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 33.0k, False: 500k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 533k]
  |  |  ------------------
  |  | 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: 533k]
  |  |  ------------------
  |  | 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: 533k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   500k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 500k, False: 33.0k]
  ------------------
 1746|   512k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 12.0k, False: 520k]
  ------------------
 1747|   512k|#  ifdef XML_NS
 1748|   512k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 533k]
  ------------------
 1749|   512k|#  endif
 1750|   517k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 5.00k, False: 528k]
  ------------------
 1751|   517k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 101, False: 532k]
  ------------------
 1752|   517k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 2, False: 533k]
  ------------------
 1753|   517k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 193, False: 532k]
  ------------------
 1754|   517k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   517k|#  define MINBPC(enc) 2
  ------------------
 1755|   517k|      break;
 1756|  15.6k|    default:
  ------------------
  |  Branch (1756:5): [True: 15.6k, False: 517k]
  ------------------
 1757|  15.6k|      return (int)(ptr - start);
 1758|   533k|    }
 1759|   533k|  }
 1760|  15.6k|}
xmltok.c:big2_getAtts:
 1510|  10.3k|                ATTRIBUTE *atts) {
 1511|  10.3k|  enum { other, inName, inValue } state = inName;
 1512|  10.3k|  int nAtts = 0;
 1513|  10.3k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  11.1M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.3k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.1M|#  define MINBPC(enc) 2
  ------------------
 1517|  11.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  11.1M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  11.1M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.20M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.20M, False: 8.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.1M]
  |  |  ------------------
  |  | 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: 11.1M]
  |  |  ------------------
  |  | 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|  83.3k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  83.3k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 83.3k, False: 11.0M]
  |  |  ------------------
  |  | 1528|  83.3k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  83.3k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 83.3k]
  |  |  |  |  ------------------
  |  |  |  | 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|  83.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  83.3k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  8.85M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 8.85M, False: 2.29M]
  ------------------
 1535|  9.08M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 237k, False: 10.9M]
  ------------------
 1536|  9.27M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 188k, False: 10.9M]
  ------------------
 1537|  9.27M|      START_NAME
  ------------------
  |  | 1519|  9.27M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 203k, False: 9.07M]
  |  |  ------------------
  |  | 1520|   203k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 104k, False: 98.0k]
  |  |  ------------------
  |  | 1521|   104k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   104k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   104k|      }                                                                        \
  |  | 1524|   203k|      state = inName;                                                          \
  |  | 1525|   203k|    }
  ------------------
 1538|  9.27M|      break;
 1539|      0|#  undef START_NAME
 1540|   148k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 148k, False: 10.9M]
  ------------------
 1541|   148k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 68.2k, False: 79.9k]
  ------------------
 1542|  68.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 35.8k, False: 32.4k]
  ------------------
 1543|  35.8k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  35.8k|#  define MINBPC(enc) 2
  ------------------
 1544|  68.2k|        state = inValue;
 1545|  68.2k|        open = BT_QUOT;
 1546|  79.9k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 68.2k, False: 11.7k]
  ------------------
 1547|  68.2k|        state = other;
 1548|  68.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 35.8k, False: 32.4k]
  ------------------
 1549|  35.8k|          atts[nAtts].valueEnd = ptr;
 1550|  68.2k|        nAtts++;
 1551|  68.2k|      }
 1552|   148k|      break;
 1553|   273k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 273k, False: 10.8M]
  ------------------
 1554|   273k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 134k, False: 138k]
  ------------------
 1555|   134k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 69.1k, False: 65.6k]
  ------------------
 1556|  69.1k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  69.1k|#  define MINBPC(enc) 2
  ------------------
 1557|   134k|        state = inValue;
 1558|   134k|        open = BT_APOS;
 1559|   138k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 134k, False: 3.50k]
  ------------------
 1560|   134k|        state = other;
 1561|   134k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 69.1k, False: 65.6k]
  ------------------
 1562|  69.1k|          atts[nAtts].valueEnd = ptr;
 1563|   134k|        nAtts++;
 1564|   134k|      }
 1565|   273k|      break;
 1566|   105k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 105k, False: 11.0M]
  ------------------
 1567|   105k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 101k, False: 3.81k]
  ------------------
 1568|   101k|        atts[nAtts].normalized = 0;
 1569|   105k|      break;
 1570|   425k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 425k, False: 10.7M]
  ------------------
 1571|   425k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 3.15k, False: 422k]
  ------------------
 1572|  3.15k|        state = other;
 1573|   422k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 280k, False: 142k]
  |  Branch (1573:36): [True: 148k, False: 131k]
  |  Branch (1573:55): [True: 68.7k, False: 79.9k]
  ------------------
 1574|   422k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 13.7k, False: 54.9k]
  ------------------
 1575|  68.7k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  54.9k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  54.9k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 54.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   123k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 2.88k, False: 52.0k]
  ------------------
 1576|  68.7k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  52.0k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  52.0k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 45.5k, False: 6.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   120k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 28.4k, False: 23.5k]
  ------------------
 1577|  68.7k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  23.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  23.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.0k, False: 6.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 14.4k, False: 9.18k]
  ------------------
 1578|  59.5k|        atts[nAtts].normalized = 0;
 1579|   425k|      break;
 1580|   144k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 144k, False: 11.0M]
  ------------------
 1581|   220k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 76.5k, False: 11.0M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   220k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.84k, False: 219k]
  ------------------
 1585|  1.84k|        state = other;
 1586|   219k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 158k, False: 60.2k]
  |  Branch (1586:36): [True: 106k, False: 51.9k]
  ------------------
 1587|   106k|        atts[nAtts].normalized = 0;
 1588|   220k|      break;
 1589|   120k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 120k, False: 11.0M]
  ------------------
 1590|   123k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 3.37k, False: 11.1M]
  ------------------
 1591|   123k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.3k, False: 113k]
  ------------------
 1592|  10.3k|        return nAtts;
 1593|   113k|      break;
 1594|   486k|    default:
  ------------------
  |  Branch (1594:5): [True: 486k, False: 10.6M]
  ------------------
 1595|   486k|      break;
 1596|  11.1M|    }
 1597|  11.1M|  }
 1598|       |  /* not reached */
 1599|  10.3k|}
xmltok.c:big2_charRefNumber:
 1602|  7.66k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  7.66k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  7.66k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.66k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  7.66k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  7.66k|#  define MINBPC(enc) 2
  ------------------
 1607|  7.66k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  7.66k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.66k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.66k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 6.38k, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  30.1k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  6.38k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  30.1k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  30.1k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 30.1k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 6.35k, False: 23.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  23.7k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  23.7k|#  define MINBPC(enc) 2
  ------------------
 1610|  23.7k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  23.7k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  23.7k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 23.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  23.7k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 23.7k]
  ------------------
 1612|    404|      case ASCII_0:
  ------------------
  |  |   90|    404|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 404, False: 23.3k]
  ------------------
 1613|  2.57k|      case ASCII_1:
  ------------------
  |  |   91|  2.57k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 2.17k, False: 21.6k]
  ------------------
 1614|  8.02k|      case ASCII_2:
  ------------------
  |  |   92|  8.02k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 5.44k, False: 18.3k]
  ------------------
 1615|  8.36k|      case ASCII_3:
  ------------------
  |  |   93|  8.36k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 340, False: 23.4k]
  ------------------
 1616|  8.79k|      case ASCII_4:
  ------------------
  |  |   94|  8.79k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 426, False: 23.3k]
  ------------------
 1617|  11.8k|      case ASCII_5:
  ------------------
  |  |   95|  11.8k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 3.07k, False: 20.7k]
  ------------------
 1618|  12.6k|      case ASCII_6:
  ------------------
  |  |   96|  12.6k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 758, False: 23.0k]
  ------------------
 1619|  13.1k|      case ASCII_7:
  ------------------
  |  |   97|  13.1k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 533, False: 23.2k]
  ------------------
 1620|  14.3k|      case ASCII_8:
  ------------------
  |  |   98|  14.3k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 1.15k, False: 22.6k]
  ------------------
 1621|  15.4k|      case ASCII_9:
  ------------------
  |  |   99|  15.4k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.16k, False: 22.6k]
  ------------------
 1622|  15.4k|        result <<= 4;
 1623|  15.4k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  15.4k|#define ASCII_0 0x30
  ------------------
 1624|  15.4k|        break;
 1625|    521|      case ASCII_A:
  ------------------
  |  |   36|    521|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 521, False: 23.2k]
  ------------------
 1626|  3.03k|      case ASCII_B:
  ------------------
  |  |   37|  3.03k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 2.51k, False: 21.2k]
  ------------------
 1627|  3.37k|      case ASCII_C:
  ------------------
  |  |   38|  3.37k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 336, False: 23.4k]
  ------------------
 1628|  3.73k|      case ASCII_D:
  ------------------
  |  |   39|  3.73k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 358, False: 23.4k]
  ------------------
 1629|  4.15k|      case ASCII_E:
  ------------------
  |  |   40|  4.15k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 425, False: 23.3k]
  ------------------
 1630|  4.94k|      case ASCII_F:
  ------------------
  |  |   41|  4.94k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 786, False: 22.9k]
  ------------------
 1631|  4.94k|        result <<= 4;
 1632|  4.94k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.94k|#define ASCII_A 0x41
  ------------------
 1633|  4.94k|        break;
 1634|    420|      case ASCII_a:
  ------------------
  |  |   63|    420|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 420, False: 23.3k]
  ------------------
 1635|  1.50k|      case ASCII_b:
  ------------------
  |  |   64|  1.50k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 1.08k, False: 22.6k]
  ------------------
 1636|  2.09k|      case ASCII_c:
  ------------------
  |  |   65|  2.09k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 584, False: 23.2k]
  ------------------
 1637|  2.44k|      case ASCII_d:
  ------------------
  |  |   66|  2.44k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 357, False: 23.4k]
  ------------------
 1638|  3.10k|      case ASCII_e:
  ------------------
  |  |   67|  3.10k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 654, False: 23.1k]
  ------------------
 1639|  3.37k|      case ASCII_f:
  ------------------
  |  |   68|  3.37k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 271, False: 23.5k]
  ------------------
 1640|  3.37k|        result <<= 4;
 1641|  3.37k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.37k|#define ASCII_a 0x61
  ------------------
 1642|  3.37k|        break;
 1643|  23.7k|      }
 1644|  23.7k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 26, False: 23.7k]
  ------------------
 1645|     26|        return -1;
 1646|  23.7k|    }
 1647|  6.38k|  } else {
 1648|  4.54k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  4.54k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.54k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.54k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1.27k, False: 3.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.26k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.26k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  3.26k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.26k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.26k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.26k|      result *= 10;
 1651|  3.26k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.26k|#define ASCII_0 0x30
  ------------------
 1652|  3.26k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 3, False: 3.26k]
  ------------------
 1653|      3|        return -1;
 1654|  3.26k|    }
 1655|  1.28k|  }
 1656|  7.63k|  return checkCharRefNumber(result);
 1657|  7.66k|}
xmltok.c:big2_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)) {
  ------------------
  |  |  916|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 97.6k, False: 6.80k]
  ------------------
 1664|  1.72k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.72k, False: 102k]
  ------------------
 1665|  1.72k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.72k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.72k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.29k, False: 432]
  |  |  |  |  |  Branch (872:49): [True: 963, False: 331]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    963|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    963|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    963|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 221, False: 742]
  |  |  |  |  |  Branch (871:32): [True: 763, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    692|      case ASCII_l:
  ------------------
  |  |   74|    692|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 692, False: 271]
  ------------------
 1668|    692|        return ASCII_LT;
  ------------------
  |  |  111|    692|#define ASCII_LT 0x3C
  ------------------
 1669|     50|      case ASCII_g:
  ------------------
  |  |   69|     50|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 50, False: 913]
  ------------------
 1670|     50|        return ASCII_GT;
  ------------------
  |  |  113|     50|#define ASCII_GT 0x3E
  ------------------
 1671|    963|      }
 1672|    963|    }
 1673|    984|    break;
 1674|  1.57k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.57k, False: 102k]
  ------------------
 1675|  1.57k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.57k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.57k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.36k, False: 209]
  |  |  |  |  |  Branch (872:49): [True: 1.04k, False: 314]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.04k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.04k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.04k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.04k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.04k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 817, False: 232]
  |  |  |  |  |  Branch (872:49): [True: 603, False: 214]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    603|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    603|#  define MINBPC(enc) 2
  ------------------
 1679|    603|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    603|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    603|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 408, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 209, False: 199]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    209|          return ASCII_AMP;
  ------------------
  |  |  105|    209|#define ASCII_AMP 0x26
  ------------------
 1681|    603|      }
 1682|  1.04k|    }
 1683|  1.36k|    break;
 1684|  3.50k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.50k, False: 100k]
  ------------------
 1685|  3.50k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.50k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.50k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 242, False: 3.26k]
  |  |  |  |  |  Branch (871:32): [True: 3.28k, False: 225]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.73k|    case ASCII_q:
  ------------------
  |  |   79|  1.73k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.73k, False: 1.77k]
  ------------------
 1687|  1.73k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.73k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.73k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.73k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.73k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.53k, False: 194]
  |  |  |  |  |  Branch (872:49): [True: 1.33k, False: 199]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.33k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.33k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.33k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.33k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.33k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.13k, False: 204]
  |  |  |  |  |  Branch (872:49): [True: 941, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    941|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    941|#  define MINBPC(enc) 2
  ------------------
 1692|    941|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    941|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    941|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 736, False: 205]
  |  |  |  |  |  Branch (872:49): [True: 534, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    534|            return ASCII_QUOT;
  ------------------
  |  |  104|    534|#define ASCII_QUOT 0x22
  ------------------
 1694|    941|        }
 1695|  1.33k|      }
 1696|  1.19k|      break;
 1697|  1.53k|    case ASCII_a:
  ------------------
  |  |   63|  1.53k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.53k, False: 1.97k]
  ------------------
 1698|  1.53k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.53k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.53k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  1.53k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.53k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.33k, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 1.11k, False: 219]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.11k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.11k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  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: 916, False: 197]
  |  |  |  |  |  Branch (872:49): [True: 721, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    721|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    721|#  define MINBPC(enc) 2
  ------------------
 1703|    721|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    721|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    721|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 515, False: 206]
  |  |  |  |  |  Branch (872:49): [True: 317, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    317|            return ASCII_APOS;
  ------------------
  |  |  106|    317|#define ASCII_APOS 0x27
  ------------------
 1705|    721|        }
 1706|  1.11k|      }
 1707|  1.21k|      break;
 1708|  3.50k|    }
 1709|   104k|  }
 1710|   102k|  return 0;
 1711|   104k|}
xmltok.c:big2_updatePosition:
 1779|  3.56k|                       POSITION *pos) {
 1780|  7.53M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  7.53M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.53M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.53M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   582k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 582k, False: 6.95M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 7.53M]
  |  |  ------------------
  |  | 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: 7.53M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  90.3k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  90.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 90.3k, False: 7.44M]
  |  |  ------------------
  |  | 1784|  90.3k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  90.3k|    pos->columnNumber++;                                                       \
  |  | 1786|  90.3k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  10.5k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 10.5k, False: 7.52M]
  ------------------
 1792|  10.5k|      pos->columnNumber = 0;
 1793|  10.5k|      pos->lineNumber++;
 1794|  10.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  10.5k|#  define MINBPC(enc) 2
  ------------------
 1795|  10.5k|      break;
 1796|  77.4k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 77.4k, False: 7.46M]
  ------------------
 1797|  77.4k|      pos->lineNumber++;
 1798|  77.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  77.4k|#  define MINBPC(enc) 2
  ------------------
 1799|  77.4k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  77.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   154k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  77.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 77.4k, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  77.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  77.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 41.9k, False: 35.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.60k, False: 74.8k]
  ------------------
 1800|  2.60k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.60k|#  define MINBPC(enc) 2
  ------------------
 1801|  77.4k|      pos->columnNumber = 0;
 1802|  77.4k|      break;
 1803|  7.35M|    default:
  ------------------
  |  Branch (1803:5): [True: 7.35M, False: 178k]
  ------------------
 1804|  7.35M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.35M|#  define MINBPC(enc) 2
  ------------------
 1805|  7.35M|      pos->columnNumber++;
 1806|  7.35M|      break;
 1807|  7.53M|    }
 1808|  7.53M|  }
 1809|  3.56k|}
xmltok.c:big2_isPublicId:
 1450|  1.22k|                   const char **badPtr) {
 1451|  1.22k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.22k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.22k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.22k|#  define MINBPC(enc) 2
  ------------------
 1453|  8.53k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.50k|#  define MINBPC(enc) 2
  ------------------
 1454|  8.53k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.53k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.53k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.51k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.51k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    199|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 199, False: 8.34k]
  ------------------
 1456|    712|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 513, False: 8.02k]
  ------------------
 1457|    908|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 196, False: 8.34k]
  ------------------
 1458|  1.10k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 199, False: 8.34k]
  ------------------
 1459|  1.40k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 300, False: 8.23k]
  ------------------
 1460|  1.60k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 201, False: 8.33k]
  ------------------
 1461|  2.05k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 447, False: 8.09k]
  ------------------
 1462|  2.27k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 218, False: 8.32k]
  ------------------
 1463|  2.47k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 201, False: 8.33k]
  ------------------
 1464|  2.67k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 199, False: 8.34k]
  ------------------
 1465|  2.87k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 199, False: 8.34k]
  ------------------
 1466|  3.11k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 245, False: 8.29k]
  ------------------
 1467|  3.36k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 248, False: 8.29k]
  ------------------
 1468|  3.61k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 249, False: 8.29k]
  ------------------
 1469|  4.70k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 1.09k, False: 7.44k]
  ------------------
 1470|  5.96k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 1.26k, False: 7.27k]
  ------------------
 1471|  6.16k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 202, False: 8.33k]
  ------------------
 1472|  6.36k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 195, False: 8.34k]
  ------------------
 1473|  6.36k|#  ifdef XML_NS
 1474|  6.36k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 8.53k]
  ------------------
 1475|  6.36k|#  endif
 1476|  6.36k|      break;
 1477|    267|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 267, False: 8.27k]
  ------------------
 1478|    267|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    267|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    267|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 267, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 266]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    266|      break;
 1483|    266|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 237, False: 8.30k]
  ------------------
 1484|    647|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 410, False: 8.12k]
  ------------------
 1485|    647|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|    647|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    647|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 647, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 638, False: 9]
  ------------------
 1486|    638|        break;
 1487|       |      /* fall through */
 1488|  1.27k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.26k, False: 7.27k]
  ------------------
 1489|  1.27k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.27k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.27k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.25k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    196|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 196, False: 1.07k]
  ------------------
 1491|  1.23k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 1.03k, False: 233]
  ------------------
 1492|  1.23k|        break;
 1493|     37|      default:
  ------------------
  |  Branch (1493:7): [True: 37, False: 1.23k]
  ------------------
 1494|     37|        *badPtr = ptr;
 1495|     37|        return 0;
 1496|  1.27k|      }
 1497|  1.23k|      break;
 1498|  8.53k|    }
 1499|  8.53k|  }
 1500|  1.18k|  return 1;
 1501|  1.22k|}

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

