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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.4k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.4k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.4k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.4k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.4k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.4k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.4k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.4k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.4k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.4k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.4k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.4k|  return key;
  152|  19.4k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.4k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.4k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.4k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.4k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.4k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.4k|sip24_final(struct siphash *H) {
  232|  19.4k|  const char left = (char)(H->p - H->buf);
  233|  19.4k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.4k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.4k]
  ------------------
  236|  1.24k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.24k, False: 18.2k]
  ------------------
  237|  1.24k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.83k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.58k, False: 15.9k]
  ------------------
  240|  4.83k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  5.99k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.16k, False: 18.3k]
  ------------------
  243|  5.99k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  9.80k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.81k, False: 15.6k]
  ------------------
  246|  9.80k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.2k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.40k, False: 18.0k]
  ------------------
  249|  11.2k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.5k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.38k, False: 16.1k]
  ------------------
  252|  14.5k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.8k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.25k, False: 18.2k]
  ------------------
  255|  15.8k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.4k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.63k, False: 15.8k]
  ------------------
  258|  19.4k|    break;
  259|  19.4k|  }
  260|       |
  261|  19.4k|  H->v3 ^= b;
  262|  19.4k|  sip_round(H, 2);
  263|  19.4k|  H->v0 ^= b;
  264|  19.4k|  H->v2 ^= 0xff;
  265|  19.4k|  sip_round(H, 4);
  266|       |
  267|  19.4k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.4k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  42.4M|sip_round(struct siphash *H, const int rounds) {
  168|  42.4M|  int i;
  169|       |
  170|   127M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 85.0M, False: 42.4M]
  ------------------
  171|  85.0M|    H->v0 += H->v1;
  172|  85.0M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  85.0M|    H->v1 ^= H->v0;
  174|  85.0M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  85.0M|    H->v2 += H->v3;
  177|  85.0M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  85.0M|    H->v3 ^= H->v2;
  179|       |
  180|  85.0M|    H->v0 += H->v3;
  181|  85.0M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  85.0M|    H->v3 ^= H->v0;
  183|       |
  184|  85.0M|    H->v2 += H->v1;
  185|  85.0M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  85.0M|    H->v1 ^= H->v2;
  187|  85.0M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  85.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  85.0M|  }
  189|  42.4M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.4k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.4k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.4k|  uint64_t m;
  210|       |
  211|  42.4M|  do {
  212|   382M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   382M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 382M, False: 19.4k]
  |  Branch (212:22): [True: 339M, False: 42.4M]
  ------------------
  213|   339M|      *H->p++ = *p++;
  214|       |
  215|  42.4M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  42.4M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.8k, False: 42.4M]
  ------------------
  216|  15.8k|      break;
  217|       |
  218|  42.4M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  42.4M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  42.4M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  42.4M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  42.4M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  42.4M|    H->v3 ^= m;
  220|  42.4M|    sip_round(H, 2);
  221|  42.4M|    H->v0 ^= m;
  222|       |
  223|  42.4M|    H->p = H->buf;
  224|  42.4M|    H->c += 8;
  225|  42.4M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 42.4M, False: 3.63k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.4k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.4k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.4k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.4k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.4k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.4k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.4k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.4k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.4k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.4k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.4k|  H->p = H->buf;
  199|  19.4k|  H->c = 0;
  200|       |
  201|  19.4k|  return H;
  202|  19.4k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  6.89M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  6.89M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  6.89M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  6.89M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  6.89M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  6.89M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  6.89M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  6.89M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  6.89M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  6.89M|  H->p = H->buf;
  199|  6.89M|  H->c = 0;
  200|       |
  201|  6.89M|  return H;
  202|  6.89M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  6.89M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  6.89M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  6.89M|  uint64_t m;
  210|       |
  211|  7.80M|  do {
  212|  39.0M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  32.1M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 32.1M, False: 6.89M]
  |  Branch (212:22): [True: 31.2M, False: 907k]
  ------------------
  213|  31.2M|      *H->p++ = *p++;
  214|       |
  215|  7.80M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  7.80M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 6.88M, False: 918k]
  ------------------
  216|  6.88M|      break;
  217|       |
  218|   918k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   918k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   918k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   918k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   918k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   918k|    H->v3 ^= m;
  220|   918k|    sip_round(H, 2);
  221|   918k|    H->v0 ^= m;
  222|       |
  223|   918k|    H->p = H->buf;
  224|   918k|    H->c += 8;
  225|   918k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 907k, False: 11.0k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  6.89M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  14.7M|sip_round(struct siphash *H, const int rounds) {
  168|  14.7M|  int i;
  169|       |
  170|  57.9M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 43.2M, False: 14.7M]
  ------------------
  171|  43.2M|    H->v0 += H->v1;
  172|  43.2M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  43.2M|    H->v1 ^= H->v0;
  174|  43.2M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  43.2M|    H->v2 += H->v3;
  177|  43.2M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  43.2M|    H->v3 ^= H->v2;
  179|       |
  180|  43.2M|    H->v0 += H->v3;
  181|  43.2M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  43.2M|    H->v3 ^= H->v0;
  183|       |
  184|  43.2M|    H->v2 += H->v1;
  185|  43.2M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  43.2M|    H->v1 ^= H->v2;
  187|  43.2M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  43.2M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  43.2M|  }
  189|  14.7M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  6.89M|sip24_final(struct siphash *H) {
  232|  6.89M|  const char left = (char)(H->p - H->buf);
  233|  6.89M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  6.89M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 6.89M]
  ------------------
  236|  19.3k|  case 7:
  ------------------
  |  Branch (236:3): [True: 19.3k, False: 6.87M]
  ------------------
  237|  19.3k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  3.33M|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.31M, False: 3.58M]
  ------------------
  240|  3.33M|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  3.34M|  case 5:
  ------------------
  |  Branch (242:3): [True: 9.54k, False: 6.88M]
  ------------------
  243|  3.34M|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  3.35M|  case 4:
  ------------------
  |  Branch (245:3): [True: 15.4k, False: 6.88M]
  ------------------
  246|  3.35M|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  3.41M|  case 3:
  ------------------
  |  Branch (248:3): [True: 51.1k, False: 6.84M]
  ------------------
  249|  3.41M|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  3.50M|  case 2:
  ------------------
  |  Branch (251:3): [True: 98.7k, False: 6.79M]
  ------------------
  252|  3.50M|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  6.88M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.37M, False: 3.52M]
  ------------------
  255|  6.88M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  6.89M|  case 0:
  ------------------
  |  Branch (257:3): [True: 11.3k, False: 6.88M]
  ------------------
  258|  6.89M|    break;
  259|  6.89M|  }
  260|       |
  261|  6.89M|  H->v3 ^= b;
  262|  6.89M|  sip_round(H, 2);
  263|  6.89M|  H->v0 ^= b;
  264|  6.89M|  H->v2 ^= 0xff;
  265|  6.89M|  sip_round(H, 4);
  266|       |
  267|  6.89M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  6.89M|} /* sip24_final() */

XML_ParserCreate:
  719|  19.4k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  19.4k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  19.4k|}
XML_ParserCreate_MM:
  970|  19.4k|                    const XML_Char *nameSep) {
  971|  19.4k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  19.4k|}
XML_ParserFree:
 1441|  19.4k|XML_ParserFree(XML_Parser parser) {
 1442|  19.4k|  TAG *tagList;
 1443|  19.4k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  19.4k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 19.4k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  19.4k|  tagList = parser->m_tagStack;
 1448|  2.38M|  for (;;) {
 1449|  2.38M|    TAG *p;
 1450|  2.38M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 19.7k, False: 2.36M]
  ------------------
 1451|  19.7k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 19.4k, False: 260]
  ------------------
 1452|  19.4k|        break;
 1453|    260|      tagList = parser->m_freeTagList;
 1454|    260|      parser->m_freeTagList = NULL;
 1455|    260|    }
 1456|  2.36M|    p = tagList;
 1457|  2.36M|    tagList = tagList->parent;
 1458|  2.36M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  2.36M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  2.36M|    destroyBindings(p->bindings, parser);
 1460|  2.36M|    FREE(parser, p);
  ------------------
  |  |  716|  2.36M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  2.36M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  19.4k|  entityList = parser->m_openInternalEntities;
 1464|  21.3k|  for (;;) {
 1465|  21.3k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  21.3k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 20.0k, False: 1.30k]
  ------------------
 1467|  20.0k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 19.4k, False: 580]
  ------------------
 1468|  19.4k|        break;
 1469|    580|      entityList = parser->m_freeInternalEntities;
 1470|    580|      parser->m_freeInternalEntities = NULL;
 1471|    580|    }
 1472|  1.88k|    openEntity = entityList;
 1473|  1.88k|    entityList = entityList->next;
 1474|  1.88k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  1.88k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  1.88k|  }
 1476|       |
 1477|  19.4k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  19.4k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  19.4k|  poolDestroy(&parser->m_tempPool);
 1480|  19.4k|  poolDestroy(&parser->m_temp2Pool);
 1481|  19.4k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  19.4k|#ifdef XML_DTD
 1483|       |  /* external parameter entity parsers share the DTD structure
 1484|       |     parser->m_dtd with the root parser, so we must not destroy it
 1485|       |  */
 1486|  19.4k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 19.4k, False: 0]
  |  Branch (1486:36): [True: 19.4k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  19.4k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  19.4k|               &parser->m_mem);
 1492|  19.4k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1493|       |#ifdef XML_ATTR_INFO
 1494|       |  FREE(parser, (void *)parser->m_attInfo);
 1495|       |#endif
 1496|  19.4k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.4k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.4k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.4k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.4k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  19.4k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 19.4k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  19.4k|  FREE(parser, parser);
  ------------------
  |  |  716|  19.4k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  19.4k|}
XML_SetElementHandler:
 1596|  19.4k|                      XML_EndElementHandler end) {
 1597|  19.4k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 19.4k]
  ------------------
 1598|      0|    return;
 1599|  19.4k|  parser->m_startElementHandler = start;
 1600|  19.4k|  parser->m_endElementHandler = end;
 1601|  19.4k|}
XML_SetHashSalt:
 1816|  19.4k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  19.4k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 19.4k]
  ------------------
 1818|      0|    return 0;
 1819|  19.4k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 19.4k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  19.4k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 19.4k]
  ------------------
 1823|  19.4k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 19.4k]
  ------------------
 1824|      0|    return 0;
 1825|  19.4k|  parser->m_hash_secret_salt = hash_salt;
 1826|  19.4k|  return 1;
 1827|  19.4k|}
XML_ParseBuffer:
 1984|  19.4k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  19.4k|  const char *start;
 1986|  19.4k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.4k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  19.4k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 19.4k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  19.4k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 19.4k]
  ------------------
 1992|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1993|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1994|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1994:3): [True: 0, False: 19.4k]
  ------------------
 1995|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1996|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1997|  19.4k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 19.4k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  19.4k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 19.4k]
  ------------------
 2000|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2001|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2002|      0|    }
 2003|       |
 2004|  19.4k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 19.4k, False: 0]
  |  Branch (2004:43): [True: 0, False: 19.4k]
  ------------------
 2005|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2006|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2007|      0|    }
 2008|       |    /* fall through */
 2009|  19.4k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 19.4k]
  ------------------
 2010|  19.4k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  19.4k|  }
 2012|       |
 2013|  19.4k|  start = parser->m_bufferPtr;
 2014|  19.4k|  parser->m_positionPtr = start;
 2015|  19.4k|  parser->m_bufferEnd += len;
 2016|  19.4k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  19.4k|  parser->m_parseEndByteIndex += len;
 2018|  19.4k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  19.4k|  parser->m_errorCode = parser->m_processor(
 2021|  19.4k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  19.4k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 8.04k, False: 11.4k]
  ------------------
 2024|  8.04k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  8.04k|    parser->m_processor = errorProcessor;
 2026|  8.04k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  8.04k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  11.4k|  } else {
 2028|  11.4k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 11.4k]
  ------------------
 2030|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2031|      0|      break;
 2032|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2032:5): [True: 0, False: 11.4k]
  ------------------
 2033|  11.4k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 11.4k, False: 0]
  ------------------
 2034|  11.4k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 11.4k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  11.4k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 11.4k]
  ------------------
 2039|  11.4k|    }
 2040|  11.4k|  }
 2041|       |
 2042|  11.4k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.4k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  11.4k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  11.4k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  11.4k|  return result;
 2046|  19.4k|}
XML_GetBuffer:
 2049|  19.4k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  19.4k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 19.4k]
  ------------------
 2051|      0|    return NULL;
 2052|  19.4k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 19.4k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  19.4k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 19.4k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 19.4k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  19.4k|  default:;
  ------------------
  |  Branch (2063:3): [True: 19.4k, False: 0]
  ------------------
 2064|  19.4k|  }
 2065|       |
 2066|  19.4k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  19.4k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.4k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 19.4k, False: 0]
  ------------------
 2067|  19.4k|#ifdef XML_CONTEXT_BYTES
 2068|  19.4k|    int keep;
 2069|  19.4k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  19.4k|    int neededSize = (int)((unsigned)len
 2072|  19.4k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  19.4k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.4k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  19.4k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  19.4k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 19.4k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  19.4k|#ifdef XML_CONTEXT_BYTES
 2079|  19.4k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  19.4k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.4k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  19.4k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  19.4k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 19.4k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  19.4k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 19.4k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  19.4k|    neededSize += keep;
 2088|  19.4k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  19.4k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 19.4k]
  ------------------
 2090|  19.4k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  19.4k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.4k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|#ifdef XML_CONTEXT_BYTES
 2092|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        int offset
 2094|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|      0|              - keep;
 2096|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2097|       |         * in the buffer */
 2098|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2099|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2100|      0|        parser->m_bufferEnd -= offset;
 2101|      0|        parser->m_bufferPtr -= offset;
 2102|      0|      }
 2103|       |#else
 2104|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2105|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2106|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2107|       |        parser->m_bufferEnd
 2108|       |            = parser->m_buffer
 2109|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2110|       |        parser->m_bufferPtr = parser->m_buffer;
 2111|       |      }
 2112|       |#endif /* not defined XML_CONTEXT_BYTES */
 2113|  19.4k|    } else {
 2114|  19.4k|      char *newBuf;
 2115|  19.4k|      int bufferSize
 2116|  19.4k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  19.4k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.4k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  19.4k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 19.4k, False: 0]
  ------------------
 2118|  19.4k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  19.4k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  30.6k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  30.6k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  30.6k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 11.1k, False: 19.4k]
  |  Branch (2122:43): [True: 11.1k, False: 0]
  ------------------
 2123|  19.4k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 19.4k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  19.4k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  19.4k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  19.4k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 19.4k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  19.4k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  19.4k|#ifdef XML_CONTEXT_BYTES
 2134|  19.4k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 19.4k]
  ------------------
 2135|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2136|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2137|      0|                   + keep);
 2138|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2139|      0|        parser->m_buffer = newBuf;
 2140|      0|        parser->m_bufferEnd
 2141|      0|            = parser->m_buffer
 2142|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2143|      0|              + keep;
 2144|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2145|  19.4k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  19.4k|        parser->m_bufferEnd = newBuf;
 2148|  19.4k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  19.4k|      }
 2150|       |#else
 2151|       |      if (parser->m_bufferPtr) {
 2152|       |        memcpy(newBuf, parser->m_bufferPtr,
 2153|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2154|       |        FREE(parser, parser->m_buffer);
 2155|       |        parser->m_bufferEnd
 2156|       |            = newBuf
 2157|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2158|       |      } else {
 2159|       |        /* This must be a brand new buffer with no data in it yet */
 2160|       |        parser->m_bufferEnd = newBuf;
 2161|       |      }
 2162|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2163|       |#endif /* not defined XML_CONTEXT_BYTES */
 2164|  19.4k|    }
 2165|  19.4k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  19.4k|    parser->m_positionPtr = NULL;
 2167|  19.4k|  }
 2168|  19.4k|  return parser->m_bufferEnd;
 2169|  19.4k|}
xmlparse.c:parserCreate:
  977|  19.4k|             DTD *dtd) {
  978|  19.4k|  XML_Parser parser;
  979|       |
  980|  19.4k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 19.4k]
  ------------------
  981|      0|    XML_Memory_Handling_Suite *mtemp;
  982|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  983|      0|    if (parser != NULL) {
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  985|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  986|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  987|      0|      mtemp->free_fcn = memsuite->free_fcn;
  988|      0|    }
  989|  19.4k|  } else {
  990|  19.4k|    XML_Memory_Handling_Suite *mtemp;
  991|  19.4k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  19.4k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 19.4k, False: 0]
  ------------------
  993|  19.4k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  19.4k|      mtemp->malloc_fcn = malloc;
  995|  19.4k|      mtemp->realloc_fcn = realloc;
  996|  19.4k|      mtemp->free_fcn = free;
  997|  19.4k|    }
  998|  19.4k|  }
  999|       |
 1000|  19.4k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 19.4k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  19.4k|  parser->m_buffer = NULL;
 1004|  19.4k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  19.4k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  19.4k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  19.4k|  parser->m_atts
 1008|  19.4k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  19.4k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  19.4k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 19.4k]
  ------------------
 1010|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1011|      0|    return NULL;
 1012|      0|  }
 1013|       |#ifdef XML_ATTR_INFO
 1014|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1015|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1016|       |  if (parser->m_attInfo == NULL) {
 1017|       |    FREE(parser, parser->m_atts);
 1018|       |    FREE(parser, parser);
 1019|       |    return NULL;
 1020|       |  }
 1021|       |#endif
 1022|  19.4k|  parser->m_dataBuf
 1023|  19.4k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  19.4k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  19.4k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 19.4k]
  ------------------
 1025|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1026|       |#ifdef XML_ATTR_INFO
 1027|       |    FREE(parser, parser->m_attInfo);
 1028|       |#endif
 1029|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1030|      0|    return NULL;
 1031|      0|  }
 1032|  19.4k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  19.4k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  19.4k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 19.4k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  19.4k|  else {
 1037|  19.4k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  19.4k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 19.4k]
  ------------------
 1039|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1041|       |#ifdef XML_ATTR_INFO
 1042|       |      FREE(parser, parser->m_attInfo);
 1043|       |#endif
 1044|      0|      FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1045|      0|      return NULL;
 1046|      0|    }
 1047|  19.4k|  }
 1048|       |
 1049|  19.4k|  parser->m_freeBindingList = NULL;
 1050|  19.4k|  parser->m_freeTagList = NULL;
 1051|  19.4k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  19.4k|  parser->m_groupSize = 0;
 1054|  19.4k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  19.4k|  parser->m_unknownEncodingHandler = NULL;
 1057|  19.4k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  19.4k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.4k|#define ASCII_EXCL 0x21
  ------------------
 1060|  19.4k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  19.4k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  19.4k|  parser->m_nsAtts = NULL;
 1064|  19.4k|  parser->m_nsAttsVersion = 0;
 1065|  19.4k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  19.4k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  19.4k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  19.4k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  19.4k|  parserInit(parser, encodingName);
 1072|       |
 1073|  19.4k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 19.4k, False: 0]
  |  Branch (1073:23): [True: 0, False: 19.4k]
  ------------------
 1074|      0|    if (dtd) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  ------------------
 1075|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1076|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1077|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1078|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1079|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1080|      0|      parser->m_dtd = NULL;
 1081|      0|    }
 1082|      0|    XML_ParserFree(parser);
 1083|      0|    return NULL;
 1084|      0|  }
 1085|       |
 1086|  19.4k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 19.4k]
  ------------------
 1087|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1088|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  163|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1089|      0|    parser->m_namespaceSeparator = *nameSep;
 1090|  19.4k|  } else {
 1091|  19.4k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  19.4k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  19.4k|  }
 1093|       |
 1094|  19.4k|  return parser;
 1095|  19.4k|}
xmlparse.c:dtdCreate:
 6716|  19.4k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  19.4k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  19.4k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 19.4k]
  ------------------
 6719|      0|    return p;
 6720|  19.4k|  poolInit(&(p->pool), ms);
 6721|  19.4k|  poolInit(&(p->entityValuePool), ms);
 6722|  19.4k|  hashTableInit(&(p->generalEntities), ms);
 6723|  19.4k|  hashTableInit(&(p->elementTypes), ms);
 6724|  19.4k|  hashTableInit(&(p->attributeIds), ms);
 6725|  19.4k|  hashTableInit(&(p->prefixes), ms);
 6726|  19.4k|#ifdef XML_DTD
 6727|  19.4k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  19.4k|  hashTableInit(&(p->paramEntities), ms);
 6729|  19.4k|#endif /* XML_DTD */
 6730|  19.4k|  p->defaultPrefix.name = NULL;
 6731|  19.4k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  19.4k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  19.4k|  p->scaffIndex = NULL;
 6735|  19.4k|  p->scaffold = NULL;
 6736|  19.4k|  p->scaffLevel = 0;
 6737|  19.4k|  p->scaffSize = 0;
 6738|  19.4k|  p->scaffCount = 0;
 6739|  19.4k|  p->contentStringLen = 0;
 6740|       |
 6741|  19.4k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  19.4k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.4k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  19.4k|  return p;
 6745|  19.4k|}
xmlparse.c:hashTableInit:
 7150|  97.4k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  97.4k|  p->power = 0;
 7152|  97.4k|  p->size = 0;
 7153|  97.4k|  p->used = 0;
 7154|  97.4k|  p->v = NULL;
 7155|  97.4k|  p->mem = ms;
 7156|  97.4k|}
xmlparse.c:poolInit:
 7175|  77.9k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  77.9k|  pool->blocks = NULL;
 7177|  77.9k|  pool->freeBlocks = NULL;
 7178|  77.9k|  pool->start = NULL;
 7179|  77.9k|  pool->ptr = NULL;
 7180|  77.9k|  pool->end = NULL;
 7181|  77.9k|  pool->mem = ms;
 7182|  77.9k|}
xmlparse.c:parserInit:
 1098|  19.4k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  19.4k|  parser->m_processor = prologInitProcessor;
 1100|  19.4k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  19.4k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 19.4k, False: 0]
  ------------------
 1102|  19.4k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  19.4k|  }
 1104|  19.4k|  parser->m_curBase = NULL;
 1105|  19.4k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  19.4k|  parser->m_userData = NULL;
 1107|  19.4k|  parser->m_handlerArg = NULL;
 1108|  19.4k|  parser->m_startElementHandler = NULL;
 1109|  19.4k|  parser->m_endElementHandler = NULL;
 1110|  19.4k|  parser->m_characterDataHandler = NULL;
 1111|  19.4k|  parser->m_processingInstructionHandler = NULL;
 1112|  19.4k|  parser->m_commentHandler = NULL;
 1113|  19.4k|  parser->m_startCdataSectionHandler = NULL;
 1114|  19.4k|  parser->m_endCdataSectionHandler = NULL;
 1115|  19.4k|  parser->m_defaultHandler = NULL;
 1116|  19.4k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  19.4k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  19.4k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  19.4k|  parser->m_notationDeclHandler = NULL;
 1120|  19.4k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  19.4k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  19.4k|  parser->m_notStandaloneHandler = NULL;
 1123|  19.4k|  parser->m_externalEntityRefHandler = NULL;
 1124|  19.4k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  19.4k|  parser->m_skippedEntityHandler = NULL;
 1126|  19.4k|  parser->m_elementDeclHandler = NULL;
 1127|  19.4k|  parser->m_attlistDeclHandler = NULL;
 1128|  19.4k|  parser->m_entityDeclHandler = NULL;
 1129|  19.4k|  parser->m_xmlDeclHandler = NULL;
 1130|  19.4k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  19.4k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  19.4k|  parser->m_parseEndByteIndex = 0;
 1133|  19.4k|  parser->m_parseEndPtr = NULL;
 1134|  19.4k|  parser->m_declElementType = NULL;
 1135|  19.4k|  parser->m_declAttributeId = NULL;
 1136|  19.4k|  parser->m_declEntity = NULL;
 1137|  19.4k|  parser->m_doctypeName = NULL;
 1138|  19.4k|  parser->m_doctypeSysid = NULL;
 1139|  19.4k|  parser->m_doctypePubid = NULL;
 1140|  19.4k|  parser->m_declAttributeType = NULL;
 1141|  19.4k|  parser->m_declNotationName = NULL;
 1142|  19.4k|  parser->m_declNotationPublicId = NULL;
 1143|  19.4k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.4k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  19.4k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  19.4k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  19.4k|  parser->m_eventPtr = NULL;
 1148|  19.4k|  parser->m_eventEndPtr = NULL;
 1149|  19.4k|  parser->m_positionPtr = NULL;
 1150|  19.4k|  parser->m_openInternalEntities = NULL;
 1151|  19.4k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  19.4k|  parser->m_tagLevel = 0;
 1153|  19.4k|  parser->m_tagStack = NULL;
 1154|  19.4k|  parser->m_inheritedBindings = NULL;
 1155|  19.4k|  parser->m_nSpecifiedAtts = 0;
 1156|  19.4k|  parser->m_unknownEncodingMem = NULL;
 1157|  19.4k|  parser->m_unknownEncodingRelease = NULL;
 1158|  19.4k|  parser->m_unknownEncodingData = NULL;
 1159|  19.4k|  parser->m_parentParser = NULL;
 1160|  19.4k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  19.4k|#ifdef XML_DTD
 1162|  19.4k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.4k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  19.4k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  19.4k|#endif
 1166|  19.4k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  19.4k|#ifdef XML_DTD
 1169|  19.4k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  19.4k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  19.4k|  parser->m_accounting.maximumAmplificationFactor
 1172|  19.4k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.4k|  100.0f
  ------------------
 1173|  19.4k|  parser->m_accounting.activationThresholdBytes
 1174|  19.4k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.4k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  19.4k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  19.4k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  19.4k|#endif
 1179|  19.4k|}
xmlparse.c:prologInitProcessor:
 4406|  19.4k|                    const char **nextPtr) {
 4407|  19.4k|  enum XML_Error result = initializeEncoding(parser);
 4408|  19.4k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 19.4k]
  ------------------
 4409|      0|    return result;
 4410|  19.4k|  parser->m_processor = prologProcessor;
 4411|  19.4k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  19.4k|}
xmlparse.c:initializeEncoding:
 4249|  19.4k|initializeEncoding(XML_Parser parser) {
 4250|  19.4k|  const char *s;
 4251|       |#ifdef XML_UNICODE
 4252|       |  char encodingBuf[128];
 4253|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4254|       |  if (! parser->m_protocolEncodingName)
 4255|       |    s = NULL;
 4256|       |  else {
 4257|       |    int i;
 4258|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4259|       |      if (i == sizeof(encodingBuf) - 1
 4260|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4261|       |        encodingBuf[0] = '\0';
 4262|       |        break;
 4263|       |      }
 4264|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4265|       |    }
 4266|       |    encodingBuf[i] = '\0';
 4267|       |    s = encodingBuf;
 4268|       |  }
 4269|       |#else
 4270|  19.4k|  s = parser->m_protocolEncodingName;
 4271|  19.4k|#endif
 4272|  19.4k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 19.4k, False: 0]
  |  Branch (4272:8): [True: 0, False: 19.4k]
  ------------------
 4273|  19.4k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  19.4k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  19.4k|}
xmlparse.c:prologProcessor:
 4606|  19.4k|                const char **nextPtr) {
 4607|  19.4k|  const char *next = s;
 4608|  19.4k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.4k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.4k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  19.4k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  19.4k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  19.4k|                  XML_ACCOUNT_DIRECT);
 4612|  19.4k|}
xmlparse.c:doProlog:
 4617|  19.4k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  19.4k|#ifdef XML_DTD
 4619|  19.4k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.4k|#define ASCII_HASH 0x23
  ------------------
 4620|  19.4k|#endif /* XML_DTD */
 4621|  19.4k|  static const XML_Char atypeCDATA[]
 4622|  19.4k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.4k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.4k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.4k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.4k|#define ASCII_A 0x41
  ------------------
 4623|  19.4k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.4k|#define ASCII_D 0x44
  ------------------
 4624|  19.4k|  static const XML_Char atypeIDREF[]
 4625|  19.4k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.4k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.4k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.4k|#define ASCII_F 0x46
  ------------------
 4626|  19.4k|  static const XML_Char atypeIDREFS[]
 4627|  19.4k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.4k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.4k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.4k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.4k|#define ASCII_S 0x53
  ------------------
 4628|  19.4k|  static const XML_Char atypeENTITY[]
 4629|  19.4k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.4k|#define ASCII_Y 0x59
  ------------------
 4630|  19.4k|  static const XML_Char atypeENTITIES[]
 4631|  19.4k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
 4632|  19.4k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.4k|#define ASCII_S 0x53
  ------------------
 4633|  19.4k|  static const XML_Char atypeNMTOKEN[]
 4634|  19.4k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.4k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.4k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.4k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
 4635|  19.4k|  static const XML_Char atypeNMTOKENS[]
 4636|  19.4k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.4k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.4k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.4k|#define ASCII_K 0x4B
  ------------------
 4637|  19.4k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.4k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.4k|#define ASCII_S 0x53
  ------------------
 4638|  19.4k|  static const XML_Char notationPrefix[]
 4639|  19.4k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.4k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.4k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.4k|#define ASCII_T 0x54
  ------------------
 4640|  19.4k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.4k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.4k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.4k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.4k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  19.4k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.4k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  19.4k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.4k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  19.4k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  19.4k|  const char **eventPP;
 4652|  19.4k|  const char **eventEndPP;
 4653|  19.4k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  19.4k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 19.4k, False: 0]
  ------------------
 4656|  19.4k|    eventPP = &parser->m_eventPtr;
 4657|  19.4k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  19.4k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  5.22M|  for (;;) {
 4664|  5.22M|    int role;
 4665|  5.22M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  5.22M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  5.22M|    *eventPP = s;
 4667|  5.22M|    *eventEndPP = next;
 4668|  5.22M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 6.54k, False: 5.21M]
  ------------------
 4669|  6.54k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.54k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 6.54k, False: 0]
  |  Branch (4669:23): [True: 4.48k, False: 2.06k]
  ------------------
 4670|  4.48k|        *nextPtr = s;
 4671|  4.48k|        return XML_ERROR_NONE;
 4672|  4.48k|      }
 4673|  2.06k|      switch (tok) {
 4674|  2.06k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.06k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 2.06k, False: 0]
  ------------------
 4675|  2.06k|        *eventPP = next;
 4676|  2.06k|        return XML_ERROR_INVALID_TOKEN;
 4677|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4677:7): [True: 0, False: 2.06k]
  ------------------
 4678|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4679|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4679:7): [True: 0, False: 2.06k]
  ------------------
 4680|      0|        return XML_ERROR_PARTIAL_CHAR;
 4681|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4681:7): [True: 0, False: 2.06k]
  ------------------
 4682|      0|        tok = -tok;
 4683|      0|        break;
 4684|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4684:7): [True: 0, False: 2.06k]
  ------------------
 4685|      0|#ifdef XML_DTD
 4686|       |        /* for internal PE NOT referenced between declarations */
 4687|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4687:13): [True: 0, False: 0]
  ------------------
 4688|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4688:16): [True: 0, False: 0]
  ------------------
 4689|      0|          *nextPtr = s;
 4690|      0|          return XML_ERROR_NONE;
 4691|      0|        }
 4692|       |        /* WFC: PE Between Declarations - must check that PE contains
 4693|       |           complete markup, not only for external PEs, but also for
 4694|       |           internal PEs if the reference occurs between declarations.
 4695|       |        */
 4696|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4696:13): [True: 0, False: 0]
  |  Branch (4696:40): [True: 0, False: 0]
  ------------------
 4697|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4697:15): [True: 0, False: 0]
  ------------------
 4698|      0|              == XML_ROLE_ERROR)
 4699|      0|            return XML_ERROR_INCOMPLETE_PE;
 4700|      0|          *nextPtr = s;
 4701|      0|          return XML_ERROR_NONE;
 4702|      0|        }
 4703|      0|#endif /* XML_DTD */
 4704|      0|        return XML_ERROR_NO_ELEMENTS;
 4705|      0|      default:
  ------------------
  |  Branch (4705:7): [True: 0, False: 2.06k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  2.06k|      }
 4710|  2.06k|    }
 4711|  5.21M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  5.21M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  5.21M|#ifdef XML_DTD
 4713|  5.21M|    switch (role) {
 4714|  11.2k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 11.2k, False: 5.20M]
  ------------------
 4715|  11.6k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 325, False: 5.21M]
  ------------------
 4716|  11.6k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 5.21M]
  ------------------
 4717|  11.6k|      break;
 4718|  5.20M|    default:
  ------------------
  |  Branch (4718:5): [True: 5.20M, False: 11.6k]
  ------------------
 4719|  5.20M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 0, False: 5.20M]
  ------------------
 4720|      0|        accountingOnAbort(parser);
 4721|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      0|      }
 4723|  5.21M|    }
 4724|  5.21M|#endif
 4725|  5.21M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 5.21M]
  ------------------
 4726|    325|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 325, False: 5.21M]
  ------------------
 4727|    325|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    325|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 237, False: 88]
  ------------------
 4729|    237|        return result;
 4730|     88|      enc = parser->m_encoding;
 4731|     88|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     88|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     88|    } break;
 4733|  5.71k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 5.71k, False: 5.21M]
  ------------------
 4734|  5.71k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 5.71k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  5.71k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  5.71k|      break;
 4745|  4.89k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 4.89k, False: 5.21M]
  ------------------
 4746|  4.89k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 4.89k]
  ------------------
 4747|      0|        parser->m_startDoctypeDeclHandler(
 4748|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4749|      0|            parser->m_doctypePubid, 1);
 4750|      0|        parser->m_doctypeName = NULL;
 4751|      0|        poolClear(&parser->m_tempPool);
 4752|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4753|      0|      }
 4754|  4.89k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 5.21M]
  ------------------
 4757|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4758|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4758:11): [True: 0, False: 0]
  ------------------
 4759|      0|        return result;
 4760|      0|      enc = parser->m_encoding;
 4761|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4762|      0|    } break;
 4763|      0|#endif /* XML_DTD */
 4764|    713|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 713, False: 5.21M]
  ------------------
 4765|    713|#ifdef XML_DTD
 4766|    713|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    713|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    713|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    713|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    713|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 713]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    713|#endif /* XML_DTD */
 4772|    713|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    713|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    713|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 713]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  3.59k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 2.88k, False: 5.21M]
  ------------------
 4790|  3.59k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.59k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 91, False: 3.50k]
  ------------------
 4791|     91|        return XML_ERROR_PUBLICID;
 4792|  3.50k|    alreadyChecked:
 4793|  3.50k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 3.19k, False: 315]
  |  Branch (4793:34): [True: 887, False: 2.30k]
  ------------------
 4794|    887|        XML_Char *tem
 4795|    887|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    887|                              next - enc->minBytesPerChar);
 4797|    887|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 887]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    887|        normalizePublicId(tem);
 4800|    887|        parser->m_declEntity->publicId = tem;
 4801|    887|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    887|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4802|       |        /* Don't suppress the default handler if we fell through from
 4803|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4804|       |         */
 4805|    887|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 887]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    887|      }
 4808|  3.50k|      break;
 4809|  3.50k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 2.15k, False: 5.21M]
  ------------------
 4810|  2.15k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.15k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 2.15k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  2.15k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 2.15k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  2.15k|#ifdef XML_DTD
 4827|  2.15k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 14, False: 2.13k]
  |  Branch (4827:37): [True: 0, False: 2.13k]
  ------------------
 4828|     14|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|     14|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     14|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|     14|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 14]
  ------------------
 4831|     14|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4831:16): [True: 0, False: 0]
  ------------------
 4832|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4833|      0|                                            externalSubsetName, sizeof(ENTITY));
 4834|      0|          if (! entity) {
  ------------------
  |  Branch (4834:15): [True: 0, False: 0]
  ------------------
 4835|       |            /* The external subset name "#" will have already been
 4836|       |             * inserted into the hash table at the start of the
 4837|       |             * external entity parsing, so no allocation will happen
 4838|       |             * and lookup() cannot fail.
 4839|       |             */
 4840|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4841|      0|          }
 4842|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4842:15): [True: 0, False: 0]
  ------------------
 4843|      0|            entity->base = parser->m_curBase;
 4844|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4845|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4845:15): [True: 0, False: 0]
  ------------------
 4846|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4847|      0|                  entity->systemId, entity->publicId))
 4848|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4849|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4849:15): [True: 0, False: 0]
  ------------------
 4850|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4850:17): [True: 0, False: 0]
  |  Branch (4850:38): [True: 0, False: 0]
  ------------------
 4851|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  ------------------
 4852|      0|              return XML_ERROR_NOT_STANDALONE;
 4853|      0|          }
 4854|       |          /* if we didn't read the foreign DTD then this means that there
 4855|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4856|       |          */
 4857|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4857:20): [True: 0, False: 0]
  ------------------
 4858|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4859|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4860|      0|        }
 4861|     14|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     14|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|     14|      }
 4863|  2.15k|#endif /* XML_DTD */
 4864|  2.15k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 2.15k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  2.15k|      break;
 4869|  11.2k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 11.2k, False: 5.20M]
  ------------------
 4870|  11.2k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  11.2k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 11.2k]
  ------------------
 4875|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4876|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4877|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4877:13): [True: 0, False: 0]
  ------------------
 4878|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4878:16): [True: 0, False: 0]
  ------------------
 4879|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4880|      0|                                            externalSubsetName, sizeof(ENTITY));
 4881|      0|          if (! entity)
  ------------------
  |  Branch (4881:15): [True: 0, False: 0]
  ------------------
 4882|      0|            return XML_ERROR_NO_MEMORY;
 4883|      0|          entity->base = parser->m_curBase;
 4884|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4885|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4885:15): [True: 0, False: 0]
  ------------------
 4886|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4887|      0|                  entity->systemId, entity->publicId))
 4888|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4889|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4889:15): [True: 0, False: 0]
  ------------------
 4890|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4890:17): [True: 0, False: 0]
  |  Branch (4890:38): [True: 0, False: 0]
  ------------------
 4891|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4891:20): [True: 0, False: 0]
  ------------------
 4892|      0|              return XML_ERROR_NOT_STANDALONE;
 4893|      0|          }
 4894|       |          /* if we didn't read the foreign DTD then this means that there
 4895|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4896|       |          */
 4897|      0|          else
 4898|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4899|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4900|      0|        }
 4901|      0|      }
 4902|  11.2k|#endif /* XML_DTD */
 4903|  11.2k|      parser->m_processor = contentProcessor;
 4904|  11.2k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  8.91k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 8.91k, False: 5.20M]
  ------------------
 4906|  8.91k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  8.91k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 8.91k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  8.91k|      goto checkAttListDeclHandler;
 4910|  43.9k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 43.9k, False: 5.17M]
  ------------------
 4911|  43.9k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  43.9k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 43.9k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  43.9k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  43.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  43.9k|      parser->m_declAttributeType = NULL;
 4916|  43.9k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  43.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  43.9k|      goto checkAttListDeclHandler;
 4918|    492|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 492, False: 5.21M]
  ------------------
 4919|    492|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    492|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|    492|      parser->m_declAttributeType = atypeCDATA;
 4921|    492|      goto checkAttListDeclHandler;
 4922|  5.85k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 5.85k, False: 5.21M]
  ------------------
 4923|  5.85k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  5.85k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  5.85k|      parser->m_declAttributeType = atypeID;
 4925|  5.85k|      goto checkAttListDeclHandler;
 4926|  1.07k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 1.07k, False: 5.21M]
  ------------------
 4927|  1.07k|      parser->m_declAttributeType = atypeIDREF;
 4928|  1.07k|      goto checkAttListDeclHandler;
 4929|    338|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 338, False: 5.21M]
  ------------------
 4930|    338|      parser->m_declAttributeType = atypeIDREFS;
 4931|    338|      goto checkAttListDeclHandler;
 4932|    947|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 947, False: 5.21M]
  ------------------
 4933|    947|      parser->m_declAttributeType = atypeENTITY;
 4934|    947|      goto checkAttListDeclHandler;
 4935|  2.50k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 2.50k, False: 5.21M]
  ------------------
 4936|  2.50k|      parser->m_declAttributeType = atypeENTITIES;
 4937|  2.50k|      goto checkAttListDeclHandler;
 4938|    143|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 143, False: 5.21M]
  ------------------
 4939|    143|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|    143|      goto checkAttListDeclHandler;
 4941|    212|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 212, False: 5.21M]
  ------------------
 4942|    212|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  64.4k|    checkAttListDeclHandler:
 4944|  64.4k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 63.2k, False: 1.20k]
  |  Branch (4944:34): [True: 0, False: 63.2k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  64.4k|      break;
 4947|  36.2k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 36.2k, False: 5.18M]
  ------------------
 4948|  37.5k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 1.27k, False: 5.21M]
  ------------------
 4949|  37.5k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 36.6k, False: 835]
  |  Branch (4949:34): [True: 0, False: 36.6k]
  ------------------
 4950|      0|        const XML_Char *prefix;
 4951|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|          prefix = enumValueSep;
 4953|      0|        } else {
 4954|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4954:21): [True: 0, False: 0]
  ------------------
 4955|      0|                                                              : enumValueStart);
 4956|      0|        }
 4957|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4957:13): [True: 0, False: 0]
  ------------------
 4958|      0|          return XML_ERROR_NO_MEMORY;
 4959|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|          return XML_ERROR_NO_MEMORY;
 4961|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4962|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4963|      0|      }
 4964|  37.5k|      break;
 4965|  37.5k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 32.1k, False: 5.18M]
  ------------------
 4966|  33.7k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 1.59k, False: 5.21M]
  ------------------
 4967|  33.7k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 33.5k, False: 195]
  ------------------
 4968|  33.5k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 33.5k]
  ------------------
 4969|  33.5k|                              parser->m_declAttributeId,
 4970|  33.5k|                              parser->m_declAttributeIsCdata,
 4971|  33.5k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  33.5k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 33.5k]
  |  Branch (4973:45): [True: 0, False: 0]
  ------------------
 4974|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:15): [True: 0, False: 0]
  ------------------
 4975|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:19): [True: 0, False: 0]
  ------------------
 4976|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4976:22): [True: 0, False: 0]
  ------------------
 4977|       |            /* Enumerated or Notation type */
 4978|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:17): [True: 0, False: 0]
  ------------------
 4979|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4979:20): [True: 0, False: 0]
  ------------------
 4980|      0|              return XML_ERROR_NO_MEMORY;
 4981|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4982|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4983|      0|          }
 4984|      0|          *eventEndPP = s;
 4985|      0|          parser->m_attlistDeclHandler(
 4986|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4987|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4988|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4989|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4990|      0|        }
 4991|  33.5k|      }
 4992|  33.7k|      poolClear(&parser->m_tempPool);
 4993|  33.7k|      break;
 4994|  8.46k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 8.46k, False: 5.20M]
  ------------------
 4995|  9.73k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 1.26k, False: 5.21M]
  ------------------
 4996|  9.73k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 9.07k, False: 654]
  ------------------
 4997|  9.07k|        const XML_Char *attVal;
 4998|  9.07k|        enum XML_Error result = storeAttributeValue(
 4999|  9.07k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  9.07k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  9.07k|            XML_ACCOUNT_NONE);
 5002|  9.07k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 16, False: 9.06k]
  ------------------
 5003|     16|          return result;
 5004|  9.06k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  9.06k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  9.06k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  9.06k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  9.06k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 9.06k]
  ------------------
 5008|  9.06k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  9.06k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  9.06k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  9.06k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 9.06k]
  |  Branch (5011:45): [True: 0, False: 0]
  ------------------
 5012|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:15): [True: 0, False: 0]
  ------------------
 5013|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:19): [True: 0, False: 0]
  ------------------
 5014|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5014:22): [True: 0, False: 0]
  ------------------
 5015|       |            /* Enumerated or Notation type */
 5016|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:17): [True: 0, False: 0]
  ------------------
 5017|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5017:20): [True: 0, False: 0]
  ------------------
 5018|      0|              return XML_ERROR_NO_MEMORY;
 5019|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5020|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5021|      0|          }
 5022|      0|          *eventEndPP = s;
 5023|      0|          parser->m_attlistDeclHandler(
 5024|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5025|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5026|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5027|      0|          poolClear(&parser->m_tempPool);
 5028|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5029|      0|        }
 5030|  9.06k|      }
 5031|  9.71k|      break;
 5032|  9.71k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 8.94k, False: 5.20M]
  ------------------
 5033|  8.94k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 8.59k, False: 348]
  ------------------
 5034|  8.59k|        enum XML_Error result
 5035|  8.59k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  8.59k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  8.59k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 4.03k, False: 4.55k]
  ------------------
 5038|  4.03k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  4.03k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  4.03k|          parser->m_declEntity->textLen
 5040|  4.03k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  4.03k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  4.03k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  4.03k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  4.03k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 4.03k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  4.03k|        } else
 5051|  4.55k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  4.55k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  8.59k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 76, False: 8.51k]
  ------------------
 5053|     76|          return result;
 5054|  8.59k|      }
 5055|  8.86k|      break;
 5056|  8.86k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 45, False: 5.21M]
  ------------------
 5057|     45|#ifdef XML_DTD
 5058|     45|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     45|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|     45|#endif /* XML_DTD */
 5060|     45|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     45|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|     45|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 45]
  ------------------
 5062|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5063|      0|                                                 s + enc->minBytesPerChar,
 5064|      0|                                                 next - enc->minBytesPerChar);
 5065|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5065:13): [True: 0, False: 0]
  ------------------
 5066|      0|          return XML_ERROR_NO_MEMORY;
 5067|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5068|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5069|      0|      }
 5070|     45|#ifdef XML_DTD
 5071|     45|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|     45|        parser->m_doctypeSysid = externalSubsetName;
 5075|     45|#endif /* XML_DTD */
 5076|     45|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 44, False: 1]
  ------------------
 5077|     45|#ifdef XML_DTD
 5078|     45|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 44, False: 0]
  ------------------
 5079|     45|#endif /* XML_DTD */
 5080|     45|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 44]
  ------------------
 5081|     45|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5081:14): [True: 0, False: 0]
  ------------------
 5082|      0|        return XML_ERROR_NOT_STANDALONE;
 5083|       |#ifndef XML_DTD
 5084|       |      break;
 5085|       |#else  /* XML_DTD */
 5086|     45|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 11, False: 34]
  ------------------
 5087|     11|        parser->m_declEntity = (ENTITY *)lookup(
 5088|     11|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|     11|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 11]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|     11|        parser->m_declEntity->publicId = NULL;
 5092|     11|      }
 5093|     45|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  4.71k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 4.67k, False: 5.21M]
  ------------------
 5096|  4.71k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 3.85k, False: 863]
  |  Branch (5096:34): [True: 401, False: 3.45k]
  ------------------
 5097|    401|        parser->m_declEntity->systemId
 5098|    401|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    401|                              next - enc->minBytesPerChar);
 5100|    401|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 401]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    401|        parser->m_declEntity->base = parser->m_curBase;
 5103|    401|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    401|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5104|       |        /* Don't suppress the default handler if we fell through from
 5105|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5106|       |         */
 5107|    401|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 401]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    401|      }
 5110|  4.71k|      break;
 5111|  4.71k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 3.86k, False: 5.21M]
  ------------------
 5112|  3.86k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 3.26k, False: 596]
  |  Branch (5112:34): [True: 311, False: 2.95k]
  ------------------
 5113|  3.86k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 311]
  ------------------
 5114|      0|        *eventEndPP = s;
 5115|      0|        parser->m_entityDeclHandler(
 5116|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5117|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5118|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5119|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5120|      0|      }
 5121|  3.86k|      break;
 5122|    788|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 788, False: 5.21M]
  ------------------
 5123|    788|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 522, False: 266]
  |  Branch (5123:34): [True: 30, False: 492]
  ------------------
 5124|     30|        parser->m_declEntity->notation
 5125|     30|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     30|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 30]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     30|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     30|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     30|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 30]
  ------------------
 5130|      0|          *eventEndPP = s;
 5131|      0|          parser->m_unparsedEntityDeclHandler(
 5132|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5133|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5134|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5135|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5136|     30|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 30]
  ------------------
 5137|      0|          *eventEndPP = s;
 5138|      0|          parser->m_entityDeclHandler(
 5139|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5140|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5141|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5142|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5143|      0|        }
 5144|     30|      }
 5145|    788|      break;
 5146|  9.91k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 9.91k, False: 5.20M]
  ------------------
 5147|  9.91k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  9.91k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 638, False: 9.28k]
  |  |  ------------------
  ------------------
 5148|    638|        parser->m_declEntity = NULL;
 5149|    638|        break;
 5150|    638|      }
 5151|  9.28k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 8.60k, False: 675]
  ------------------
 5152|  8.60k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  8.60k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 8.60k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  8.60k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  8.60k|                                                name, sizeof(ENTITY));
 5157|  8.60k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 8.60k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  8.60k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 4.47k, False: 4.13k]
  ------------------
 5160|  4.47k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  4.47k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  4.47k|          parser->m_declEntity = NULL;
 5162|  4.47k|        } else {
 5163|  4.13k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  4.13k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  4.13k|          parser->m_declEntity->publicId = NULL;
 5165|  4.13k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  4.13k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  4.13k|          parser->m_declEntity->is_internal
 5170|  4.13k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 4.13k]
  |  Branch (5170:46): [True: 0, False: 4.13k]
  ------------------
 5171|  4.13k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 4.13k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  4.13k|        }
 5174|  8.60k|      } else {
 5175|    675|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    675|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    675|        parser->m_declEntity = NULL;
 5177|    675|      }
 5178|  9.28k|    } break;
 5179|  9.28k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 3.86k, False: 5.21M]
  ------------------
 5180|  3.86k|#ifdef XML_DTD
 5181|  3.86k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 3.47k, False: 391]
  ------------------
 5182|  3.47k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  3.47k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 3.47k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  3.47k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  3.47k|                                                name, sizeof(ENTITY));
 5187|  3.47k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 3.47k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  3.47k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 3.12k, False: 346]
  ------------------
 5190|  3.12k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  3.12k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  3.12k|          parser->m_declEntity = NULL;
 5192|  3.12k|        } else {
 5193|    346|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    346|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    346|          parser->m_declEntity->publicId = NULL;
 5195|    346|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    346|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5196|       |          /* if we have a parent parser or are reading an internal parameter
 5197|       |             entity, then the entity declaration is not considered "internal"
 5198|       |          */
 5199|    346|          parser->m_declEntity->is_internal
 5200|    346|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 346]
  |  Branch (5200:46): [True: 0, False: 346]
  ------------------
 5201|    346|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 346]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    346|        }
 5204|  3.47k|      } else {
 5205|    391|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    391|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    391|        parser->m_declEntity = NULL;
 5207|    391|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  3.86k|      break;
 5212|  3.86k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 1.95k, False: 5.21M]
  ------------------
 5213|  1.95k|      parser->m_declNotationPublicId = NULL;
 5214|  1.95k|      parser->m_declNotationName = NULL;
 5215|  1.95k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 1.95k]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|  1.95k|      break;
 5224|  1.95k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 1.65k, False: 5.21M]
  ------------------
 5225|  1.65k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.65k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 2, False: 1.64k]
  ------------------
 5226|      2|        return XML_ERROR_PUBLICID;
 5227|  1.64k|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 1.64k]
  ------------------
 5228|  1.64k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|  1.64k|      break;
 5240|  1.64k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 612, False: 5.21M]
  ------------------
 5241|    612|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 612]
  |  Branch (5241:41): [True: 0, False: 0]
  ------------------
 5242|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5243|      0|                                                   s + enc->minBytesPerChar,
 5244|      0|                                                   next - enc->minBytesPerChar);
 5245|      0|        if (! systemId)
  ------------------
  |  Branch (5245:13): [True: 0, False: 0]
  ------------------
 5246|      0|          return XML_ERROR_NO_MEMORY;
 5247|      0|        *eventEndPP = s;
 5248|      0|        parser->m_notationDeclHandler(
 5249|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5250|      0|            systemId, parser->m_declNotationPublicId);
 5251|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5252|      0|      }
 5253|    612|      poolClear(&parser->m_tempPool);
 5254|    612|      break;
 5255|  1.29k|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 1.29k, False: 5.21M]
  ------------------
 5256|  1.29k|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 1.29k]
  |  Branch (5256:45): [True: 0, False: 0]
  ------------------
 5257|      0|        *eventEndPP = s;
 5258|      0|        parser->m_notationDeclHandler(
 5259|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5260|      0|            0, parser->m_declNotationPublicId);
 5261|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5262|      0|      }
 5263|  1.29k|      poolClear(&parser->m_tempPool);
 5264|  1.29k|      break;
 5265|  1.23k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.23k, False: 5.21M]
  ------------------
 5266|  1.23k|      switch (tok) {
 5267|      3|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      3|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 3, False: 1.23k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      3|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      2|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      2|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 2, False: 1.23k]
  ------------------
 5272|      2|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.23k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.23k, False: 5]
  ------------------
 5274|  1.23k|        return XML_ERROR_SYNTAX;
 5275|  1.23k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 5.21M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  4.35M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 4.35M, False: 865k]
  ------------------
 5292|  4.35M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 1.19k, False: 4.35M]
  ------------------
 5293|  1.19k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 445, False: 752]
  ------------------
 5294|    445|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    445|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 445]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    445|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    445|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    445|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    445|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 445]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    445|            parser->m_groupConnector = new_connector;
 5307|    445|          }
 5308|       |
 5309|    445|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 445]
  ------------------
 5310|       |            /* Detect and prevent integer overflow.
 5311|       |             * The preprocessor guard addresses the "always false" warning
 5312|       |             * from -Wtype-limits on platforms where
 5313|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5314|       |#if UINT_MAX >= SIZE_MAX
 5315|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5316|       |              return XML_ERROR_NO_MEMORY;
 5317|       |            }
 5318|       |#endif
 5319|       |
 5320|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5321|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5322|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5322:17): [True: 0, False: 0]
  ------------------
 5323|      0|              return XML_ERROR_NO_MEMORY;
 5324|      0|            dtd->scaffIndex = new_scaff_index;
 5325|      0|          }
 5326|    752|        } else {
 5327|    752|          parser->m_groupConnector
 5328|    752|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    752|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    752|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 752]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    752|        }
 5334|  1.19k|      }
 5335|  4.35M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  4.35M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 4.35M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  4.35M|      break;
 5348|  4.35M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 6.64k, False: 5.21M]
  ------------------
 5349|  6.64k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  6.64k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 2, False: 6.64k]
  ------------------
 5350|      2|        return XML_ERROR_SYNTAX;
 5351|  6.64k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  6.64k|#define ASCII_COMMA 0x2C
  ------------------
 5352|  6.64k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 6.64k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|  6.64k|      break;
 5355|  68.4k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 68.4k, False: 5.14M]
  ------------------
 5356|  68.4k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  68.4k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 1, False: 68.4k]
  ------------------
 5357|      1|        return XML_ERROR_SYNTAX;
 5358|  68.4k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 68.4k]
  ------------------
 5359|  68.4k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  68.4k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5360:14): [True: 0, False: 0]
  ------------------
 5361|      0|              != XML_CTYPE_MIXED)) {
 5362|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5363|      0|            = XML_CTYPE_CHOICE;
 5364|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5364:13): [True: 0, False: 0]
  ------------------
 5365|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5366|      0|      }
 5367|  68.4k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  68.4k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  68.4k|      break;
 5369|  3.95k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 3.95k, False: 5.21M]
  ------------------
 5370|  3.95k|#ifdef XML_DTD
 5371|  3.95k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 5.21M]
  ------------------
 5372|  3.95k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.95k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  3.95k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 3.95k, False: 0]
  ------------------
 5374|  3.95k|        dtd->keepProcessing = dtd->standalone;
 5375|      0|      else {
 5376|      0|        const XML_Char *name;
 5377|      0|        ENTITY *entity;
 5378|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5379|      0|                               next - enc->minBytesPerChar);
 5380|      0|        if (! name)
  ------------------
  |  Branch (5380:13): [True: 0, False: 0]
  ------------------
 5381|      0|          return XML_ERROR_NO_MEMORY;
 5382|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5383|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5384|       |        /* first, determine if a check for an existing declaration is needed;
 5385|       |           if yes, check that the entity exists, and that it is internal,
 5386|       |           otherwise call the skipped entity handler
 5387|       |        */
 5388|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5388:13): [True: 0, False: 0]
  ------------------
 5389|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5389:16): [True: 0, False: 0]
  |  Branch (5389:17): [True: 0, False: 0]
  ------------------
 5390|      0|                                : ! dtd->hasParamEntityRefs)) {
 5391|      0|          if (! entity)
  ------------------
  |  Branch (5391:15): [True: 0, False: 0]
  ------------------
 5392|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5393|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5393:20): [True: 0, False: 0]
  ------------------
 5394|       |            /* It's hard to exhaustively search the code to be sure,
 5395|       |             * but there doesn't seem to be a way of executing the
 5396|       |             * following line.  There are two cases:
 5397|       |             *
 5398|       |             * If 'standalone' is false, the DTD must have no
 5399|       |             * parameter entities or we wouldn't have passed the outer
 5400|       |             * 'if' statement.  That means the only entity in the hash
 5401|       |             * table is the external subset name "#" which cannot be
 5402|       |             * given as a parameter entity name in XML syntax, so the
 5403|       |             * lookup must have returned NULL and we don't even reach
 5404|       |             * the test for an internal entity.
 5405|       |             *
 5406|       |             * If 'standalone' is true, it does not seem to be
 5407|       |             * possible to create entities taking this code path that
 5408|       |             * are not internal entities, so fail the test above.
 5409|       |             *
 5410|       |             * Because this analysis is very uncertain, the code is
 5411|       |             * being left in place and merely removed from the
 5412|       |             * coverage test statistics.
 5413|       |             */
 5414|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5415|      0|          }
 5416|      0|        } else if (! entity) {
  ------------------
  |  Branch (5416:20): [True: 0, False: 0]
  ------------------
 5417|      0|          dtd->keepProcessing = dtd->standalone;
 5418|       |          /* cannot report skipped entities in declarations */
 5419|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5419:15): [True: 0, False: 0]
  ------------------
 5420|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5420:18): [True: 0, False: 0]
  ------------------
 5421|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5422|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5423|      0|          }
 5424|      0|          break;
 5425|      0|        }
 5426|      0|        if (entity->open)
  ------------------
  |  Branch (5426:13): [True: 0, False: 0]
  ------------------
 5427|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5428|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5428:13): [True: 0, False: 0]
  ------------------
 5429|      0|          enum XML_Error result;
 5430|      0|          XML_Bool betweenDecl
 5431|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5431:18): [True: 0, False: 0]
  ------------------
 5432|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5433|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5433:15): [True: 0, False: 0]
  ------------------
 5434|      0|            return result;
 5435|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5436|      0|          break;
 5437|      0|        }
 5438|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5438:13): [True: 0, False: 0]
  ------------------
 5439|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5440|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5441|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5442|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5442:15): [True: 0, False: 0]
  ------------------
 5443|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5444|      0|                  entity->systemId, entity->publicId)) {
 5445|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5446|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5447|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5448|      0|          }
 5449|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5450|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5452|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5452:15): [True: 0, False: 0]
  ------------------
 5453|      0|            dtd->keepProcessing = dtd->standalone;
 5454|      0|            break;
 5455|      0|          }
 5456|      0|        } else {
 5457|      0|          dtd->keepProcessing = dtd->standalone;
 5458|      0|          break;
 5459|      0|        }
 5460|      0|      }
 5461|  3.95k|#endif /* XML_DTD */
 5462|  3.95k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 3.75k, False: 202]
  |  Branch (5462:32): [True: 0, False: 3.75k]
  ------------------
 5463|  3.95k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  3.95k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  4.96k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 4.96k, False: 5.21M]
  ------------------
 5470|  4.96k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 4.96k]
  ------------------
 5471|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5472|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5472:13): [True: 0, False: 0]
  ------------------
 5473|      0|          return XML_ERROR_NO_MEMORY;
 5474|      0|        dtd->scaffLevel = 0;
 5475|      0|        dtd->scaffCount = 0;
 5476|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5477|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5478|      0|      }
 5479|  4.96k|      break;
 5480|       |
 5481|  4.96k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 71, False: 5.21M]
  ------------------
 5482|    115|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 44, False: 5.21M]
  ------------------
 5483|    115|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 115]
  ------------------
 5484|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5484:13): [True: 0, False: 0]
  ------------------
 5485|      0|          XML_Content *content
 5486|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5487|      0|          if (! content)
  ------------------
  |  Branch (5487:15): [True: 0, False: 0]
  ------------------
 5488|      0|            return XML_ERROR_NO_MEMORY;
 5489|      0|          content->quant = XML_CQUANT_NONE;
 5490|      0|          content->name = NULL;
 5491|      0|          content->numchildren = 0;
 5492|      0|          content->children = NULL;
 5493|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5493:28): [True: 0, False: 0]
  ------------------
 5494|      0|                                                          : XML_CTYPE_EMPTY);
 5495|      0|          *eventEndPP = s;
 5496|      0|          parser->m_elementDeclHandler(
 5497|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5498|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5499|      0|        }
 5500|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5501|      0|      }
 5502|    115|      break;
 5503|       |
 5504|  1.73k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 1.73k, False: 5.21M]
  ------------------
 5505|  1.73k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 1.73k]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|  1.73k|      break;
 5512|       |
 5513|  63.0k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 63.0k, False: 5.15M]
  ------------------
 5514|  63.0k|      quant = XML_CQUANT_NONE;
 5515|  63.0k|      goto elementContent;
 5516|  12.7k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 12.7k, False: 5.20M]
  ------------------
 5517|  12.7k|      quant = XML_CQUANT_OPT;
 5518|  12.7k|      goto elementContent;
 5519|  2.00k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 2.00k, False: 5.21M]
  ------------------
 5520|  2.00k|      quant = XML_CQUANT_REP;
 5521|  2.00k|      goto elementContent;
 5522|  1.40k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 1.40k, False: 5.21M]
  ------------------
 5523|  1.40k|      quant = XML_CQUANT_PLUS;
 5524|  79.1k|    elementContent:
 5525|  79.1k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 79.1k]
  ------------------
 5526|      0|        ELEMENT_TYPE *el;
 5527|      0|        const XML_Char *name;
 5528|      0|        size_t nameLen;
 5529|      0|        const char *nxt
 5530|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5530:16): [True: 0, False: 0]
  ------------------
 5531|      0|        int myindex = nextScaffoldPart(parser);
 5532|      0|        if (myindex < 0)
  ------------------
  |  Branch (5532:13): [True: 0, False: 0]
  ------------------
 5533|      0|          return XML_ERROR_NO_MEMORY;
 5534|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5535|      0|        dtd->scaffold[myindex].quant = quant;
 5536|      0|        el = getElementType(parser, enc, s, nxt);
 5537|      0|        if (! el)
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return XML_ERROR_NO_MEMORY;
 5539|      0|        name = el->name;
 5540|      0|        dtd->scaffold[myindex].name = name;
 5541|      0|        nameLen = 0;
 5542|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5542:16): [True: 0, False: 0]
  ------------------
 5543|      0|          ;
 5544|       |
 5545|       |        /* Detect and prevent integer overflow */
 5546|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5546:13): [True: 0, False: 0]
  ------------------
 5547|      0|          return XML_ERROR_NO_MEMORY;
 5548|      0|        }
 5549|       |
 5550|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5551|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5551:13): [True: 0, False: 0]
  ------------------
 5552|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5553|      0|      }
 5554|  79.1k|      break;
 5555|       |
 5556|  79.1k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 19.4k, False: 5.19M]
  ------------------
 5557|  19.4k|      quant = XML_CQUANT_NONE;
 5558|  19.4k|      goto closeGroup;
 5559|  3.73k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 3.73k, False: 5.21M]
  ------------------
 5560|  3.73k|      quant = XML_CQUANT_OPT;
 5561|  3.73k|      goto closeGroup;
 5562|  3.36k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 3.36k, False: 5.21M]
  ------------------
 5563|  3.36k|      quant = XML_CQUANT_REP;
 5564|  3.36k|      goto closeGroup;
 5565|  7.49k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 7.49k, False: 5.20M]
  ------------------
 5566|  7.49k|      quant = XML_CQUANT_PLUS;
 5567|  34.0k|    closeGroup:
 5568|  34.0k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 34.0k]
  ------------------
 5569|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5569:13): [True: 0, False: 0]
  ------------------
 5570|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5571|      0|        dtd->scaffLevel--;
 5572|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5573|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5573:13): [True: 0, False: 0]
  ------------------
 5574|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5574:15): [True: 0, False: 0]
  ------------------
 5575|      0|            XML_Content *model = build_model(parser);
 5576|      0|            if (! model)
  ------------------
  |  Branch (5576:17): [True: 0, False: 0]
  ------------------
 5577|      0|              return XML_ERROR_NO_MEMORY;
 5578|      0|            *eventEndPP = s;
 5579|      0|            parser->m_elementDeclHandler(
 5580|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5581|      0|          }
 5582|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5583|      0|          dtd->contentStringLen = 0;
 5584|      0|        }
 5585|      0|      }
 5586|  34.0k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|  34.0k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 6.42k, False: 5.21M]
  ------------------
 5590|  6.42k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 6.42k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  6.42k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.42k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  6.42k|      break;
 5594|  1.10k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 1.10k, False: 5.21M]
  ------------------
 5595|  1.10k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 1.10k]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|  1.10k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.10k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|  1.10k|      break;
 5599|  6.28k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 6.28k, False: 5.21M]
  ------------------
 5600|  6.28k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 6.00k, False: 281]
  ------------------
 5601|    281|      case XML_TOK_BOM:
  ------------------
  |  |   79|    281|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 281, False: 6.00k]
  ------------------
 5602|    281|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|    281|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|    281|        break;
 5604|  6.28k|      }
 5605|  6.28k|      break;
 5606|  16.8k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 16.8k, False: 5.20M]
  ------------------
 5607|  16.8k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 16.8k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  16.8k|      break;
 5610|  77.5k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 77.5k, False: 5.13M]
  ------------------
 5611|  77.5k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 69.2k, False: 8.34k]
  |  Branch (5611:34): [True: 0, False: 69.2k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  77.5k|      break;
 5614|  11.1k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 11.1k, False: 5.20M]
  ------------------
 5615|  11.1k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 11.1k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  11.1k|      break;
 5618|   233k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 233k, False: 4.98M]
  ------------------
 5619|   233k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 228k, False: 5.09k]
  |  Branch (5619:34): [True: 0, False: 228k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|   233k|      break;
 5622|   101k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 101k, False: 5.11M]
  ------------------
 5623|   101k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 101k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|   101k|      break;
 5626|  5.21M|    } /* end of big switch */
 5627|       |
 5628|  5.20M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 5.19M, False: 7.89k]
  |  Branch (5628:26): [True: 0, False: 5.19M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  5.20M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 5.20M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 5.20M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  5.20M|    default:
  ------------------
  |  Branch (5637:5): [True: 5.20M, False: 0]
  ------------------
 5638|  5.20M|      s = next;
 5639|  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))
  |  |  ------------------
  ------------------
 5640|  5.20M|    }
 5641|  5.20M|  }
 5642|       |  /* not reached */
 5643|  19.4k|}
xmlparse.c:accountingDiffTolerated:
 7737|   257M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|   257M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 253M, False: 4.31M]
  ------------------
 7742|  2.54k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.54k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.54k, False: 257M]
  ------------------
 7743|  5.01k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  5.01k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.47k, False: 257M]
  ------------------
 7744|  5.45k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.45k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 441, False: 257M]
  ------------------
 7745|  4.31M|  case XML_TOK_NONE:
  ------------------
  |  |   51|  4.31M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 4.30M, False: 253M]
  ------------------
 7746|  4.31M|    return XML_TRUE;
  ------------------
  |  |   55|  4.31M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|   257M|  }
 7748|       |
 7749|   253M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 1.41M, False: 252M]
  ------------------
 7750|  1.41M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.41M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|   252M|  unsigned int levelsAwayFromRootParser;
 7753|   252M|  const XML_Parser rootParser
 7754|   252M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|   252M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|   252M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 8.14M, False: 244M]
  |  Branch (7758:44): [True: 8.14M, False: 0]
  ------------------
 7759|   252M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|   252M|  XmlBigCount *const additionTarget
 7762|   252M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 8.14M, False: 244M]
  ------------------
 7763|   252M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|   252M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 252M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|   252M|  *additionTarget += bytesMore;
 7769|       |
 7770|   252M|  const XmlBigCount countBytesOutput
 7771|   252M|      = rootParser->m_accounting.countBytesDirect
 7772|   252M|        + rootParser->m_accounting.countBytesIndirect;
 7773|   252M|  const float amplificationFactor
 7774|   252M|      = accountingGetCurrentAmplification(rootParser);
 7775|   252M|  const XML_Bool tolerated
 7776|   252M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 69.1M, False: 183M]
  ------------------
 7777|   252M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 183M, False: 54]
  ------------------
 7778|   183M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|   252M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 252M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|   252M|  return tolerated;
 7787|   252M|}
xmlparse.c:getRootParserOf:
 7852|   260M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|   260M|  XML_Parser rootParser = parser;
 7854|   260M|  unsigned int stepsTakenUpwards = 0;
 7855|   260M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 260M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|   260M|  assert(! rootParser->m_parentParser);
 7860|   260M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 252M, False: 8.55M]
  ------------------
 7861|   252M|    *outLevelDiff = stepsTakenUpwards;
 7862|   252M|  }
 7863|   260M|  return rootParser;
 7864|   260M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|   252M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|   252M|  const XmlBigCount countBytesOutput
 7662|   252M|      = rootParser->m_accounting.countBytesDirect
 7663|   252M|        + rootParser->m_accounting.countBytesIndirect;
 7664|   252M|  const float amplificationFactor
 7665|   252M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 252M, False: 0]
  ------------------
 7666|   252M|            ? (countBytesOutput
 7667|   252M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|   252M|            : 1.0f;
 7669|   252M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|   252M|}
xmlparse.c:accountingReportStats:
 7674|     53|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     53|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     53|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     53|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 53, False: 0]
  ------------------
 7679|     53|    return;
 7680|     53|  }
 7681|       |
 7682|      0|  const float amplificationFactor
 7683|      0|      = accountingGetCurrentAmplification(rootParser);
 7684|      0|  fprintf(stderr,
 7685|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7686|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7687|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7688|      0|          rootParser->m_accounting.countBytesIndirect,
 7689|      0|          (double)amplificationFactor, epilog);
 7690|      0|}
xmlparse.c:accountingOnAbort:
 7693|     53|accountingOnAbort(XML_Parser originParser) {
 7694|     53|  accountingReportStats(originParser, " ABORTING\n");
 7695|     53|}
xmlparse.c:processXmlDecl:
 4280|    325|               const char *next) {
 4281|    325|  const char *encodingName = NULL;
 4282|    325|  const XML_Char *storedEncName = NULL;
 4283|    325|  const ENCODING *newEncoding = NULL;
 4284|    325|  const char *version = NULL;
 4285|    325|  const char *versionend = NULL;
 4286|    325|  const XML_Char *storedversion = NULL;
 4287|    325|  int standalone = -1;
 4288|       |
 4289|    325|#ifdef XML_DTD
 4290|    325|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    325|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 325]
  ------------------
 4291|    325|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    325|#endif
 4296|       |
 4297|    325|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 237, False: 88]
  |  Branch (4297:10): [True: 0, False: 325]
  ------------------
 4298|    325|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    325|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    237|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 237]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    237|    else
 4303|    237|      return XML_ERROR_XML_DECL;
 4304|    237|  }
 4305|     88|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 88, False: 0]
  |  Branch (4305:32): [True: 27, False: 61]
  ------------------
 4306|     27|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     27|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     27|#ifdef XML_DTD
 4308|     27|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 27]
  ------------------
 4309|     27|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     27|#endif /* XML_DTD */
 4312|     27|  }
 4313|     88|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 88]
  ------------------
 4314|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4314:9): [True: 0, False: 0]
  ------------------
 4315|      0|      storedEncName = poolStoreString(
 4316|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4317|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4318|      0|      if (! storedEncName)
  ------------------
  |  Branch (4318:11): [True: 0, False: 0]
  ------------------
 4319|      0|        return XML_ERROR_NO_MEMORY;
 4320|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4321|      0|    }
 4322|      0|    if (version) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 0]
  ------------------
 4323|      0|      storedversion
 4324|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4325|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4326|      0|      if (! storedversion)
  ------------------
  |  Branch (4326:11): [True: 0, False: 0]
  ------------------
 4327|      0|        return XML_ERROR_NO_MEMORY;
 4328|      0|    }
 4329|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4330|      0|                             standalone);
 4331|     88|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 88]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     88|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 88]
  ------------------
 4334|      0|    if (newEncoding) {
  ------------------
  |  Branch (4334:9): [True: 0, False: 0]
  ------------------
 4335|       |      /* Check that the specified encoding does not conflict with what
 4336|       |       * the parser has already deduced.  Do we have the same number
 4337|       |       * of bytes in the smallest representation of a character?  If
 4338|       |       * this is UTF-16, is it the same endianness?
 4339|       |       */
 4340|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4340:11): [True: 0, False: 0]
  ------------------
 4341|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4341:15): [True: 0, False: 0]
  ------------------
 4342|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4342:18): [True: 0, False: 0]
  ------------------
 4343|      0|        parser->m_eventPtr = encodingName;
 4344|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4345|      0|      }
 4346|      0|      parser->m_encoding = newEncoding;
 4347|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4347:16): [True: 0, False: 0]
  ------------------
 4348|      0|      enum XML_Error result;
 4349|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4349:11): [True: 0, False: 0]
  ------------------
 4350|      0|        storedEncName = poolStoreString(
 4351|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4352|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4353|      0|        if (! storedEncName)
  ------------------
  |  Branch (4353:13): [True: 0, False: 0]
  ------------------
 4354|      0|          return XML_ERROR_NO_MEMORY;
 4355|      0|      }
 4356|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4357|      0|      poolClear(&parser->m_temp2Pool);
 4358|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4358:11): [True: 0, False: 0]
  ------------------
 4359|      0|        parser->m_eventPtr = encodingName;
 4360|      0|      return result;
 4361|      0|    }
 4362|      0|  }
 4363|       |
 4364|     88|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 88]
  |  Branch (4364:24): [True: 0, False: 88]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     88|  return XML_ERROR_NONE;
 4368|     88|}
xmlparse.c:poolStoreString:
 7284|  4.56M|                const char *end) {
 7285|  4.56M|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 4.56M]
  ------------------
 7286|      0|    return NULL;
 7287|  4.56M|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 385, False: 4.56M]
  |  Branch (7287:33): [True: 0, False: 385]
  ------------------
 7288|      0|    return NULL;
 7289|  4.56M|  *(pool->ptr)++ = 0;
 7290|  4.56M|  return pool->start;
 7291|  4.56M|}
xmlparse.c:lookup:
 7043|  6.90M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  6.90M|  size_t i;
 7045|  6.90M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 39.8k, False: 6.86M]
  ------------------
 7046|  39.8k|    size_t tsize;
 7047|  39.8k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 22.7k, False: 17.0k]
  ------------------
 7048|  22.7k|      return NULL;
 7049|  17.0k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  17.0k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  17.0k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  17.0k|#define INIT_POWER 6
  ------------------
 7052|  17.0k|    tsize = table->size * sizeof(NAMED *);
 7053|  17.0k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  17.0k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 17.0k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  17.0k|    memset(table->v, 0, tsize);
 7059|  17.0k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  6.86M|  } else {
 7061|  6.86M|    unsigned long h = hash(parser, name);
 7062|  6.86M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  6.86M|    unsigned char step = 0;
 7064|  6.86M|    i = h & mask;
 7065|  7.34M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 7.28M, False: 61.5k]
  ------------------
 7066|  7.28M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 6.80M, False: 486k]
  ------------------
 7067|  6.80M|        return table->v[i];
 7068|   486k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 416k, False: 70.1k]
  ------------------
 7069|   416k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|   416k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|   416k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|   486k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 316k, False: 169k]
  ------------------
 7071|   486k|    }
 7072|  61.5k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 40.5k, False: 21.0k]
  ------------------
 7073|  40.5k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  21.0k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 238, False: 20.8k]
  ------------------
 7077|    238|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    238|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 238]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    238|      size_t newSize = (size_t)1 << newPower;
 7085|    238|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    238|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 238]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    238|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    238|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    238|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 238]
  ------------------
 7095|      0|        return NULL;
 7096|    238|      memset(newV, 0, tsize);
 7097|  35.2k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 35.0k, False: 238]
  ------------------
 7098|  35.0k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 17.5k, False: 17.5k]
  ------------------
 7099|  17.5k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  17.5k|          size_t j = newHash & newMask;
 7101|  17.5k|          step = 0;
 7102|  20.4k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.91k, False: 17.5k]
  ------------------
 7103|  2.91k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 2.32k, False: 592]
  ------------------
 7104|  2.32k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  2.32k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  2.32k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.91k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 441, False: 2.47k]
  ------------------
 7106|  2.91k|          }
 7107|  17.5k|          newV[j] = table->v[i];
 7108|  17.5k|        }
 7109|    238|      table->mem->free_fcn(table->v);
 7110|    238|      table->v = newV;
 7111|    238|      table->power = newPower;
 7112|    238|      table->size = newSize;
 7113|    238|      i = h & newMask;
 7114|    238|      step = 0;
 7115|    395|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 157, False: 238]
  ------------------
 7116|    157|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 89, False: 68]
  ------------------
 7117|     89|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     89|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     89|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    157|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 24, False: 133]
  ------------------
 7119|    157|      }
 7120|    238|    }
 7121|  21.0k|  }
 7122|  38.1k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  38.1k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 38.1k]
  ------------------
 7124|      0|    return NULL;
 7125|  38.1k|  memset(table->v[i], 0, createSize);
 7126|  38.1k|  table->v[i]->name = name;
 7127|  38.1k|  (table->used)++;
 7128|  38.1k|  return table->v[i];
 7129|  38.1k|}
xmlparse.c:hash:
 7032|  6.89M|hash(XML_Parser parser, KEY s) {
 7033|  6.89M|  struct siphash state;
 7034|  6.89M|  struct sipkey key;
 7035|  6.89M|  (void)sip24_valid;
 7036|  6.89M|  copy_salt_to_sipkey(parser, &key);
 7037|  6.89M|  sip24_init(&state, &key);
 7038|  6.89M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  6.89M|  return (unsigned long)sip24_final(&state);
 7040|  6.89M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  6.89M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  6.89M|  key->k[0] = 0;
 7028|  6.89M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  6.89M|}
xmlparse.c:get_hash_secret_salt:
  947|  6.89M|get_hash_secret_salt(XML_Parser parser) {
  948|  6.89M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 6.89M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  6.89M|  return parser->m_hash_secret_salt;
  951|  6.89M|}
xmlparse.c:keylen:
 7018|  6.89M|keylen(KEY s) {
 7019|  6.89M|  size_t len = 0;
 7020|  38.1M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 31.2M, False: 6.89M]
  ------------------
 7021|  31.2M|    ;
 7022|  6.89M|  return len;
 7023|  6.89M|}
xmlparse.c:keyeq:
 7010|  7.28M|keyeq(KEY s1, KEY s2) {
 7011|  35.6M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 35.1M, False: 486k]
  ------------------
 7012|  35.1M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 6.80M, False: 28.3M]
  ------------------
 7013|  6.80M|      return XML_TRUE;
  ------------------
  |  |   55|  6.80M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|   486k|  return XML_FALSE;
  ------------------
  |  |   56|   486k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  7.28M|}
xmlparse.c:normalizePublicId:
 6695|    887|normalizePublicId(XML_Char *publicId) {
 6696|    887|  XML_Char *p = publicId;
 6697|    887|  XML_Char *s;
 6698|   160k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 159k, False: 887]
  ------------------
 6699|   159k|    switch (*s) {
 6700|    846|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 846, False: 158k]
  ------------------
 6701|  1.88k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 1.03k, False: 158k]
  ------------------
 6702|  6.54k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 4.66k, False: 154k]
  ------------------
 6703|  6.54k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 5.41k, False: 1.13k]
  |  Branch (6703:28): [True: 817, False: 4.60k]
  ------------------
 6704|    817|        *p++ = 0x20;
 6705|  6.54k|      break;
 6706|   153k|    default:
  ------------------
  |  Branch (6706:5): [True: 153k, False: 6.54k]
  ------------------
 6707|   153k|      *p++ = *s;
 6708|   159k|    }
 6709|   159k|  }
 6710|    887|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 637, False: 250]
  |  Branch (6710:24): [True: 37, False: 600]
  ------------------
 6711|     37|    --p;
 6712|    887|  *p = XML_T('\0');
  ------------------
  |  |  191|    887|#  define XML_T(x) x
  ------------------
 6713|    887|}
xmlparse.c:contentProcessor:
 2622|  11.2k|                 const char **endPtr) {
 2623|  11.2k|  enum XML_Error result = doContent(
 2624|  11.2k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  11.2k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  11.2k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 6.95k, False: 4.32k]
  ------------------
 2627|  6.95k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 6.95k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  6.95k|  }
 2630|  11.2k|  return result;
 2631|  11.2k|}
xmlparse.c:doContent:
 2752|   191k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|   191k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|   191k|  const char **eventPP;
 2757|   191k|  const char **eventEndPP;
 2758|   191k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 11.2k, False: 180k]
  ------------------
 2759|  11.2k|    eventPP = &parser->m_eventPtr;
 2760|  11.2k|    eventEndPP = &parser->m_eventEndPtr;
 2761|   180k|  } else {
 2762|   180k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|   180k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|   180k|  }
 2765|   191k|  *eventPP = s;
 2766|       |
 2767|  10.7M|  for (;;) {
 2768|  10.7M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|  10.7M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  10.7M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  10.7M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|  10.7M|#ifdef XML_DTD
 2771|  10.7M|    const char *accountAfter
 2772|  10.7M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  10.7M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  10.7M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 3.05k, False: 10.7M]
  |  Branch (2772:46): [True: 55, False: 10.7M]
  ------------------
 2773|  10.7M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 84, False: 3.02k]
  ------------------
 2774|  10.7M|              : next;
 2775|  10.7M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 17, False: 10.7M]
  ------------------
 2776|  10.7M|                                  account)) {
 2777|     17|      accountingOnAbort(parser);
 2778|     17|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|     17|    }
 2780|  10.7M|#endif
 2781|  10.7M|    *eventEndPP = next;
 2782|  10.7M|    switch (tok) {
 2783|     55|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     55|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 55, False: 10.7M]
  ------------------
 2784|     55|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 55, False: 0]
  ------------------
 2785|     55|        *nextPtr = s;
 2786|     55|        return XML_ERROR_NONE;
 2787|     55|      }
 2788|      0|      *eventEndPP = end;
 2789|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2789:11): [True: 0, False: 0]
  ------------------
 2790|      0|        XML_Char c = 0xA;
 2791|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2792|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2792:18): [True: 0, False: 0]
  ------------------
 2793|      0|        reportDefault(parser, enc, s, end);
 2794|       |      /* We are at the end of the final buffer, should we check for
 2795|       |         XML_SUSPENDED, XML_FINISHED?
 2796|       |      */
 2797|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2797:11): [True: 0, False: 0]
  ------------------
 2798|      0|        return XML_ERROR_NO_ELEMENTS;
 2799|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2799:11): [True: 0, False: 0]
  ------------------
 2800|      0|        return XML_ERROR_ASYNC_ENTITY;
 2801|      0|      *nextPtr = end;
 2802|      0|      return XML_ERROR_NONE;
 2803|   179k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   179k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 179k, False: 10.5M]
  ------------------
 2804|   179k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 3.67k, False: 176k]
  ------------------
 2805|  3.67k|        *nextPtr = s;
 2806|  3.67k|        return XML_ERROR_NONE;
 2807|  3.67k|      }
 2808|   176k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 176k, False: 0]
  ------------------
 2809|   176k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 63, False: 176k]
  ------------------
 2810|     63|          return XML_ERROR_ASYNC_ENTITY;
 2811|   176k|        *nextPtr = s;
 2812|   176k|        return XML_ERROR_NONE;
 2813|   176k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.32k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.32k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.32k, False: 10.7M]
  ------------------
 2816|  2.32k|      *eventPP = next;
 2817|  2.32k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.33k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.33k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.33k, False: 10.7M]
  ------------------
 2819|  2.33k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 2.19k, False: 138]
  ------------------
 2820|  2.19k|        *nextPtr = s;
 2821|  2.19k|        return XML_ERROR_NONE;
 2822|  2.19k|      }
 2823|    138|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    309|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    309|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 309, False: 10.7M]
  ------------------
 2825|    309|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 309, False: 0]
  ------------------
 2826|    309|        *nextPtr = s;
 2827|    309|        return XML_ERROR_NONE;
 2828|    309|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   220k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   220k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 220k, False: 10.5M]
  ------------------
 2831|   220k|      const XML_Char *name;
 2832|   220k|      ENTITY *entity;
 2833|   220k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   220k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   220k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   220k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 21.7k, False: 198k]
  ------------------
 2836|  21.7k|#ifdef XML_DTD
 2837|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2838|       |         *       so there is no amplification and hence recording without
 2839|       |         *       protection. */
 2840|  21.7k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  21.7k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  21.7k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  21.7k|#endif /* XML_DTD */
 2844|  21.7k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 21.7k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  21.7k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 21.7k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  21.7k|        break;
 2849|  21.7k|      }
 2850|   198k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   198k|                             next - enc->minBytesPerChar);
 2852|   198k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 198k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   198k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   198k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   198k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2856|       |      /* First, determine if a check for an existing declaration is needed;
 2857|       |         if yes, check that the entity exists, and that it is internal,
 2858|       |         otherwise call the skipped entity or default handler.
 2859|       |      */
 2860|   198k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 150k, False: 48.1k]
  |  Branch (2860:40): [True: 201, False: 47.9k]
  ------------------
 2861|   150k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 353, False: 149k]
  ------------------
 2862|    353|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|   149k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 149k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|   150k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 17.5k, False: 30.4k]
  ------------------
 2866|  17.5k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 17.5k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  17.5k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 17.5k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  17.5k|        break;
 2871|  17.5k|      }
 2872|   180k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 3, False: 180k]
  ------------------
 2873|      3|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|   180k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 1, False: 180k]
  ------------------
 2875|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|   180k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 180k, False: 196]
  ------------------
 2877|   180k|        enum XML_Error result;
 2878|   180k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 180k]
  ------------------
 2879|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2881|      0|                                           0);
 2882|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2882:20): [True: 0, False: 0]
  ------------------
 2883|      0|            reportDefault(parser, enc, s, next);
 2884|      0|          break;
 2885|      0|        }
 2886|   180k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   180k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|   180k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 943, False: 179k]
  ------------------
 2888|    943|          return result;
 2889|   180k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 196]
  ------------------
 2890|      0|        const XML_Char *context;
 2891|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2892|      0|        context = getContext(parser);
 2893|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2894|      0|        if (! context)
  ------------------
  |  Branch (2894:13): [True: 0, False: 0]
  ------------------
 2895|      0|          return XML_ERROR_NO_MEMORY;
 2896|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2896:13): [True: 0, False: 0]
  ------------------
 2897|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2898|      0|                entity->systemId, entity->publicId))
 2899|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2900|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2901|    196|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 196]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|   179k|      break;
 2904|   180k|    }
 2905|  2.36M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.36M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 2.36M, False: 8.36M]
  ------------------
 2906|       |      /* fall through */
 2907|  2.37M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.37M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 15.5k, False: 10.7M]
  ------------------
 2908|  2.37M|      TAG *tag;
 2909|  2.37M|      enum XML_Error result;
 2910|  2.37M|      XML_Char *toPtr;
 2911|  2.37M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 13.5k, False: 2.36M]
  ------------------
 2912|  13.5k|        tag = parser->m_freeTagList;
 2913|  13.5k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  2.36M|      } else {
 2915|  2.36M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  2.36M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  2.36M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 2.36M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  2.36M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  2.36M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  2.36M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 2.36M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  2.36M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  2.36M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  2.36M|      }
 2925|  2.37M|      tag->bindings = NULL;
 2926|  2.37M|      tag->parent = parser->m_tagStack;
 2927|  2.37M|      parser->m_tagStack = tag;
 2928|  2.37M|      tag->name.localPart = NULL;
 2929|  2.37M|      tag->name.prefix = NULL;
 2930|  2.37M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  2.37M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.37M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  2.37M|      ++parser->m_tagLevel;
 2933|  2.37M|      {
 2934|  2.37M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  2.37M|        const char *fromPtr = tag->rawName;
 2936|  2.37M|        toPtr = (XML_Char *)tag->buf;
 2937|  2.38M|        for (;;) {
 2938|  2.38M|          int bufSize;
 2939|  2.38M|          int convLen;
 2940|  2.38M|          const enum XML_Convert_Result convert_res
 2941|  2.38M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  2.38M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.38M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  2.38M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  2.38M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  2.38M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 2.37M, False: 2.25k]
  ------------------
 2945|  2.38M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 2.25k]
  ------------------
 2946|  2.37M|            tag->name.strLen = convLen;
 2947|  2.37M|            break;
 2948|  2.37M|          }
 2949|  2.25k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  2.25k|          {
 2951|  2.25k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  2.25k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  2.25k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 2.25k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  2.25k|            tag->buf = temp;
 2955|  2.25k|            tag->bufEnd = temp + bufSize;
 2956|  2.25k|            toPtr = (XML_Char *)temp + convLen;
 2957|  2.25k|          }
 2958|  2.25k|        }
 2959|  2.37M|      }
 2960|  2.37M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  2.37M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  2.37M|#  define XML_T(x) x
  ------------------
 2962|  2.37M|      result
 2963|  2.37M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  2.37M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 693, False: 2.37M]
  ------------------
 2965|    693|        return result;
 2966|  2.37M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 2.37M, False: 0]
  ------------------
 2967|  2.37M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  2.37M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  2.37M|      poolClear(&parser->m_tempPool);
 2972|  2.37M|      break;
 2973|  2.37M|    }
 2974|  4.34k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  4.34k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 4.34k, False: 10.7M]
  ------------------
 2975|       |      /* fall through */
 2976|  35.3k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  35.3k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 30.9k, False: 10.6M]
  ------------------
 2977|  35.3k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  35.3k|      enum XML_Error result;
 2979|  35.3k|      BINDING *bindings = NULL;
 2980|  35.3k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  35.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  35.3k|      TAG_NAME name;
 2982|  35.3k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  35.3k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  35.3k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  35.3k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 35.3k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  35.3k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  35.3k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  35.3k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  35.3k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  35.3k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 39, False: 35.2k]
  ------------------
 2990|     39|        freeBindings(parser, bindings);
 2991|     39|        return result;
 2992|     39|      }
 2993|  35.2k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  35.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  35.2k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 35.2k, False: 0]
  ------------------
 2995|  35.2k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  35.2k|                                      (const XML_Char **)parser->m_atts);
 2997|  35.2k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  35.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  35.2k|      }
 2999|  35.2k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 35.2k, False: 0]
  ------------------
 3000|  35.2k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 35.2k, False: 0]
  ------------------
 3001|  35.2k|          *eventPP = *eventEndPP;
 3002|  35.2k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  35.2k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  35.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  35.2k|      }
 3005|  35.2k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 35.2k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  35.2k|      poolClear(&parser->m_tempPool);
 3008|  35.2k|      freeBindings(parser, bindings);
 3009|  35.2k|    }
 3010|  35.2k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 113, False: 35.1k]
  ------------------
 3011|  35.2k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 113, False: 0]
  ------------------
 3012|    113|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 113]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|    113|        else
 3015|    113|          return epilogProcessor(parser, next, end, nextPtr);
 3016|    113|      }
 3017|  35.1k|      break;
 3018|  35.1k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  14.2k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 14.2k, False: 10.7M]
  ------------------
 3019|  14.2k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 2, False: 14.2k]
  ------------------
 3020|      2|        return XML_ERROR_ASYNC_ENTITY;
 3021|  14.2k|      else {
 3022|  14.2k|        int len;
 3023|  14.2k|        const char *rawName;
 3024|  14.2k|        TAG *tag = parser->m_tagStack;
 3025|  14.2k|        rawName = s + enc->minBytesPerChar * 2;
 3026|  14.2k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  14.2k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|  14.2k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 27, False: 14.2k]
  ------------------
 3028|  14.2k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 172, False: 14.0k]
  ------------------
 3029|    199|          *eventPP = rawName;
 3030|    199|          return XML_ERROR_TAG_MISMATCH;
 3031|    199|        }
 3032|  14.0k|        parser->m_tagStack = tag->parent;
 3033|  14.0k|        tag->parent = parser->m_freeTagList;
 3034|  14.0k|        parser->m_freeTagList = tag;
 3035|  14.0k|        --parser->m_tagLevel;
 3036|  14.0k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 14.0k, False: 0]
  ------------------
 3037|  14.0k|          const XML_Char *localPart;
 3038|  14.0k|          const XML_Char *prefix;
 3039|  14.0k|          XML_Char *uri;
 3040|  14.0k|          localPart = tag->name.localPart;
 3041|  14.0k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 14.0k]
  |  Branch (3041:31): [True: 0, False: 0]
  ------------------
 3042|       |            /* localPart and prefix may have been overwritten in
 3043|       |               tag->name.str, since this points to the binding->uri
 3044|       |               buffer which gets re-used; so we have to add them again
 3045|       |            */
 3046|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3047|       |            /* don't need to check for space - already done in storeAtts() */
 3048|      0|            while (*localPart)
  ------------------
  |  Branch (3048:20): [True: 0, False: 0]
  ------------------
 3049|      0|              *uri++ = *localPart++;
 3050|      0|            prefix = tag->name.prefix;
 3051|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3051:17): [True: 0, False: 0]
  |  Branch (3051:42): [True: 0, False: 0]
  ------------------
 3052|      0|              *uri++ = parser->m_namespaceSeparator;
 3053|      0|              while (*prefix)
  ------------------
  |  Branch (3053:22): [True: 0, False: 0]
  ------------------
 3054|      0|                *uri++ = *prefix++;
 3055|      0|            }
 3056|      0|            *uri = XML_T('\0');
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
 3057|      0|          }
 3058|  14.0k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|  14.0k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|  14.0k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 14.0k]
  ------------------
 3062|      0|          BINDING *b = tag->bindings;
 3063|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3063:15): [True: 0, False: 0]
  ------------------
 3064|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3065|      0|                                              b->prefix->name);
 3066|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3067|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3068|      0|          parser->m_freeBindingList = b;
 3069|      0|          b->prefix->binding = b->prevPrefixBinding;
 3070|      0|        }
 3071|  14.0k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 26, False: 14.0k]
  ------------------
 3072|  14.0k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 26, False: 0]
  ------------------
 3073|     26|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 26]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     26|          else
 3076|     26|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     26|        }
 3078|  14.0k|      }
 3079|  14.0k|      break;
 3080|  14.0k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.43k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 8.43k, False: 10.7M]
  ------------------
 3081|  8.43k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.43k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  8.43k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 199, False: 8.23k]
  ------------------
 3083|    199|        return XML_ERROR_BAD_CHAR_REF;
 3084|  8.23k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 8.23k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  8.23k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 8.23k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  8.23k|    } break;
 3091|      1|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 1, False: 10.7M]
  ------------------
 3092|      1|      return XML_ERROR_MISPLACED_XML_PI;
 3093|  6.69M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  6.69M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 6.69M, False: 4.02M]
  ------------------
 3094|  6.69M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 6.69M]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|  6.69M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 6.69M]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|  6.69M|      break;
 3100|  2.83k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.83k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 2.83k, False: 10.7M]
  ------------------
 3101|  2.83k|      enum XML_Error result;
 3102|  2.83k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 2.83k]
  ------------------
 3103|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3104|       |      /* BEGIN disabled code */
 3105|       |      /* Suppose you doing a transformation on a document that involves
 3106|       |         changing only the character data.  You set up a defaultHandler
 3107|       |         and a characterDataHandler.  The defaultHandler simply copies
 3108|       |         characters through.  The characterDataHandler does the
 3109|       |         transformation and writes the characters out escaping them as
 3110|       |         necessary.  This case will fail to work if we leave out the
 3111|       |         following two lines (because & and < inside CDATA sections will
 3112|       |         be incorrectly escaped).
 3113|       |
 3114|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3115|       |         easier to let the user deal with this.
 3116|       |      */
 3117|  2.83k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3117:16): [Folded - Ignored]
  |  Branch (3117:23): [True: 0, False: 0]
  ------------------
 3118|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3119|      0|                                       0);
 3120|       |      /* END disabled code */
 3121|  2.83k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 2.83k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  2.83k|      result
 3124|  2.83k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  2.83k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 209, False: 2.62k]
  ------------------
 3126|    209|        return result;
 3127|  2.62k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 623, False: 2.00k]
  ------------------
 3128|    623|        parser->m_processor = cdataSectionProcessor;
 3129|    623|        return result;
 3130|    623|      }
 3131|  2.83k|    } break;
 3132|  3.05k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|  3.05k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 3.05k, False: 10.7M]
  ------------------
 3133|  3.05k|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 29, False: 3.02k]
  ------------------
 3134|     29|        *nextPtr = s;
 3135|     29|        return XML_ERROR_NONE;
 3136|     29|      }
 3137|  3.02k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 3.02k]
  ------------------
 3138|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3139|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3140|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3141|      0|          parser->m_characterDataHandler(
 3142|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3143|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3144|      0|        } else
 3145|      0|          parser->m_characterDataHandler(
 3146|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3147|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3148|  3.02k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 3.02k]
  ------------------
 3149|      0|        reportDefault(parser, enc, s, end);
 3150|       |      /* We are at the end of the final buffer, should we check for
 3151|       |         XML_SUSPENDED, XML_FINISHED?
 3152|       |      */
 3153|  3.02k|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 3.02k]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|  3.02k|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 21, False: 3.00k]
  ------------------
 3158|     21|        *eventPP = end;
 3159|     21|        return XML_ERROR_ASYNC_ENTITY;
 3160|     21|      }
 3161|  3.00k|      *nextPtr = end;
 3162|  3.00k|      return XML_ERROR_NONE;
 3163|  1.16M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  1.16M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 1.16M, False: 9.55M]
  ------------------
 3164|  1.16M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|  1.16M|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 1.16M]
  ------------------
 3166|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3167|      0|          for (;;) {
 3168|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3169|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3170|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3171|      0|            *eventEndPP = s;
 3172|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3173|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3174|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3174:17): [True: 0, False: 0]
  ------------------
 3175|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3175:20): [True: 0, False: 0]
  ------------------
 3176|      0|              break;
 3177|      0|            *eventPP = s;
 3178|      0|          }
 3179|      0|        } else
 3180|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3181|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3182|  1.16M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 1.16M]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|  1.16M|    } break;
 3185|  8.22k|    case XML_TOK_PI:
  ------------------
  |  |   76|  8.22k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 8.22k, False: 10.7M]
  ------------------
 3186|  8.22k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 8.22k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  8.22k|      break;
 3189|  8.22k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.75k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 1.75k, False: 10.7M]
  ------------------
 3190|  1.75k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 1.75k]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|  1.75k|      break;
 3193|  1.75k|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 10.7M]
  ------------------
 3194|       |      /* All of the tokens produced by XmlContentTok() have their own
 3195|       |       * explicit cases, so this default is not strictly necessary.
 3196|       |       * However it is a useful safety net, so we retain the code and
 3197|       |       * simply exclude it from the coverage tests.
 3198|       |       *
 3199|       |       * LCOV_EXCL_START
 3200|       |       */
 3201|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3201:11): [True: 0, False: 0]
  ------------------
 3202|      0|        reportDefault(parser, enc, s, next);
 3203|      0|      break;
 3204|       |      /* LCOV_EXCL_STOP */
 3205|  10.7M|    }
 3206|  10.5M|    *eventPP = s = next;
 3207|  10.5M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 10.5M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 10.5M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|  10.5M|    default:;
  ------------------
  |  Branch (3213:5): [True: 10.5M, False: 0]
  ------------------
 3214|  10.5M|    }
 3215|  10.5M|  }
 3216|       |  /* not reached */
 3217|   191k|}
xmlparse.c:hashTableIterInit:
 7159|  19.4k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  19.4k|  iter->p = table->v;
 7161|  19.4k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 10.2k, False: 9.23k]
  ------------------
 7162|  19.4k|}
xmlparse.c:hashTableIterNext:
 7165|  42.2k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   702k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 682k, False: 19.4k]
  ------------------
 7167|   682k|    NAMED *tem = *(iter->p)++;
 7168|   682k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 22.7k, False: 660k]
  ------------------
 7169|  22.7k|      return tem;
 7170|   682k|  }
 7171|  19.4k|  return NULL;
 7172|  42.2k|}
xmlparse.c:storeAtts:
 3254|  2.41M|          enum XML_Account account) {
 3255|  2.41M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  2.41M|  ELEMENT_TYPE *elementType;
 3257|  2.41M|  int nDefaultAtts;
 3258|  2.41M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  2.41M|  int attIndex = 0;
 3260|  2.41M|  int prefixLen;
 3261|  2.41M|  int i;
 3262|  2.41M|  int n;
 3263|  2.41M|  XML_Char *uri;
 3264|  2.41M|  int nPrefixes = 0;
 3265|  2.41M|  BINDING *binding;
 3266|  2.41M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  2.41M|  elementType
 3270|  2.41M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  2.41M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 18.1k, False: 2.39M]
  ------------------
 3272|  18.1k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  18.1k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 18.1k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  18.1k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  18.1k|                                         sizeof(ELEMENT_TYPE));
 3277|  18.1k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 18.1k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  18.1k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 18.1k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  18.1k|  }
 3282|  2.41M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  2.41M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.41M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  2.41M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 2.41M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  2.41M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 433, False: 2.41M]
  ------------------
 3293|    433|    int oldAttsSize = parser->m_attsSize;
 3294|    433|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    433|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    433|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 433]
  ------------------
 3301|    433|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    433|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 433]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    433|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    433|#define INIT_ATTS_SIZE 16
  ------------------
 3306|       |
 3307|       |    /* Detect and prevent integer overflow.
 3308|       |     * The preprocessor guard addresses the "always false" warning
 3309|       |     * from -Wtype-limits on platforms where
 3310|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3311|       |#if UINT_MAX >= SIZE_MAX
 3312|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3313|       |      parser->m_attsSize = oldAttsSize;
 3314|       |      return XML_ERROR_NO_MEMORY;
 3315|       |    }
 3316|       |#endif
 3317|       |
 3318|    433|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    433|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    433|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    433|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 433]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    433|    parser->m_atts = temp;
 3325|       |#ifdef XML_ATTR_INFO
 3326|       |    /* Detect and prevent integer overflow.
 3327|       |     * The preprocessor guard addresses the "always false" warning
 3328|       |     * from -Wtype-limits on platforms where
 3329|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3330|       |#  if UINT_MAX >= SIZE_MAX
 3331|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3332|       |      parser->m_attsSize = oldAttsSize;
 3333|       |      return XML_ERROR_NO_MEMORY;
 3334|       |    }
 3335|       |#  endif
 3336|       |
 3337|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3338|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3339|       |    if (temp2 == NULL) {
 3340|       |      parser->m_attsSize = oldAttsSize;
 3341|       |      return XML_ERROR_NO_MEMORY;
 3342|       |    }
 3343|       |    parser->m_attInfo = temp2;
 3344|       |#endif
 3345|    433|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 415, False: 18]
  ------------------
 3346|    415|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    415|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    433|  }
 3348|       |
 3349|  2.41M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  2.49M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 77.1k, False: 2.41M]
  ------------------
 3351|  77.1k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3352|       |#ifdef XML_ATTR_INFO
 3353|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3354|       |#endif
 3355|       |    /* add the name and value to the attribute list */
 3356|  77.1k|    ATTRIBUTE_ID *attId
 3357|  77.1k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  77.1k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  77.1k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  77.1k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 77.1k]
  ------------------
 3360|      0|      return XML_ERROR_NO_MEMORY;
 3361|       |#ifdef XML_ATTR_INFO
 3362|       |    currAttInfo->nameStart
 3363|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3364|       |    currAttInfo->nameEnd
 3365|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3366|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3367|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3368|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3369|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3370|       |#endif
 3371|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3372|       |       namespace processing is turned on and different prefixes for the same
 3373|       |       namespace are used. For this case we have a check further down.
 3374|       |    */
 3375|  77.1k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 496, False: 76.6k]
  ------------------
 3376|    496|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 495, False: 1]
  ------------------
 3377|    495|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    496|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    496|    }
 3380|  76.6k|    (attId->name)[-1] = 1;
 3381|  76.6k|    appAtts[attIndex++] = attId->name;
 3382|  76.6k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 9.78k, False: 66.8k]
  ------------------
 3383|  9.78k|      enum XML_Error result;
 3384|  9.78k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  9.78k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  9.78k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 1.28k, False: 8.50k]
  ------------------
 3388|  1.28k|        int j;
 3389|  85.0k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 84.6k, False: 388]
  ------------------
 3390|  84.6k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 893, False: 83.7k]
  ------------------
 3391|    893|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|    893|            break;
 3393|    893|          }
 3394|  84.6k|        }
 3395|  1.28k|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  9.78k|      result = storeAttributeValue(
 3399|  9.78k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  9.78k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  9.78k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 236, False: 9.55k]
  ------------------
 3402|    236|        return result;
 3403|  9.55k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  9.55k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  9.55k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.55k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  66.8k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  66.8k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  66.8k|                                          parser->m_atts[i].valuePtr,
 3409|  66.8k|                                          parser->m_atts[i].valueEnd);
 3410|  66.8k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 66.8k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  66.8k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  66.8k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  66.8k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  76.3k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 76.3k]
  ------------------
 3416|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3416:11): [True: 0, False: 0]
  ------------------
 3417|       |        /* deal with namespace declarations here */
 3418|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3419|      0|                                           appAtts[attIndex], bindingsPtr);
 3420|      0|        if (result)
  ------------------
  |  Branch (3420:13): [True: 0, False: 0]
  ------------------
 3421|      0|          return result;
 3422|      0|        --attIndex;
 3423|      0|      } else {
 3424|       |        /* deal with other prefixed names later */
 3425|      0|        attIndex++;
 3426|      0|        nPrefixes++;
 3427|      0|        (attId->name)[-1] = 2;
 3428|      0|      }
 3429|      0|    } else
 3430|  76.3k|      attIndex++;
 3431|  76.3k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  2.41M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  2.41M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 574, False: 2.41M]
  |  Branch (3435:29): [True: 355, False: 219]
  ------------------
 3436|    549|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 549, False: 0]
  ------------------
 3437|    549|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 355, False: 194]
  ------------------
 3438|    355|        parser->m_idAttIndex = i;
 3439|    355|        break;
 3440|    355|      }
 3441|    355|  } else
 3442|  2.41M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  2.52M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 113k, False: 2.41M]
  ------------------
 3446|   113k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|   113k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 112k, False: 1.02k]
  |  Branch (3447:33): [True: 654, False: 111k]
  ------------------
 3448|    654|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 654]
  ------------------
 3449|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3449:13): [True: 0, False: 0]
  ------------------
 3450|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3451|      0|                                             da->value, bindingsPtr);
 3452|      0|          if (result)
  ------------------
  |  Branch (3452:15): [True: 0, False: 0]
  ------------------
 3453|      0|            return result;
 3454|      0|        } else {
 3455|      0|          (da->id->name)[-1] = 2;
 3456|      0|          nPrefixes++;
 3457|      0|          appAtts[attIndex++] = da->id->name;
 3458|      0|          appAtts[attIndex++] = da->value;
 3459|      0|        }
 3460|    654|      } else {
 3461|    654|        (da->id->name)[-1] = 1;
 3462|    654|        appAtts[attIndex++] = da->id->name;
 3463|    654|        appAtts[attIndex++] = da->value;
 3464|    654|      }
 3465|    654|    }
 3466|   113k|  }
 3467|  2.41M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  2.41M|  i = 0;
 3472|  2.41M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 2.41M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  2.48M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 75.8k, False: 2.41M]
  ------------------
 3640|  75.8k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  2.41M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 2.41M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  2.41M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 2.41M, False: 0]
  ------------------
 3645|  2.41M|    return XML_ERROR_NONE;
 3646|       |
 3647|       |  /* expand the element type name */
 3648|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3648:7): [True: 0, False: 0]
  ------------------
 3649|      0|    binding = elementType->prefix->binding;
 3650|      0|    if (! binding)
  ------------------
  |  Branch (3650:9): [True: 0, False: 0]
  ------------------
 3651|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3652|      0|    localPart = tagNamePtr->str;
 3653|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3653:12): [True: 0, False: 0]
  ------------------
 3654|      0|      ;
 3655|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3655:14): [True: 0, False: 0]
  ------------------
 3656|      0|    binding = dtd->defaultPrefix.binding;
 3657|      0|    localPart = tagNamePtr->str;
 3658|      0|  } else
 3659|      0|    return XML_ERROR_NONE;
 3660|      0|  prefixLen = 0;
 3661|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 0]
  |  Branch (3661:32): [True: 0, False: 0]
  ------------------
 3662|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3662:12): [True: 0, False: 0]
  ------------------
 3663|      0|      ; /* prefixLen includes null terminator */
 3664|      0|  }
 3665|      0|  tagNamePtr->localPart = localPart;
 3666|      0|  tagNamePtr->uriLen = binding->uriLen;
 3667|      0|  tagNamePtr->prefix = binding->prefix->name;
 3668|      0|  tagNamePtr->prefixLen = prefixLen;
 3669|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3669:15): [True: 0, False: 0]
  ------------------
 3670|      0|    ; /* i includes null terminator */
 3671|       |
 3672|       |  /* Detect and prevent integer overflow */
 3673|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3673:7): [True: 0, False: 0]
  ------------------
 3674|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3674:10): [True: 0, False: 0]
  ------------------
 3675|      0|    return XML_ERROR_NO_MEMORY;
 3676|      0|  }
 3677|       |
 3678|      0|  n = i + binding->uriLen + prefixLen;
 3679|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3679:7): [True: 0, False: 0]
  ------------------
 3680|      0|    TAG *p;
 3681|       |
 3682|       |    /* Detect and prevent integer overflow */
 3683|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3683:9): [True: 0, False: 0]
  ------------------
 3684|      0|      return XML_ERROR_NO_MEMORY;
 3685|      0|    }
 3686|       |    /* Detect and prevent integer overflow.
 3687|       |     * The preprocessor guard addresses the "always false" warning
 3688|       |     * from -Wtype-limits on platforms where
 3689|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3690|       |#if UINT_MAX >= SIZE_MAX
 3691|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3692|       |      return XML_ERROR_NO_MEMORY;
 3693|       |    }
 3694|       |#endif
 3695|       |
 3696|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3697|      0|    if (! uri)
  ------------------
  |  Branch (3697:9): [True: 0, False: 0]
  ------------------
 3698|      0|      return XML_ERROR_NO_MEMORY;
 3699|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
 3700|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3701|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3701:34): [True: 0, False: 0]
  ------------------
 3702|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3702:11): [True: 0, False: 0]
  ------------------
 3703|      0|        p->name.str = uri;
 3704|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3705|      0|    binding->uri = uri;
 3706|      0|  }
 3707|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3708|      0|  uri = binding->uri + binding->uriLen;
 3709|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3710|       |  /* we always have a namespace separator between localPart and prefix */
 3711|      0|  if (prefixLen) {
  ------------------
  |  Branch (3711:7): [True: 0, False: 0]
  ------------------
 3712|      0|    uri += i - 1;
 3713|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3714|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3715|      0|  }
 3716|      0|  tagNamePtr->str = binding->uri;
 3717|      0|  return XML_ERROR_NONE;
 3718|      0|}
xmlparse.c:setElementTypePrefix:
 6447|  4.64k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  4.64k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  4.64k|  const XML_Char *name;
 6450|  98.7k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 97.1k, False: 1.62k]
  ------------------
 6451|  97.1k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|  97.1k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 3.02k, False: 94.0k]
  ------------------
 6452|  3.02k|      PREFIX *prefix;
 6453|  3.02k|      const XML_Char *s;
 6454|  83.1k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 80.0k, False: 3.02k]
  ------------------
 6455|  80.0k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|  80.0k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 99, False: 79.9k]
  |  |  |  Branch (603:35): [True: 0, False: 99]
  |  |  ------------------
  |  |  604|  80.0k|       ? 0                                                                     \
  |  |  605|  80.0k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 80.0k]
  ------------------
 6456|      0|          return 0;
 6457|  80.0k|      }
 6458|  3.02k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  3.02k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 12, False: 3.01k]
  |  |  |  Branch (603:35): [True: 0, False: 12]
  |  |  ------------------
  |  |  604|  3.02k|       ? 0                                                                     \
  |  |  605|  3.02k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 3.02k]
  ------------------
 6459|      0|        return 0;
 6460|  3.02k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  3.02k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  3.02k|                                sizeof(PREFIX));
 6462|  3.02k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 3.02k]
  ------------------
 6463|      0|        return 0;
 6464|  3.02k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  3.02k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 2.69k, False: 329]
  ------------------
 6465|  2.69k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  2.69k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    329|      else
 6467|    329|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    329|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  3.02k|      elementType->prefix = prefix;
 6469|  3.02k|      break;
 6470|  3.02k|    }
 6471|  97.1k|  }
 6472|  4.64k|  return 1;
 6473|  4.64k|}
xmlparse.c:freeBindings:
 3224|  35.3k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  35.3k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 35.3k]
  ------------------
 3226|      0|    BINDING *b = bindings;
 3227|       |
 3228|       |    /* m_startNamespaceDeclHandler will have been called for this
 3229|       |     * binding in addBindings(), so call the end handler now.
 3230|       |     */
 3231|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3231:9): [True: 0, False: 0]
  ------------------
 3232|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3233|       |
 3234|      0|    bindings = bindings->nextTagBinding;
 3235|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3236|      0|    parser->m_freeBindingList = b;
 3237|      0|    b->prefix->binding = b->prevPrefixBinding;
 3238|      0|  }
 3239|  35.3k|}
xmlparse.c:epilogProcessor:
 5647|    139|                const char **nextPtr) {
 5648|    139|  parser->m_processor = epilogProcessor;
 5649|    139|  parser->m_eventPtr = s;
 5650|  1.33k|  for (;;) {
 5651|  1.33k|    const char *next = NULL;
 5652|  1.33k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.33k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.33k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|  1.33k|#ifdef XML_DTD
 5654|  1.33k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 1.33k]
  ------------------
 5655|  1.33k|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|  1.33k|#endif
 5660|  1.33k|    parser->m_eventEndPtr = next;
 5661|  1.33k|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 1, False: 1.32k]
  ------------------
 5664|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 1]
  ------------------
 5665|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5666|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5666:13): [True: 0, False: 0]
  ------------------
 5667|      0|          return XML_ERROR_ABORTED;
 5668|      0|      }
 5669|      1|      *nextPtr = next;
 5670|      1|      return XML_ERROR_NONE;
 5671|     69|    case XML_TOK_NONE:
  ------------------
  |  |   51|     69|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 69, False: 1.26k]
  ------------------
 5672|     69|      *nextPtr = s;
 5673|     69|      return XML_ERROR_NONE;
 5674|    423|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    423|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 423, False: 907]
  ------------------
 5675|    423|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 423]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    423|      break;
 5678|    574|    case XML_TOK_PI:
  ------------------
  |  |   76|    574|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 574, False: 756]
  ------------------
 5679|    574|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 574]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    574|      break;
 5682|    574|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 194, False: 1.13k]
  ------------------
 5683|    194|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 194]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|    194|      break;
 5686|    194|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 13, False: 1.31k]
  ------------------
 5687|     13|      parser->m_eventPtr = next;
 5688|     13|      return XML_ERROR_INVALID_TOKEN;
 5689|      7|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5689:5): [True: 7, False: 1.32k]
  ------------------
 5690|      7|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5690:11): [True: 7, False: 0]
  ------------------
 5691|      7|        *nextPtr = s;
 5692|      7|        return XML_ERROR_NONE;
 5693|      7|      }
 5694|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5695|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5695:5): [True: 1, False: 1.32k]
  ------------------
 5696|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5696:11): [True: 1, False: 0]
  ------------------
 5697|      1|        *nextPtr = s;
 5698|      1|        return XML_ERROR_NONE;
 5699|      1|      }
 5700|      0|      return XML_ERROR_PARTIAL_CHAR;
 5701|     48|    default:
  ------------------
  |  Branch (5701:5): [True: 48, False: 1.28k]
  ------------------
 5702|     48|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|  1.33k|    }
 5704|  1.19k|    parser->m_eventPtr = s = next;
 5705|  1.19k|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 1.19k]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 1.19k]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|  1.19k|    default:;
  ------------------
  |  Branch (5711:5): [True: 1.19k, False: 0]
  ------------------
 5712|  1.19k|    }
 5713|  1.19k|  }
 5714|    139|}
xmlparse.c:doCdataSection:
 4027|  2.83k|               enum XML_Account account) {
 4028|  2.83k|  const char *s = *startPtr;
 4029|  2.83k|  const char **eventPP;
 4030|  2.83k|  const char **eventEndPP;
 4031|  2.83k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 1.48k, False: 1.34k]
  ------------------
 4032|  1.48k|    eventPP = &parser->m_eventPtr;
 4033|  1.48k|    *eventPP = s;
 4034|  1.48k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  1.48k|  } else {
 4036|  1.34k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  1.34k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  1.34k|  }
 4039|  2.83k|  *eventPP = s;
 4040|  2.83k|  *startPtr = NULL;
 4041|       |
 4042|   716k|  for (;;) {
 4043|   716k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|   716k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   716k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   716k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|   716k|#ifdef XML_DTD
 4046|   716k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 0, False: 716k]
  ------------------
 4047|      0|      accountingOnAbort(parser);
 4048|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      0|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|   716k|    *eventEndPP = next;
 4054|   716k|    switch (tok) {
 4055|  2.00k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  2.00k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 2.00k, False: 714k]
  ------------------
 4056|  2.00k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 2.00k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  2.00k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4060:16): [Folded - Ignored]
  |  Branch (4060:23): [True: 0, False: 0]
  ------------------
 4061|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4062|      0|                                       0);
 4063|       |      /* END disabled code */
 4064|  2.00k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 2.00k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  2.00k|      *startPtr = next;
 4067|  2.00k|      *nextPtr = next;
 4068|  2.00k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 2.00k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  2.00k|      else
 4071|  2.00k|        return XML_ERROR_NONE;
 4072|   351k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   351k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 351k, False: 365k]
  ------------------
 4073|   351k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 351k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|   351k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 351k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|   351k|      break;
 4079|   362k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   362k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 362k, False: 353k]
  ------------------
 4080|   362k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|   362k|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 362k]
  ------------------
 4082|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4083|      0|          for (;;) {
 4084|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4085|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4086|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4087|      0|            *eventEndPP = next;
 4088|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4089|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4090|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4090:17): [True: 0, False: 0]
  ------------------
 4091|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4091:20): [True: 0, False: 0]
  ------------------
 4092|      0|              break;
 4093|      0|            *eventPP = s;
 4094|      0|          }
 4095|      0|        } else
 4096|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4097|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4098|   362k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 362k]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|   362k|    } break;
 4101|    167|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    167|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 167, False: 716k]
  ------------------
 4102|    167|      *eventPP = next;
 4103|    167|      return XML_ERROR_INVALID_TOKEN;
 4104|    131|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    131|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 131, False: 716k]
  ------------------
 4105|    131|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 131, False: 0]
  ------------------
 4106|    131|        *nextPtr = s;
 4107|    131|        return XML_ERROR_NONE;
 4108|    131|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|     90|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     90|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 90, False: 716k]
  ------------------
 4111|    534|    case XML_TOK_NONE:
  ------------------
  |  |   51|    534|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 444, False: 715k]
  ------------------
 4112|    534|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 492, False: 42]
  ------------------
 4113|    492|        *nextPtr = s;
 4114|    492|        return XML_ERROR_NONE;
 4115|    492|      }
 4116|     42|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 716k]
  ------------------
 4118|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4119|       |       * explicit case, so this default case will never be executed.
 4120|       |       * We retain it as a safety net and exclude it from the coverage
 4121|       |       * statistics.
 4122|       |       *
 4123|       |       * LCOV_EXCL_START
 4124|       |       */
 4125|      0|      *eventPP = next;
 4126|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4127|       |      /* LCOV_EXCL_STOP */
 4128|   716k|    }
 4129|       |
 4130|   713k|    *eventPP = s = next;
 4131|   713k|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 713k]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 713k]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|   713k|    default:;
  ------------------
  |  Branch (4137:5): [True: 713k, False: 0]
  ------------------
 4138|   713k|    }
 4139|   713k|  }
 4140|       |  /* not reached */
 4141|  2.83k|}
xmlparse.c:storeRawNames:
 2572|  6.95k|storeRawNames(XML_Parser parser) {
 2573|  6.95k|  TAG *tag = parser->m_tagStack;
 2574|  69.4k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 62.5k, False: 6.95k]
  ------------------
 2575|  62.5k|    int bufSize;
 2576|  62.5k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  62.5k|    size_t rawNameLen;
 2578|  62.5k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  62.5k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 62.5k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  62.5k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  62.5k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  62.5k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 62.5k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  62.5k|    bufSize = nameLen + (int)rawNameLen;
 2594|  62.5k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 401, False: 62.1k]
  ------------------
 2595|    401|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    401|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    401|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 401]
  ------------------
 2597|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2598|       |      /* if tag->name.str points to tag->buf (only when namespace
 2599|       |         processing is off) then we have to update it
 2600|       |      */
 2601|    401|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 401, False: 0]
  ------------------
 2602|    401|        tag->name.str = (XML_Char *)temp;
 2603|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2604|       |         then update it as well, since it will always point into tag->buf
 2605|       |      */
 2606|    401|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 401]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    401|      tag->buf = temp;
 2610|    401|      tag->bufEnd = temp + bufSize;
 2611|    401|      rawNameBuf = temp + nameLen;
 2612|    401|    }
 2613|  62.5k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  62.5k|    tag->rawName = rawNameBuf;
 2615|  62.5k|    tag = tag->parent;
 2616|  62.5k|  }
 2617|  6.95k|  return XML_TRUE;
  ------------------
  |  |   55|  6.95k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  6.95k|}
xmlparse.c:getElementType:
 7615|  8.91k|               const char *end) {
 7616|  8.91k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  8.91k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  8.91k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  8.91k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 8.91k]
  ------------------
 7621|      0|    return NULL;
 7622|  8.91k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  8.91k|                               sizeof(ELEMENT_TYPE));
 7624|  8.91k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 8.91k]
  ------------------
 7625|      0|    return NULL;
 7626|  8.91k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 4.26k, False: 4.64k]
  ------------------
 7627|  4.26k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  4.26k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  4.64k|  else {
 7629|  4.64k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  4.64k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  4.64k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 4.64k]
  ------------------
 7631|      0|      return NULL;
 7632|  4.64k|  }
 7633|  8.91k|  return ret;
 7634|  8.91k|}
xmlparse.c:getAttributeId:
 6477|   121k|               const char *end) {
 6478|   121k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|   121k|  ATTRIBUTE_ID *id;
 6480|   121k|  const XML_Char *name;
 6481|   121k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|   121k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 352, False: 120k]
  |  |  |  Branch (603:35): [True: 0, False: 352]
  |  |  ------------------
  |  |  604|   121k|       ? 0                                                                     \
  |  |  605|   121k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 121k]
  ------------------
 6482|      0|    return NULL;
 6483|   121k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|   121k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 121k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|   121k|  ++name;
 6488|   121k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|   121k|                              sizeof(ATTRIBUTE_ID));
 6490|   121k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 121k]
  ------------------
 6491|      0|    return NULL;
 6492|   121k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 113k, False: 7.45k]
  ------------------
 6493|   113k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   113k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  7.45k|  else {
 6495|  7.45k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.45k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  7.45k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 7.45k, False: 0]
  ------------------
 6497|  7.45k|      ;
 6498|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:14): [True: 0, False: 0]
  |  Branch (6498:43): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  |  Branch (6499:46): [True: 0, False: 0]
  ------------------
 6500|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:17): [True: 0, False: 0]
  ------------------
 6501|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:18): [True: 0, False: 0]
  |  Branch (6501:44): [True: 0, False: 0]
  ------------------
 6502|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6502:11): [True: 0, False: 0]
  ------------------
 6503|      0|        id->prefix = &dtd->defaultPrefix;
 6504|      0|      else
 6505|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6506|      0|                                      sizeof(PREFIX));
 6507|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6508|      0|    } else {
 6509|      0|      int i;
 6510|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6510:19): [True: 0, False: 0]
  ------------------
 6511|       |        /* attributes without prefix are *not* in the default namespace */
 6512|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6512:13): [True: 0, False: 0]
  ------------------
 6513|      0|          int j;
 6514|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6514:23): [True: 0, False: 0]
  ------------------
 6515|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6515:17): [True: 0, False: 0]
  ------------------
 6516|      0|              return NULL;
 6517|      0|          }
 6518|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6518:15): [True: 0, False: 0]
  ------------------
 6519|      0|            return NULL;
 6520|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6521|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6522|      0|          if (! id->prefix)
  ------------------
  |  Branch (6522:15): [True: 0, False: 0]
  ------------------
 6523|      0|            return NULL;
 6524|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6524:15): [True: 0, False: 0]
  ------------------
 6525|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6526|      0|          else
 6527|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6528|      0|          break;
 6529|      0|        }
 6530|      0|      }
 6531|      0|    }
 6532|  7.45k|  }
 6533|   121k|  return id;
 6534|   121k|}
xmlparse.c:poolAppend:
 7221|  34.4M|           const char *end) {
 7222|  34.4M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 53.1k, False: 34.4M]
  |  Branch (7222:22): [True: 0, False: 53.1k]
  ------------------
 7223|      0|    return NULL;
 7224|  34.5M|  for (;;) {
 7225|  34.5M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  34.5M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  34.5M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  34.5M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  34.5M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 34.4M, False: 11.3k]
  ------------------
 7228|  34.5M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 11.3k]
  ------------------
 7229|  34.4M|      break;
 7230|  11.3k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 11.3k]
  ------------------
 7231|      0|      return NULL;
 7232|  11.3k|  }
 7233|  34.4M|  return pool->start;
 7234|  34.4M|}
xmlparse.c:defineAttribute:
 6387|  42.6k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  42.6k|  DEFAULT_ATTRIBUTE *att;
 6389|  42.6k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 9.06k, False: 33.5k]
  |  Branch (6389:16): [True: 1.54k, False: 32.0k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  10.6k|    int i;
 6393|  54.1k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 52.2k, False: 1.93k]
  ------------------
 6394|  52.2k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 8.67k, False: 43.5k]
  ------------------
 6395|  8.67k|        return 1;
 6396|  1.93k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 429, False: 1.50k]
  |  Branch (6396:17): [True: 252, False: 177]
  |  Branch (6396:34): [True: 252, False: 0]
  ------------------
 6397|    252|      type->idAtt = attId;
 6398|  1.93k|  }
 6399|  33.9k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 1.35k, False: 32.6k]
  ------------------
 6400|  1.35k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 1.03k, False: 320]
  ------------------
 6401|  1.03k|      type->allocDefaultAtts = 8;
 6402|  1.03k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|  1.03k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|  1.03k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|  1.03k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 1.03k]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|  1.03k|    } else {
 6409|    320|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    320|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 320]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    320|      int count = type->allocDefaultAtts * 2;
 6417|       |
 6418|       |      /* Detect and prevent integer overflow.
 6419|       |       * The preprocessor guard addresses the "always false" warning
 6420|       |       * from -Wtype-limits on platforms where
 6421|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6422|       |#if UINT_MAX >= SIZE_MAX
 6423|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6424|       |        return 0;
 6425|       |      }
 6426|       |#endif
 6427|       |
 6428|    320|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    320|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    320|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    320|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 320]
  ------------------
 6431|      0|        return 0;
 6432|    320|      type->allocDefaultAtts = count;
 6433|    320|      type->defaultAtts = temp;
 6434|    320|    }
 6435|  1.35k|  }
 6436|  33.9k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  33.9k|  att->id = attId;
 6438|  33.9k|  att->value = value;
 6439|  33.9k|  att->isCdata = isCdata;
 6440|  33.9k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 33.5k, False: 389]
  ------------------
 6441|  33.5k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  33.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  33.9k|  type->nDefaultAtts += 1;
 6443|  33.9k|  return 1;
 6444|  33.9k|}
xmlparse.c:poolGrow:
 7322|  78.6k|poolGrow(STRING_POOL *pool) {
 7323|  78.6k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 50.3k, False: 28.2k]
  ------------------
 7324|  50.3k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 48.0k, False: 2.23k]
  ------------------
 7325|  48.0k|      pool->blocks = pool->freeBlocks;
 7326|  48.0k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  48.0k|      pool->blocks->next = NULL;
 7328|  48.0k|      pool->start = pool->blocks->s;
 7329|  48.0k|      pool->end = pool->start + pool->blocks->size;
 7330|  48.0k|      pool->ptr = pool->start;
 7331|  48.0k|      return XML_TRUE;
  ------------------
  |  |   55|  48.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  48.0k|    }
 7333|  2.23k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 2.05k, False: 171]
  ------------------
 7334|  2.05k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  2.05k|      pool->freeBlocks->next = pool->blocks;
 7336|  2.05k|      pool->blocks = pool->freeBlocks;
 7337|  2.05k|      pool->freeBlocks = tem;
 7338|  2.05k|      memcpy(pool->blocks->s, pool->start,
 7339|  2.05k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  2.05k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  2.05k|      pool->start = pool->blocks->s;
 7342|  2.05k|      pool->end = pool->start + pool->blocks->size;
 7343|  2.05k|      return XML_TRUE;
  ------------------
  |  |   55|  2.05k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  2.05k|    }
 7345|  2.23k|  }
 7346|  28.4k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 11.1k, False: 17.2k]
  |  Branch (7346:23): [True: 8.11k, False: 3.04k]
  ------------------
 7347|  8.11k|    BLOCK *temp;
 7348|  8.11k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  8.11k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  8.11k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  8.11k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 8.11k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  8.11k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  8.11k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 8.11k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  8.11k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  8.11k|                                           (unsigned)bytesToAllocate);
 7371|  8.11k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 8.11k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  8.11k|    pool->blocks = temp;
 7374|  8.11k|    pool->blocks->size = blockSize;
 7375|  8.11k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  8.11k|    pool->start = pool->blocks->s;
 7377|  8.11k|    pool->end = pool->start + blockSize;
 7378|  20.3k|  } else {
 7379|  20.3k|    BLOCK *tem;
 7380|  20.3k|    int blockSize = (int)(pool->end - pool->start);
 7381|  20.3k|    size_t bytesToAllocate;
 7382|       |
 7383|  20.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 20.3k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  20.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  20.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 20.0k, False: 303]
  ------------------
 7397|  20.0k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  20.0k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    303|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    303|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 303]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    303|      blockSize *= 2;
 7404|    303|    }
 7405|       |
 7406|  20.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  20.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 20.3k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  20.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  20.3k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 20.3k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  20.3k|    tem->size = blockSize;
 7414|  20.3k|    tem->next = pool->blocks;
 7415|  20.3k|    pool->blocks = tem;
 7416|  20.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 2.60k, False: 17.7k]
  ------------------
 7417|  2.60k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  20.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  20.3k|    pool->start = tem->s;
 7420|  20.3k|    pool->end = tem->s + blockSize;
 7421|  20.3k|  }
 7422|  28.4k|  return XML_TRUE;
  ------------------
  |  |   55|  28.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  28.4k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  28.4k|poolBytesToAllocateFor(int blockSize) {
 7295|       |  /* Unprotected math would be:
 7296|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7297|       |  **
 7298|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7299|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7300|       |  ** on top has no chance of making us accept a small non-negative number
 7301|       |  */
 7302|  28.4k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  28.4k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 28.4k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  28.4k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 28.4k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  28.4k|  {
 7311|  28.4k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  28.4k|    const int bytesToAllocate
 7313|  28.4k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  28.4k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 28.4k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  28.4k|    return (size_t)bytesToAllocate;
 7318|  28.4k|  }
 7319|  28.4k|}
xmlparse.c:storeAttributeValue:
 5872|  18.8k|                    enum XML_Account account) {
 5873|  18.8k|  enum XML_Error result
 5874|  18.8k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  18.8k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 252, False: 18.6k]
  ------------------
 5876|    252|    return result;
 5877|  18.6k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  28.4k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 5.72k, False: 4.11k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  5.72k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 9.83k, False: 8.77k]
  |  Branch (5877:40): [True: 974, False: 4.75k]
  ------------------
 5878|    974|    poolChop(pool);
  ------------------
  |  |  598|    974|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  18.6k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  18.6k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 891, False: 17.7k]
  |  |  |  Branch (603:35): [True: 0, False: 891]
  |  |  ------------------
  |  |  604|  18.6k|       ? 0                                                                     \
  |  |  605|  18.6k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 18.6k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  18.6k|  return XML_ERROR_NONE;
 5882|  18.6k|}
xmlparse.c:appendAttributeValue:
 5887|  4.11M|                     enum XML_Account account) {
 5888|  4.11M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|   240M|  for (;;) {
 5894|   240M|    const char *next
 5895|   240M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|   240M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|   240M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   240M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|   240M|#ifdef XML_DTD
 5898|   240M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 36, False: 240M]
  ------------------
 5899|     36|      accountingOnAbort(parser);
 5900|     36|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     36|    }
 5902|   240M|#endif
 5903|   240M|    switch (tok) {
 5904|  4.11M|    case XML_TOK_NONE:
  ------------------
  |  |   51|  4.11M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 4.11M, False: 236M]
  ------------------
 5905|  4.11M|      return XML_ERROR_NONE;
 5906|     13|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 13, False: 240M]
  ------------------
 5907|     13|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 9, False: 4]
  ------------------
 5908|      9|        parser->m_eventPtr = next;
 5909|     13|      return XML_ERROR_INVALID_TOKEN;
 5910|      4|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5910:5): [True: 4, False: 240M]
  ------------------
 5911|      4|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5911:11): [True: 3, False: 1]
  ------------------
 5912|      3|        parser->m_eventPtr = ptr;
 5913|      4|      return XML_ERROR_INVALID_TOKEN;
 5914|  44.3k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  44.3k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 44.3k, False: 240M]
  ------------------
 5915|  44.3k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  44.3k|      int i;
 5917|  44.3k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  44.3k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  44.3k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 42, False: 44.3k]
  ------------------
 5919|     42|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 41, False: 1]
  ------------------
 5920|     41|          parser->m_eventPtr = ptr;
 5921|     42|        return XML_ERROR_BAD_CHAR_REF;
 5922|     42|      }
 5923|  44.3k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 1.16k, False: 43.1k]
  |  Branch (5923:24): [True: 642, False: 521]
  ------------------
 5924|  44.3k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    642|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    576|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 66, False: 576]
  |  Branch (5924:40): [True: 274, False: 302]
  ------------------
 5925|    340|        break;
 5926|  43.9k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  43.9k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5927|       |      /* The XmlEncode() functions can never return 0 here.  That
 5928|       |       * error return happens if the code point passed in is either
 5929|       |       * negative or greater than or equal to 0x110000.  The
 5930|       |       * XmlCharRefNumber() functions will all return a number
 5931|       |       * strictly less than 0x110000 or a negative value if an error
 5932|       |       * occurred.  The negative value is intercepted above, so
 5933|       |       * XmlEncode() is never passed a value it might return an
 5934|       |       * error for.
 5935|       |       */
 5936|   131k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 87.8k, False: 43.9k]
  ------------------
 5937|  87.8k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  87.8k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 314, False: 87.5k]
  |  |  |  Branch (603:35): [True: 0, False: 314]
  |  |  ------------------
  |  |  604|  87.8k|       ? 0                                                                     \
  |  |  605|  87.8k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 87.8k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  87.8k|      }
 5940|  43.9k|    } break;
 5941|  29.7M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  29.7M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 29.7M, False: 210M]
  ------------------
 5942|  29.7M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 29.7M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  29.7M|      break;
 5945|  29.7M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.93k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 1.93k, False: 240M]
  ------------------
 5946|  1.93k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|  4.42M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  4.42M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 4.42M, False: 236M]
  ------------------
 5949|   202M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   202M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 198M, False: 42.5M]
  ------------------
 5950|   202M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|  96.8k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|  93.1k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 96.8k, False: 202M]
  |  Branch (5950:25): [True: 3.69k, False: 93.1k]
  |  Branch (5950:50): [True: 19.3k, False: 73.8k]
  ------------------
 5951|  23.0k|        break;
 5952|   202M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|   202M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 1.38k, False: 202M]
  |  |  |  Branch (603:35): [True: 0, False: 1.38k]
  |  |  ------------------
  |  |  604|   202M|       ? 0                                                                     \
  |  |  605|   202M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 202M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|   202M|      break;
 5955|   202M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  4.16M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 4.16M, False: 236M]
  ------------------
 5956|  4.16M|      const XML_Char *name;
 5957|  4.16M|      ENTITY *entity;
 5958|  4.16M|      char checkEntityDecl;
 5959|  4.16M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  4.16M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|  4.16M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|  4.16M|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 40.3k, False: 4.12M]
  ------------------
 5962|  40.3k|#ifdef XML_DTD
 5963|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5964|       |         *       so there is no amplification and hence recording without
 5965|       |         *       protection. */
 5966|  40.3k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  40.3k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  40.3k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  40.3k|#endif /* XML_DTD */
 5970|  40.3k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  40.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 345, False: 39.9k]
  |  |  |  Branch (603:35): [True: 0, False: 345]
  |  |  ------------------
  |  |  604|  40.3k|       ? 0                                                                     \
  |  |  605|  40.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 40.3k]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  40.3k|        break;
 5973|  40.3k|      }
 5974|  4.12M|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|  4.12M|                             ptr + enc->minBytesPerChar,
 5976|  4.12M|                             next - enc->minBytesPerChar);
 5977|  4.12M|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 4.12M]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|  4.12M|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|  4.12M|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|  4.12M|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5981|       |      /* First, determine if a check for an existing declaration is needed;
 5982|       |         if yes, check that the entity exists, and that it is internal.
 5983|       |      */
 5984|  4.12M|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 16.8k, False: 4.10M]
  ------------------
 5985|  16.8k|        checkEntityDecl =
 5986|  16.8k|#ifdef XML_DTD
 5987|  16.8k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 16.8k, False: 0]
  ------------------
 5988|  16.8k|#endif /* XML_DTD */
 5989|  16.8k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 16.8k, False: 0]
  |  Branch (5989:14): [True: 197, False: 16.6k]
  ------------------
 5990|  16.8k|                             : ! dtd->hasParamEntityRefs);
 5991|  4.10M|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|  4.10M|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 3.28M, False: 820k]
  |  Branch (5992:56): [True: 0, False: 820k]
  ------------------
 5993|  4.12M|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 3.30M, False: 820k]
  ------------------
 5994|  3.30M|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 152, False: 3.30M]
  ------------------
 5995|    152|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|  3.30M|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 3.30M]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|  3.30M|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 27.0k, False: 793k]
  ------------------
 5999|       |        /* Cannot report skipped entity here - see comments on
 6000|       |           parser->m_skippedEntityHandler.
 6001|       |        if (parser->m_skippedEntityHandler)
 6002|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6003|       |        */
 6004|       |        /* Cannot call the default handler because this would be
 6005|       |           out of sync with the call to the startElementHandler.
 6006|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6007|       |          reportDefault(parser, enc, ptr, next);
 6008|       |        */
 6009|  27.0k|        break;
 6010|  27.0k|      }
 6011|  4.09M|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 3, False: 4.09M]
  ------------------
 6012|      3|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 3]
  ------------------
 6013|       |          /* It does not appear that this line can be executed.
 6014|       |           *
 6015|       |           * The "if (entity->open)" check catches recursive entity
 6016|       |           * definitions.  In order to be called with an open
 6017|       |           * entity, it must have gone through this code before and
 6018|       |           * been through the recursive call to
 6019|       |           * appendAttributeValue() some lines below.  That call
 6020|       |           * sets the local encoding ("enc") to the parser's
 6021|       |           * internal encoding (internal_utf8 or internal_utf16),
 6022|       |           * which can never be the same as the principle encoding.
 6023|       |           * It doesn't appear there is another code path that gets
 6024|       |           * here with entity->open being TRUE.
 6025|       |           *
 6026|       |           * Since it is not certain that this logic is watertight,
 6027|       |           * we keep the line and merely exclude it from coverage
 6028|       |           * tests.
 6029|       |           */
 6030|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6031|      0|        }
 6032|      3|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      3|      }
 6034|  4.09M|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 0, False: 4.09M]
  ------------------
 6035|      0|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6035:13): [True: 0, False: 0]
  ------------------
 6036|      0|          parser->m_eventPtr = ptr;
 6037|      0|        return XML_ERROR_BINARY_ENTITY_REF;
 6038|      0|      }
 6039|  4.09M|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 4.09M]
  ------------------
 6040|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6040:13): [True: 1, False: 1]
  ------------------
 6041|      1|          parser->m_eventPtr = ptr;
 6042|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6043|  4.09M|      } else {
 6044|  4.09M|        enum XML_Error result;
 6045|  4.09M|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|  4.09M|        entity->open = XML_TRUE;
  ------------------
  |  |   55|  4.09M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|  4.09M|#ifdef XML_DTD
 6048|  4.09M|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|  4.09M|#endif
 6050|  4.09M|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|  4.09M|                                      isCdata, (const char *)entity->textPtr,
 6052|  4.09M|                                      (const char *)textEnd, pool,
 6053|  4.09M|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|  4.09M|#ifdef XML_DTD
 6055|  4.09M|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|  4.09M|#endif
 6057|  4.09M|        entity->open = XML_FALSE;
  ------------------
  |  |   56|  4.09M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|  4.09M|        if (result)
  ------------------
  |  Branch (6058:13): [True: 255, False: 4.09M]
  ------------------
 6059|    255|          return result;
 6060|  4.09M|      }
 6061|  4.09M|    } break;
 6062|  4.09M|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 240M]
  ------------------
 6063|       |      /* The only token returned by XmlAttributeValueTok() that does
 6064|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6065|       |       * Getting that would require an entity name to contain an
 6066|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6067|       |       * tokenisers will have already recognised and rejected such
 6068|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6069|       |       * default case should be retained as a safety net, but the code
 6070|       |       * excluded from coverage tests.
 6071|       |       *
 6072|       |       * LCOV_EXCL_START
 6073|       |       */
 6074|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6074:11): [True: 0, False: 0]
  ------------------
 6075|      0|        parser->m_eventPtr = ptr;
 6076|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6077|       |      /* LCOV_EXCL_STOP */
 6078|   240M|    }
 6079|   236M|    ptr = next;
 6080|   236M|  }
 6081|       |  /* not reached */
 6082|  4.11M|}
xmlparse.c:storeEntityValue:
 6087|  8.59k|                 enum XML_Account account) {
 6088|  8.59k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  8.59k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  8.59k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  8.59k|#ifdef XML_DTD
 6092|  8.59k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  8.59k|  parser->m_prologState.inEntityValue = 1;
 6094|       |#else
 6095|       |  UNUSED_P(account);
 6096|       |#endif /* XML_DTD */
 6097|       |  /* never return Null for the value argument in EntityDeclHandler,
 6098|       |     since this would indicate an external entity; therefore we
 6099|       |     have to make sure that entityValuePool.start is not null */
 6100|  8.59k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.33k, False: 6.26k]
  ------------------
 6101|  2.33k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.33k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.33k|  }
 6104|       |
 6105|   439k|  for (;;) {
 6106|   439k|    const char *next
 6107|   439k|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|   439k|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|   439k|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   439k|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|   439k|#ifdef XML_DTD
 6111|   439k|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 439k]
  ------------------
 6112|   439k|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|   439k|#endif
 6118|       |
 6119|   439k|    switch (tok) {
 6120|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 2, False: 439k]
  ------------------
 6121|      2|#ifdef XML_DTD
 6122|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6122:11): [True: 0, False: 2]
  |  Branch (6122:38): [True: 0, False: 2]
  ------------------
 6123|      0|        const XML_Char *name;
 6124|      0|        ENTITY *entity;
 6125|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6126|      0|                               entityTextPtr + enc->minBytesPerChar,
 6127|      0|                               next - enc->minBytesPerChar);
 6128|      0|        if (! name) {
  ------------------
  |  Branch (6128:13): [True: 0, False: 0]
  ------------------
 6129|      0|          result = XML_ERROR_NO_MEMORY;
 6130|      0|          goto endEntityValue;
 6131|      0|        }
 6132|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6133|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6134|      0|        if (! entity) {
  ------------------
  |  Branch (6134:13): [True: 0, False: 0]
  ------------------
 6135|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6136|       |          /* cannot report skipped entity here - see comments on
 6137|       |             parser->m_skippedEntityHandler
 6138|       |          if (parser->m_skippedEntityHandler)
 6139|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6140|       |          */
 6141|      0|          dtd->keepProcessing = dtd->standalone;
 6142|      0|          goto endEntityValue;
 6143|      0|        }
 6144|      0|        if (entity->open) {
  ------------------
  |  Branch (6144:13): [True: 0, False: 0]
  ------------------
 6145|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6145:15): [True: 0, False: 0]
  ------------------
 6146|      0|            parser->m_eventPtr = entityTextPtr;
 6147|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6148|      0|          goto endEntityValue;
 6149|      0|        }
 6150|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6151:15): [True: 0, False: 0]
  ------------------
 6152|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6153|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6154|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6155|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6155:17): [True: 0, False: 0]
  ------------------
 6156|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6157|      0|                    entity->systemId, entity->publicId)) {
 6158|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6159|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6160|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6161|      0|              goto endEntityValue;
 6162|      0|            }
 6163|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6164|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6165|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6165:17): [True: 0, False: 0]
  ------------------
 6166|      0|              dtd->keepProcessing = dtd->standalone;
 6167|      0|          } else
 6168|      0|            dtd->keepProcessing = dtd->standalone;
 6169|      0|        } else {
 6170|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6171|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6172|      0|          result = storeEntityValue(
 6173|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6174|      0|              (const char *)(entity->textPtr + entity->textLen),
 6175|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6176|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6177|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6178|      0|          if (result)
  ------------------
  |  Branch (6178:15): [True: 0, False: 0]
  ------------------
 6179|      0|            goto endEntityValue;
 6180|      0|        }
 6181|      0|        break;
 6182|      0|      }
 6183|      2|#endif /* XML_DTD */
 6184|       |      /* In the internal subset, PE references are not legal
 6185|       |         within markup declarations, e.g entity values in this case. */
 6186|      2|      parser->m_eventPtr = entityTextPtr;
 6187|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6188|      2|      goto endEntityValue;
 6189|  8.51k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  8.51k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 8.51k, False: 431k]
  ------------------
 6190|  8.51k|      result = XML_ERROR_NONE;
 6191|  8.51k|      goto endEntityValue;
 6192|  18.0k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  18.0k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 18.0k, False: 421k]
  ------------------
 6193|   141k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   141k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 123k, False: 316k]
  ------------------
 6194|   141k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 141k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   141k|      break;
 6199|   141k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    915|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 915, False: 439k]
  ------------------
 6200|    915|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|   278k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   278k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 277k, False: 162k]
  ------------------
 6203|   278k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 48, False: 278k]
  |  Branch (6203:37): [True: 0, False: 48]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|   278k|      *(pool->ptr)++ = 0xA;
 6208|   278k|      break;
 6209|  11.3k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  11.3k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 11.3k, False: 428k]
  ------------------
 6210|  11.3k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  11.3k|      int i;
 6212|  11.3k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  11.3k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  11.3k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 4, False: 11.3k]
  ------------------
 6214|      4|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 4, False: 0]
  ------------------
 6215|      4|          parser->m_eventPtr = entityTextPtr;
 6216|      4|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      4|        goto endEntityValue;
 6218|      4|      }
 6219|  11.3k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  11.3k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6220|       |      /* The XmlEncode() functions can never return 0 here.  That
 6221|       |       * error return happens if the code point passed in is either
 6222|       |       * negative or greater than or equal to 0x110000.  The
 6223|       |       * XmlCharRefNumber() functions will all return a number
 6224|       |       * strictly less than 0x110000 or a negative value if an error
 6225|       |       * occurred.  The negative value is intercepted above, so
 6226|       |       * XmlEncode() is never passed a value it might return an
 6227|       |       * error for.
 6228|       |       */
 6229|  34.7k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 23.3k, False: 11.3k]
  ------------------
 6230|  23.3k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 13, False: 23.3k]
  |  Branch (6230:39): [True: 0, False: 13]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|  23.3k|        *(pool->ptr)++ = buf[i];
 6235|  23.3k|      }
 6236|  11.3k|    } break;
 6237|  11.3k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 45, False: 439k]
  ------------------
 6238|     45|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 45, False: 0]
  ------------------
 6239|     45|        parser->m_eventPtr = entityTextPtr;
 6240|     45|      result = XML_ERROR_INVALID_TOKEN;
 6241|     45|      goto endEntityValue;
 6242|     25|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 25, False: 439k]
  ------------------
 6243|     25|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 25, False: 0]
  ------------------
 6244|     25|        parser->m_eventPtr = next;
 6245|     25|      result = XML_ERROR_INVALID_TOKEN;
 6246|     25|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 439k]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|   439k|    }
 6261|   431k|    entityTextPtr = next;
 6262|   431k|  }
 6263|  8.59k|endEntityValue:
 6264|  8.59k|#ifdef XML_DTD
 6265|  8.59k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  8.59k|#endif /* XML_DTD */
 6267|  8.59k|  return result;
 6268|  8.59k|}
xmlparse.c:processInternalEntity:
 5717|   180k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|   180k|  const char *textStart, *textEnd;
 5719|   180k|  const char *next;
 5720|   180k|  enum XML_Error result;
 5721|   180k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|   180k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 178k, False: 1.88k]
  ------------------
 5724|   178k|    openEntity = parser->m_freeInternalEntities;
 5725|   178k|    parser->m_freeInternalEntities = openEntity->next;
 5726|   178k|  } else {
 5727|  1.88k|    openEntity
 5728|  1.88k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  1.88k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  1.88k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 1.88k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  1.88k|  }
 5732|   180k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   180k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|   180k|#ifdef XML_DTD
 5734|   180k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|   180k|#endif
 5736|   180k|  entity->processed = 0;
 5737|   180k|  openEntity->next = parser->m_openInternalEntities;
 5738|   180k|  parser->m_openInternalEntities = openEntity;
 5739|   180k|  openEntity->entity = entity;
 5740|   180k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|   180k|  openEntity->betweenDecl = betweenDecl;
 5742|   180k|  openEntity->internalEventPtr = NULL;
 5743|   180k|  openEntity->internalEventEndPtr = NULL;
 5744|   180k|  textStart = (const char *)entity->textPtr;
 5745|   180k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|   180k|  next = textStart;
 5748|       |
 5749|   180k|#ifdef XML_DTD
 5750|   180k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 180k]
  ------------------
 5751|      0|    int tok
 5752|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5753|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5754|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5755|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5756|      0|  } else
 5757|   180k|#endif /* XML_DTD */
 5758|   180k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|   180k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   180k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|   180k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|   180k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 179k, False: 943]
  ------------------
 5763|   179k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 179k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|   179k|    } else {
 5767|   179k|#ifdef XML_DTD
 5768|   179k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|   179k|#endif /* XML_DTD */
 5770|   179k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   179k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|   179k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|   179k|      openEntity->next = parser->m_freeInternalEntities;
 5774|   179k|      parser->m_freeInternalEntities = openEntity;
 5775|   179k|    }
 5776|   179k|  }
 5777|   180k|  return result;
 5778|   180k|}
xmlparse.c:entityTrackingOnOpen:
 7828|  4.27M|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|  4.27M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|  4.27M|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|  4.27M|  rootParser->m_entity_stats.currentDepth++;
 7834|  4.27M|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 2.98k, False: 4.27M]
  ------------------
 7835|  4.27M|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  2.98k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  2.98k|  }
 7838|       |
 7839|  4.27M|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|  4.27M|}
xmlparse.c:entityTrackingReportStats:
 7805|  8.55M|                          const char *action, int sourceLine) {
 7806|  8.55M|  assert(! rootParser->m_parentParser);
 7807|  8.55M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 8.55M, False: 0]
  ------------------
 7808|  8.55M|    return;
 7809|       |
 7810|       |#  if defined(XML_UNICODE)
 7811|       |  const char *const entityName = "[..]";
 7812|       |#  else
 7813|      0|  const char *const entityName = entity->name;
 7814|      0|#  endif
 7815|       |
 7816|      0|  fprintf(
 7817|      0|      stderr,
 7818|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7819|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7820|      0|      rootParser->m_entity_stats.currentDepth,
 7821|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7822|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7823|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7823:7): [True: 0, False: 0]
  ------------------
 7824|      0|      sourceLine);
 7825|      0|}
xmlparse.c:entityTrackingOnClose:
 7843|  4.27M|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|  4.27M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|  4.27M|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|  4.27M|  rootParser->m_entity_stats.currentDepth--;
 7849|  4.27M|}
xmlparse.c:reportProcessingInstruction:
 6293|  15.2k|                            const char *start, const char *end) {
 6294|  15.2k|  const XML_Char *target;
 6295|  15.2k|  XML_Char *data;
 6296|  15.2k|  const char *tem;
 6297|  15.2k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 15.2k, False: 0]
  ------------------
 6298|  15.2k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 15.2k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  15.2k|    return 1;
 6301|  15.2k|  }
 6302|      0|  start += enc->minBytesPerChar * 2;
 6303|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6304|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6305|      0|  if (! target)
  ------------------
  |  Branch (6305:7): [True: 0, False: 0]
  ------------------
 6306|      0|    return 0;
 6307|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6308|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6309|      0|                         end - enc->minBytesPerChar * 2);
 6310|      0|  if (! data)
  ------------------
  |  Branch (6310:7): [True: 0, False: 0]
  ------------------
 6311|      0|    return 0;
 6312|      0|  normalizeLines(data);
 6313|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6314|      0|  poolClear(&parser->m_tempPool);
 6315|      0|  return 1;
 6316|      0|}
xmlparse.c:reportComment:
 6320|  3.05k|              const char *end) {
 6321|  3.05k|  XML_Char *data;
 6322|  3.05k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 3.05k, False: 0]
  ------------------
 6323|  3.05k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 3.05k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  3.05k|    return 1;
 6326|  3.05k|  }
 6327|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6328|      0|                         start + enc->minBytesPerChar * 4,
 6329|      0|                         end - enc->minBytesPerChar * 3);
 6330|      0|  if (! data)
  ------------------
  |  Branch (6330:7): [True: 0, False: 0]
  ------------------
 6331|      0|    return 0;
 6332|      0|  normalizeLines(data);
 6333|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6334|      0|  poolClear(&parser->m_tempPool);
 6335|      0|  return 1;
 6336|      0|}
xmlparse.c:getDebugLevel:
 8391|  38.9k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  38.9k|  const char *const valueOrNull = getenv(variableName);
 8393|  38.9k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 38.9k, False: 0]
  ------------------
 8394|  38.9k|    return defaultDebugLevel;
 8395|  38.9k|  }
 8396|      0|  const char *const value = valueOrNull;
 8397|       |
 8398|      0|  errno = 0;
 8399|      0|  char *afterValue = NULL;
 8400|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8401|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8401:7): [True: 0, False: 0]
  |  Branch (8401:23): [True: 0, False: 0]
  |  Branch (8401:48): [True: 0, False: 0]
  ------------------
 8402|      0|    errno = 0;
 8403|      0|    return defaultDebugLevel;
 8404|      0|  }
 8405|       |
 8406|      0|  return debugLevel;
 8407|      0|}
xmlparse.c:destroyBindings:
 1429|  2.40M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  2.40M|  for (;;) {
 1431|  2.40M|    BINDING *b = bindings;
 1432|  2.40M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 2.40M, False: 0]
  ------------------
 1433|  2.40M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  2.40M|}
xmlparse.c:startParsing:
  954|  19.4k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  19.4k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 19.4k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  19.4k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 19.4k]
  ------------------
  959|       |    /* implicit context only set for root parser, since child
  960|       |       parsers (i.e. external entity parsers) will inherit it
  961|       |    */
  962|      0|    return setContext(parser, implicitContext);
  963|      0|  }
  964|  19.4k|  return XML_TRUE;
  ------------------
  |  |   55|  19.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  19.4k|}
xmlparse.c:dtdDestroy:
 6789|  19.4k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  19.4k|  HASH_TABLE_ITER iter;
 6791|  19.4k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  42.2k|  for (;;) {
 6793|  42.2k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  42.2k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 19.4k, False: 22.7k]
  ------------------
 6795|  19.4k|      break;
 6796|  22.7k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 1.03k, False: 21.7k]
  ------------------
 6797|  1.03k|      ms->free_fcn(e->defaultAtts);
 6798|  22.7k|  }
 6799|  19.4k|  hashTableDestroy(&(p->generalEntities));
 6800|  19.4k|#ifdef XML_DTD
 6801|  19.4k|  hashTableDestroy(&(p->paramEntities));
 6802|  19.4k|#endif /* XML_DTD */
 6803|  19.4k|  hashTableDestroy(&(p->elementTypes));
 6804|  19.4k|  hashTableDestroy(&(p->attributeIds));
 6805|  19.4k|  hashTableDestroy(&(p->prefixes));
 6806|  19.4k|  poolDestroy(&(p->pool));
 6807|  19.4k|  poolDestroy(&(p->entityValuePool));
 6808|  19.4k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 19.4k, False: 0]
  ------------------
 6809|  19.4k|    ms->free_fcn(p->scaffIndex);
 6810|  19.4k|    ms->free_fcn(p->scaffold);
 6811|  19.4k|  }
 6812|  19.4k|  ms->free_fcn(p);
 6813|  19.4k|}
xmlparse.c:hashTableDestroy:
 7142|  97.4k|hashTableDestroy(HASH_TABLE *table) {
 7143|  97.4k|  size_t i;
 7144|  1.22M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 1.12M, False: 97.4k]
  ------------------
 7145|  1.12M|    table->mem->free_fcn(table->v[i]);
 7146|  97.4k|  table->mem->free_fcn(table->v);
 7147|  97.4k|}
xmlparse.c:poolClear:
 7185|  2.44M|poolClear(STRING_POOL *pool) {
 7186|  2.44M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 271k, False: 2.17M]
  ------------------
 7187|   271k|    pool->freeBlocks = pool->blocks;
 7188|  2.17M|  else {
 7189|  2.17M|    BLOCK *p = pool->blocks;
 7190|  2.18M|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 2.12k, False: 2.17M]
  ------------------
 7191|  2.12k|      BLOCK *tem = p->next;
 7192|  2.12k|      p->next = pool->freeBlocks;
 7193|  2.12k|      pool->freeBlocks = p;
 7194|  2.12k|      p = tem;
 7195|  2.12k|    }
 7196|  2.17M|  }
 7197|  2.44M|  pool->blocks = NULL;
 7198|  2.44M|  pool->start = NULL;
 7199|  2.44M|  pool->ptr = NULL;
 7200|  2.44M|  pool->end = NULL;
 7201|  2.44M|}
xmlparse.c:poolDestroy:
 7204|  77.9k|poolDestroy(STRING_POOL *pool) {
 7205|  77.9k|  BLOCK *p = pool->blocks;
 7206|  95.8k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 17.9k, False: 77.9k]
  ------------------
 7207|  17.9k|    BLOCK *tem = p->next;
 7208|  17.9k|    pool->mem->free_fcn(p);
 7209|  17.9k|    p = tem;
 7210|  17.9k|  }
 7211|  77.9k|  p = pool->freeBlocks;
 7212|  80.3k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 2.39k, False: 77.9k]
  ------------------
 7213|  2.39k|    BLOCK *tem = p->next;
 7214|  2.39k|    pool->mem->free_fcn(p);
 7215|  2.39k|    p = tem;
 7216|  2.39k|  }
 7217|  77.9k|}
xmlparse.c:poolCopyString:
 7237|  18.1k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|  4.02M|  do {
 7239|  4.02M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|  4.02M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 7.89k, False: 4.01M]
  |  |  |  Branch (603:35): [True: 0, False: 7.89k]
  |  |  ------------------
  |  |  604|  4.02M|       ? 0                                                                     \
  |  |  605|  4.02M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 4.02M]
  ------------------
 7240|      0|      return NULL;
 7241|  4.02M|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 4.00M, False: 18.1k]
  ------------------
 7242|  18.1k|  s = pool->start;
 7243|  18.1k|  poolFinish(pool);
  ------------------
  |  |  601|  18.1k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  18.1k|  return s;
 7245|  18.1k|}
xmlparse.c:copyString:
 7637|  19.4k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  19.4k|  size_t charsRequired = 0;
 7639|  19.4k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   116k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 97.4k, False: 19.4k]
  ------------------
 7643|  97.4k|    charsRequired++;
 7644|  97.4k|  }
 7645|       |  /* Include the terminator */
 7646|  19.4k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  19.4k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  19.4k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 19.4k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  19.4k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  19.4k|  return result;
 7655|  19.4k|}

XmlPrologStateInit:
 1237|  19.4k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.4k|  state->handler = prolog0;
 1239|  19.4k|#ifdef XML_DTD
 1240|  19.4k|  state->documentEntity = 1;
 1241|  19.4k|  state->includeLevel = 0;
 1242|  19.4k|  state->inEntityValue = 0;
 1243|  19.4k|#endif /* XML_DTD */
 1244|  19.4k|}
xmlrole.c:prolog0:
  142|  16.4k|        const ENCODING *enc) {
  143|  16.4k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 287, False: 16.1k]
  ------------------
  144|    628|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    628|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 628, False: 15.8k]
  ------------------
  145|    628|    state->handler = prolog1;
  146|    628|    return XML_ROLE_NONE;
  147|    325|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    325|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 325, False: 16.1k]
  ------------------
  148|    325|    state->handler = prolog1;
  149|    325|    return XML_ROLE_XML_DECL;
  150|    402|  case XML_TOK_PI:
  ------------------
  |  |   76|    402|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 402, False: 16.0k]
  ------------------
  151|    402|    state->handler = prolog1;
  152|    402|    return XML_ROLE_PI;
  153|     46|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     46|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 46, False: 16.4k]
  ------------------
  154|     46|    state->handler = prolog1;
  155|     46|    return XML_ROLE_COMMENT;
  156|    281|  case XML_TOK_BOM:
  ------------------
  |  |   79|    281|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 281, False: 16.1k]
  ------------------
  157|    281|    return XML_ROLE_NONE;
  158|  5.39k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.39k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.39k, False: 11.0k]
  ------------------
  159|  5.39k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.39k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 105, False: 5.28k]
  ------------------
  160|  5.39k|                              KW_DOCTYPE))
  161|    105|      break;
  162|  5.28k|    state->handler = doctype0;
  163|  5.28k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.11k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.11k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.11k, False: 7.36k]
  ------------------
  165|  9.11k|    state->handler = error;
  166|  9.11k|    return XML_ROLE_INSTANCE_START;
  167|  16.4k|  }
  168|    392|  return common(state, tok);
  169|  16.4k|}
xmlrole.c:prolog1:
  173|  5.39k|        const ENCODING *enc) {
  174|  5.39k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 10, False: 5.38k]
  ------------------
  175|    517|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    517|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 517, False: 4.87k]
  ------------------
  176|    517|    return XML_ROLE_NONE;
  177|  3.89k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.89k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.89k, False: 1.49k]
  ------------------
  178|  3.89k|    return XML_ROLE_PI;
  179|    449|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    449|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 449, False: 4.94k]
  ------------------
  180|    449|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 5.39k]
  ------------------
  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|    457|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    457|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 457, False: 4.93k]
  ------------------
  191|    457|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    457|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 453]
  ------------------
  192|    457|                              KW_DOCTYPE))
  193|      4|      break;
  194|    453|    state->handler = doctype0;
  195|    453|    return XML_ROLE_DOCTYPE_NONE;
  196|     64|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     64|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 64, False: 5.33k]
  ------------------
  197|     64|    state->handler = error;
  198|     64|    return XML_ROLE_INSTANCE_START;
  199|  5.39k|  }
  200|     14|  return common(state, tok);
  201|  5.39k|}
xmlrole.c:doctype0:
  225|  11.4k|         const ENCODING *enc) {
  226|  11.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.4k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.4k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.4k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.4k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 8, False: 11.4k]
  ------------------
  230|  5.73k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.73k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.73k, False: 5.72k]
  ------------------
  231|  5.73k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.71k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.71k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.71k, False: 5.74k]
  ------------------
  233|  5.71k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.71k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.4k]
  ------------------
  234|  5.71k|    state->handler = doctype1;
  235|  5.71k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.4k|  }
  237|      8|  return common(state, tok);
  238|  11.4k|}
xmlrole.c:doctype1:
  242|  7.04k|         const ENCODING *enc) {
  243|  7.04k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 2, False: 7.04k]
  ------------------
  244|  1.34k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.34k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.34k, False: 5.70k]
  ------------------
  245|  1.34k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.88k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.88k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.88k, False: 2.16k]
  ------------------
  247|  4.88k|    state->handler = internalSubset;
  248|  4.88k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     38|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     38|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 38, False: 7.00k]
  ------------------
  250|     38|    state->handler = prolog2;
  251|     38|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    778|  case XML_TOK_NAME:
  ------------------
  |  |   85|    778|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 778, False: 6.26k]
  ------------------
  253|    778|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    778|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 15, False: 763]
  |  |  ------------------
  ------------------
  254|     15|      state->handler = doctype3;
  255|     15|      return XML_ROLE_DOCTYPE_NONE;
  256|     15|    }
  257|    763|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    763|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 735, False: 28]
  |  |  ------------------
  ------------------
  258|    735|      state->handler = doctype2;
  259|    735|      return XML_ROLE_DOCTYPE_NONE;
  260|    735|    }
  261|     28|    break;
  262|  7.04k|  }
  263|     30|  return common(state, tok);
  264|  7.04k|}
xmlrole.c:internalSubset:
  335|  42.3k|               const ENCODING *enc) {
  336|  42.3k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 83, False: 42.2k]
  ------------------
  337|  4.48k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.48k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 4.48k, False: 37.8k]
  ------------------
  338|  4.48k|    return XML_ROLE_NONE;
  339|  29.7k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  29.7k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 29.7k, False: 12.5k]
  ------------------
  340|  29.7k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  29.7k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13.8k, False: 15.9k]
  |  |  ------------------
  ------------------
  341|  29.7k|                            KW_ENTITY)) {
  342|  13.8k|      state->handler = entity0;
  343|  13.8k|      return XML_ROLE_ENTITY_NONE;
  344|  13.8k|    }
  345|  15.9k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  15.9k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8.93k, False: 6.97k]
  |  |  ------------------
  ------------------
  346|  15.9k|                            KW_ATTLIST)) {
  347|  8.93k|      state->handler = attlist0;
  348|  8.93k|      return XML_ROLE_ATTLIST_NONE;
  349|  8.93k|    }
  350|  6.97k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  6.97k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 4.97k, False: 2.00k]
  |  |  ------------------
  ------------------
  351|  6.97k|                            KW_ELEMENT)) {
  352|  4.97k|      state->handler = element0;
  353|  4.97k|      return XML_ROLE_ELEMENT_NONE;
  354|  4.97k|    }
  355|  2.00k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.00k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.96k, False: 34]
  |  |  ------------------
  ------------------
  356|  2.00k|                            KW_NOTATION)) {
  357|  1.96k|      state->handler = notation0;
  358|  1.96k|      return XML_ROLE_NOTATION_NONE;
  359|  1.96k|    }
  360|     34|    break;
  361|  1.70k|  case XML_TOK_PI:
  ------------------
  |  |   76|  1.70k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 1.70k, False: 40.6k]
  ------------------
  362|  1.70k|    return XML_ROLE_PI;
  363|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 194, False: 42.1k]
  ------------------
  364|    194|    return XML_ROLE_COMMENT;
  365|  3.95k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.95k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.95k, False: 38.3k]
  ------------------
  366|  3.95k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.11k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.11k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.11k, False: 40.2k]
  ------------------
  368|  2.11k|    state->handler = doctype5;
  369|  2.11k|    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: 42.3k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  42.3k|  }
  373|    117|  return common(state, tok);
  374|  42.3k|}
xmlrole.c:entity0:
  417|  27.7k|        const ENCODING *enc) {
  418|  27.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  27.7k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  27.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  27.7k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  27.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  27.7k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  27.7k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 15, False: 27.6k]
  ------------------
  422|  13.8k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  13.8k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 13.8k, False: 13.8k]
  ------------------
  423|  13.8k|    return XML_ROLE_ENTITY_NONE;
  424|  3.91k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  3.91k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 3.91k, False: 23.7k]
  ------------------
  425|  3.91k|    state->handler = entity1;
  426|  3.91k|    return XML_ROLE_ENTITY_NONE;
  427|  9.91k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  9.91k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 9.91k, False: 17.7k]
  ------------------
  428|  9.91k|    state->handler = entity2;
  429|  9.91k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  27.7k|  }
  431|     15|  return common(state, tok);
  432|  27.7k|}
xmlrole.c:entity1:
  436|  7.80k|        const ENCODING *enc) {
  437|  7.80k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.80k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  7.80k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.80k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  7.80k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.80k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  7.80k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 40, False: 7.76k]
  ------------------
  441|  3.90k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.90k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 3.90k, False: 3.90k]
  ------------------
  442|  3.90k|    return XML_ROLE_ENTITY_NONE;
  443|  3.86k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.86k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 3.86k, False: 3.94k]
  ------------------
  444|  3.86k|    state->handler = entity7;
  445|  3.86k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  7.80k|  }
  447|     40|  return common(state, tok);
  448|  7.80k|}
xmlrole.c:entity7:
  544|  7.68k|        const ENCODING *enc) {
  545|  7.68k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 10, False: 7.67k]
  ------------------
  546|  3.85k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.85k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 3.85k, False: 3.83k]
  ------------------
  547|  3.85k|    return XML_ROLE_ENTITY_NONE;
  548|  1.63k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.63k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.63k, False: 6.05k]
  ------------------
  549|  1.63k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.63k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 918, False: 716]
  |  |  ------------------
  ------------------
  550|    918|      state->handler = entity9;
  551|    918|      return XML_ROLE_ENTITY_NONE;
  552|    918|    }
  553|    716|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    716|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 711, False: 5]
  |  |  ------------------
  ------------------
  554|    711|      state->handler = entity8;
  555|    711|      return XML_ROLE_ENTITY_NONE;
  556|    711|    }
  557|      5|    break;
  558|  2.19k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.19k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.19k, False: 5.49k]
  ------------------
  559|  2.19k|    state->handler = declClose;
  560|  2.19k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.19k|    return XML_ROLE_ENTITY_VALUE;
  562|  7.68k|  }
  563|     15|  return common(state, tok);
  564|  7.68k|}
xmlrole.c:entity9:
  584|  3.23k|        const ENCODING *enc) {
  585|  3.23k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.23k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  3.23k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.23k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  3.23k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.23k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  3.23k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 5, False: 3.22k]
  ------------------
  589|  1.61k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.61k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.61k, False: 1.61k]
  ------------------
  590|  1.61k|    return XML_ROLE_ENTITY_NONE;
  591|  1.60k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.60k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.60k, False: 1.62k]
  ------------------
  592|  1.60k|    state->handler = entity10;
  593|  1.60k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  3.23k|  }
  595|      5|  return common(state, tok);
  596|  3.23k|}
xmlrole.c:entity10:
  600|  2.93k|         const ENCODING *enc) {
  601|  2.93k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.93k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  2.93k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.93k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  2.93k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.93k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  2.93k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 3, False: 2.92k]
  ------------------
  605|  1.32k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.32k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 1.32k, False: 1.60k]
  ------------------
  606|  1.32k|    return XML_ROLE_ENTITY_NONE;
  607|  1.60k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.60k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.60k, False: 1.32k]
  ------------------
  608|  1.60k|    setTopLevel(state);
  ------------------
  |  |  116|  1.60k|    ((state)->handler                                                          \
  |  |  117|  1.60k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.60k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.60k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  2.93k|  }
  611|      3|  return common(state, tok);
  612|  2.93k|}
xmlrole.c:entity8:
  568|  1.41k|        const ENCODING *enc) {
  569|  1.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  1.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  1.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.41k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  1.41k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 1.41k]
  ------------------
  573|    710|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    710|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 710, False: 708]
  ------------------
  574|    710|    return XML_ROLE_ENTITY_NONE;
  575|    706|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    706|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 706, False: 712]
  ------------------
  576|    706|    state->handler = entity9;
  577|    706|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  1.41k|  }
  579|      2|  return common(state, tok);
  580|  1.41k|}
xmlrole.c:declClose:
 1178|  16.4k|          const ENCODING *enc) {
 1179|  16.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  16.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  16.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  16.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  16.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  16.4k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 113, False: 16.3k]
  ------------------
 1183|  1.85k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.85k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.85k, False: 14.5k]
  ------------------
 1184|  1.85k|    return state->role_none;
 1185|  14.4k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  14.4k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 14.4k, False: 1.96k]
  ------------------
 1186|  14.4k|    setTopLevel(state);
  ------------------
  |  |  116|  14.4k|    ((state)->handler                                                          \
  |  |  117|  14.4k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 14.4k, False: 0]
  |  |  ------------------
  ------------------
 1187|  14.4k|    return state->role_none;
 1188|  16.4k|  }
 1189|    113|  return common(state, tok);
 1190|  16.4k|}
xmlrole.c:entity2:
  452|  19.7k|        const ENCODING *enc) {
  453|  19.7k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 4, False: 19.7k]
  ------------------
  454|  9.91k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  9.91k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 9.91k, False: 9.87k]
  ------------------
  455|  9.91k|    return XML_ROLE_ENTITY_NONE;
  456|  3.12k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.12k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 3.12k, False: 16.6k]
  ------------------
  457|  3.12k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  3.12k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 932, False: 2.19k]
  |  |  ------------------
  ------------------
  458|    932|      state->handler = entity4;
  459|    932|      return XML_ROLE_ENTITY_NONE;
  460|    932|    }
  461|  2.19k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  2.19k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.18k, False: 7]
  |  |  ------------------
  ------------------
  462|  2.18k|      state->handler = entity3;
  463|  2.18k|      return XML_ROLE_ENTITY_NONE;
  464|  2.18k|    }
  465|      7|    break;
  466|  6.75k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  6.75k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 6.75k, False: 13.0k]
  ------------------
  467|  6.75k|    state->handler = declClose;
  468|  6.75k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  6.75k|    return XML_ROLE_ENTITY_VALUE;
  470|  19.7k|  }
  471|     11|  return common(state, tok);
  472|  19.7k|}
xmlrole.c:entity4:
  492|  6.16k|        const ENCODING *enc) {
  493|  6.16k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  6.16k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  6.16k|  UNUSED_P(end);
  ------------------
  |  |  135|  6.16k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  6.16k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.16k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  6.16k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 6.15k]
  ------------------
  497|  3.09k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.09k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 3.09k, False: 3.07k]
  ------------------
  498|  3.09k|    return XML_ROLE_ENTITY_NONE;
  499|  3.06k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  3.06k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 3.06k, False: 3.10k]
  ------------------
  500|  3.06k|    state->handler = entity5;
  501|  3.06k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  6.16k|  }
  503|      8|  return common(state, tok);
  504|  6.16k|}
xmlrole.c:entity5:
  508|  4.77k|        const ENCODING *enc) {
  509|  4.77k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 2, False: 4.77k]
  ------------------
  510|  1.72k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.72k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.72k, False: 3.05k]
  ------------------
  511|  1.72k|    return XML_ROLE_ENTITY_NONE;
  512|  2.26k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.26k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 2.26k, False: 2.51k]
  ------------------
  513|  2.26k|    setTopLevel(state);
  ------------------
  |  |  116|  2.26k|    ((state)->handler                                                          \
  |  |  117|  2.26k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 2.26k, False: 0]
  |  |  ------------------
  ------------------
  514|  2.26k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    795|  case XML_TOK_NAME:
  ------------------
  |  |   85|    795|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 795, False: 3.98k]
  ------------------
  516|    795|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    795|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 791, False: 4]
  |  |  ------------------
  ------------------
  517|    791|      state->handler = entity6;
  518|    791|      return XML_ROLE_ENTITY_NONE;
  519|    791|    }
  520|      4|    break;
  521|  4.77k|  }
  522|      6|  return common(state, tok);
  523|  4.77k|}
xmlrole.c:entity6:
  527|  1.57k|        const ENCODING *enc) {
  528|  1.57k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.57k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.57k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.57k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.57k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.57k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.57k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 1, False: 1.57k]
  ------------------
  532|    790|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    790|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 790, False: 789]
  ------------------
  533|    790|    return XML_ROLE_ENTITY_NONE;
  534|    788|  case XML_TOK_NAME:
  ------------------
  |  |   85|    788|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 788, False: 791]
  ------------------
  535|    788|    state->handler = declClose;
  536|    788|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    788|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.57k|  }
  539|      1|  return common(state, tok);
  540|  1.57k|}
xmlrole.c:entity3:
  476|  4.36k|        const ENCODING *enc) {
  477|  4.36k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.36k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  4.36k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.36k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  4.36k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.36k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  4.36k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 4.36k]
  ------------------
  481|  2.18k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.18k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 2.18k, False: 2.18k]
  ------------------
  482|  2.18k|    return XML_ROLE_ENTITY_NONE;
  483|  2.17k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.17k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 2.17k, False: 2.18k]
  ------------------
  484|  2.17k|    state->handler = entity4;
  485|  2.17k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  4.36k|  }
  487|      2|  return common(state, tok);
  488|  4.36k|}
xmlrole.c:attlist0:
  705|  17.8k|         const ENCODING *enc) {
  706|  17.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  17.8k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  17.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  17.8k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  17.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.8k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  17.8k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 9, False: 17.8k]
  ------------------
  710|  8.93k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.93k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 8.93k, False: 8.92k]
  ------------------
  711|  8.93k|    return XML_ROLE_ATTLIST_NONE;
  712|  8.91k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.91k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 8.91k, False: 8.94k]
  ------------------
  713|  8.91k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  8.91k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 17.8k]
  ------------------
  714|  8.91k|    state->handler = attlist1;
  715|  8.91k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  17.8k|  }
  717|      9|  return common(state, tok);
  718|  17.8k|}
xmlrole.c:attlist1:
  722|  96.4k|         const ENCODING *enc) {
  723|  96.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  96.4k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  96.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  96.4k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  96.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  96.4k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  96.4k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 45, False: 96.3k]
  ------------------
  727|  44.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  44.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 44.2k, False: 52.2k]
  ------------------
  728|  44.2k|    return XML_ROLE_ATTLIST_NONE;
  729|  8.19k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  8.19k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 8.19k, False: 88.2k]
  ------------------
  730|  8.19k|    setTopLevel(state);
  ------------------
  |  |  116|  8.19k|    ((state)->handler                                                          \
  |  |  117|  8.19k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 8.19k, False: 0]
  |  |  ------------------
  ------------------
  731|  8.19k|    return XML_ROLE_ATTLIST_NONE;
  732|  43.9k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  43.9k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 43.9k, False: 52.4k]
  ------------------
  733|  43.9k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  43.9k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 96.4k]
  ------------------
  734|  43.9k|    state->handler = attlist2;
  735|  43.9k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  96.4k|  }
  737|     45|  return common(state, tok);
  738|  96.4k|}
xmlrole.c:attlist2:
  742|  87.8k|         const ENCODING *enc) {
  743|  87.8k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 13, False: 87.8k]
  ------------------
  744|  43.9k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  43.9k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 43.9k, False: 43.9k]
  ------------------
  745|  43.9k|    return XML_ROLE_ATTLIST_NONE;
  746|  12.0k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  12.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 12.0k, False: 75.8k]
  ------------------
  747|  12.0k|    static const char *const types[] = {
  748|  12.0k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  12.0k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  12.0k|    };
  751|  12.0k|    int i;
  752|  43.2k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 42.7k, False: 444]
  ------------------
  753|  42.7k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  42.7k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 11.5k, False: 31.2k]
  |  |  ------------------
  ------------------
  754|  11.5k|        state->handler = attlist8;
  755|  11.5k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  11.5k|      }
  757|  12.0k|  }
  758|    444|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    444|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 410, False: 34]
  |  |  ------------------
  ------------------
  759|    410|      state->handler = attlist5;
  760|    410|      return XML_ROLE_ATTLIST_NONE;
  761|    410|    }
  762|     34|    break;
  763|  31.8k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  31.8k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 31.8k, False: 55.9k]
  ------------------
  764|  31.8k|    state->handler = attlist3;
  765|  31.8k|    return XML_ROLE_ATTLIST_NONE;
  766|  87.8k|  }
  767|     47|  return common(state, tok);
  768|  87.8k|}
xmlrole.c:attlist8:
  861|  87.1k|         const ENCODING *enc) {
  862|  87.1k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 22, False: 87.1k]
  ------------------
  863|  43.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  43.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 43.6k, False: 43.5k]
  ------------------
  864|  43.6k|    return XML_ROLE_ATTLIST_NONE;
  865|  35.0k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  35.0k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 35.0k, False: 52.1k]
  ------------------
  866|  35.0k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  35.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 32.1k, False: 2.89k]
  |  |  ------------------
  ------------------
  867|  35.0k|                            KW_IMPLIED)) {
  868|  32.1k|      state->handler = attlist1;
  869|  32.1k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  32.1k|    }
  871|  2.89k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.89k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.59k, False: 1.30k]
  |  |  ------------------
  ------------------
  872|  2.89k|                            KW_REQUIRED)) {
  873|  1.59k|      state->handler = attlist1;
  874|  1.59k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  1.59k|    }
  876|  1.30k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.30k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.30k, False: 7]
  |  |  ------------------
  ------------------
  877|  1.30k|                            KW_FIXED)) {
  878|  1.30k|      state->handler = attlist9;
  879|  1.30k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.30k|    }
  881|      7|    break;
  882|  8.46k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  8.46k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 8.46k, False: 78.7k]
  ------------------
  883|  8.46k|    state->handler = attlist1;
  884|  8.46k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  87.1k|  }
  886|     29|  return common(state, tok);
  887|  87.1k|}
xmlrole.c:attlist9:
  891|  2.58k|         const ENCODING *enc) {
  892|  2.58k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  2.58k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  2.58k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  2.58k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 15, False: 2.56k]
  ------------------
  896|  1.29k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.29k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.29k, False: 1.28k]
  ------------------
  897|  1.29k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.26k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.26k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.26k, False: 1.31k]
  ------------------
  899|  1.26k|    state->handler = attlist1;
  900|  1.26k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  2.58k|  }
  902|     15|  return common(state, tok);
  903|  2.58k|}
xmlrole.c:attlist5:
  809|    815|         const ENCODING *enc) {
  810|    815|  UNUSED_P(ptr);
  ------------------
  |  |  135|    815|#  define UNUSED_P(p) (void)p
  ------------------
  811|    815|  UNUSED_P(end);
  ------------------
  |  |  135|    815|#  define UNUSED_P(p) (void)p
  ------------------
  812|    815|  UNUSED_P(enc);
  ------------------
  |  |  135|    815|#  define UNUSED_P(p) (void)p
  ------------------
  813|    815|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 4, False: 811]
  ------------------
  814|    408|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    408|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 408, False: 407]
  ------------------
  815|    408|    return XML_ROLE_ATTLIST_NONE;
  816|    403|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    403|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 403, False: 412]
  ------------------
  817|    403|    state->handler = attlist6;
  818|    403|    return XML_ROLE_ATTLIST_NONE;
  819|    815|  }
  820|      4|  return common(state, tok);
  821|    815|}
xmlrole.c:attlist6:
  825|  1.61k|         const ENCODING *enc) {
  826|  1.61k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.61k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.61k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.61k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.61k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.61k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.61k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 3, False: 1.61k]
  ------------------
  830|    334|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    334|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 334, False: 1.28k]
  ------------------
  831|    334|    return XML_ROLE_ATTLIST_NONE;
  832|  1.27k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.27k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 1.27k, False: 337]
  ------------------
  833|  1.27k|    state->handler = attlist7;
  834|  1.27k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.61k|  }
  836|      3|  return common(state, tok);
  837|  1.61k|}
xmlrole.c:attlist7:
  841|  1.92k|         const ENCODING *enc) {
  842|  1.92k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.92k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.92k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.92k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.92k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 4, False: 1.91k]
  ------------------
  846|    654|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    654|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 654, False: 1.26k]
  ------------------
  847|    654|    return XML_ROLE_ATTLIST_NONE;
  848|    366|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    366|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 366, False: 1.55k]
  ------------------
  849|    366|    state->handler = attlist8;
  850|    366|    return XML_ROLE_ATTLIST_NONE;
  851|    897|  case XML_TOK_OR:
  ------------------
  |  |   88|    897|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 897, False: 1.02k]
  ------------------
  852|    897|    state->handler = attlist6;
  853|    897|    return XML_ROLE_ATTLIST_NONE;
  854|  1.92k|  }
  855|      4|  return common(state, tok);
  856|  1.92k|}
xmlrole.c:attlist3:
  772|  36.6k|         const ENCODING *enc) {
  773|  36.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  36.6k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  36.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  36.6k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  36.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  36.6k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  36.6k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 7, False: 36.6k]
  ------------------
  777|    418|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    418|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 418, False: 36.2k]
  ------------------
  778|    418|    return XML_ROLE_ATTLIST_NONE;
  779|  3.87k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  3.87k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 3.87k, False: 32.7k]
  ------------------
  780|  36.2k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  36.2k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 32.3k, False: 4.30k]
  ------------------
  781|  36.2k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  36.2k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 36.6k]
  ------------------
  782|  36.2k|    state->handler = attlist4;
  783|  36.2k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  36.6k|  }
  785|      7|  return common(state, tok);
  786|  36.6k|}
xmlrole.c:attlist4:
  790|  36.8k|         const ENCODING *enc) {
  791|  36.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  36.8k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  36.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  36.8k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  36.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  36.8k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  36.8k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 12, False: 36.8k]
  ------------------
  795|    664|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    664|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 664, False: 36.2k]
  ------------------
  796|    664|    return XML_ROLE_ATTLIST_NONE;
  797|  31.7k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  31.7k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 31.7k, False: 5.16k]
  ------------------
  798|  31.7k|    state->handler = attlist8;
  799|  31.7k|    return XML_ROLE_ATTLIST_NONE;
  800|  4.49k|  case XML_TOK_OR:
  ------------------
  |  |   88|  4.49k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 4.49k, False: 32.3k]
  ------------------
  801|  4.49k|    state->handler = attlist3;
  802|  4.49k|    return XML_ROLE_ATTLIST_NONE;
  803|  36.8k|  }
  804|     12|  return common(state, tok);
  805|  36.8k|}
xmlrole.c:element0:
  907|  9.94k|         const ENCODING *enc) {
  908|  9.94k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  9.94k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  9.94k|  UNUSED_P(end);
  ------------------
  |  |  135|  9.94k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  9.94k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.94k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  9.94k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 4, False: 9.93k]
  ------------------
  912|  4.97k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.97k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 4.97k, False: 4.96k]
  ------------------
  913|  4.97k|    return XML_ROLE_ELEMENT_NONE;
  914|  4.96k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.96k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 4.96k, False: 4.97k]
  ------------------
  915|  4.96k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  4.96k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 9.94k]
  ------------------
  916|  4.96k|    state->handler = element1;
  917|  4.96k|    return XML_ROLE_ELEMENT_NAME;
  918|  9.94k|  }
  919|      4|  return common(state, tok);
  920|  9.94k|}
xmlrole.c:element1:
  924|  9.92k|         const ENCODING *enc) {
  925|  9.92k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 5, False: 9.91k]
  ------------------
  926|  4.96k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.96k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 4.96k, False: 4.95k]
  ------------------
  927|  4.96k|    return XML_ROLE_ELEMENT_NONE;
  928|    117|  case XML_TOK_NAME:
  ------------------
  |  |   85|    117|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 117, False: 9.80k]
  ------------------
  929|    117|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    117|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 44, False: 73]
  |  |  ------------------
  ------------------
  930|     44|      state->handler = declClose;
  931|     44|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     44|      return XML_ROLE_CONTENT_EMPTY;
  933|     44|    }
  934|     73|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     73|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 71, False: 2]
  |  |  ------------------
  ------------------
  935|     71|      state->handler = declClose;
  936|     71|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     71|      return XML_ROLE_CONTENT_ANY;
  938|     71|    }
  939|      2|    break;
  940|  4.83k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.83k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 4.83k, False: 5.08k]
  ------------------
  941|  4.83k|    state->handler = element2;
  942|  4.83k|    state->level = 1;
  943|  4.83k|    return XML_ROLE_GROUP_OPEN;
  944|  9.92k|  }
  945|      7|  return common(state, tok);
  946|  9.92k|}
xmlrole.c:element2:
  950|  5.99k|         const ENCODING *enc) {
  951|  5.99k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 3, False: 5.99k]
  ------------------
  952|  1.16k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.16k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 1.16k, False: 4.82k]
  ------------------
  953|  1.16k|    return XML_ROLE_ELEMENT_NONE;
  954|  1.74k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  1.74k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 1.74k, False: 4.24k]
  ------------------
  955|  1.74k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.74k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.73k, False: 11]
  |  |  ------------------
  ------------------
  956|  1.74k|                            KW_PCDATA)) {
  957|  1.73k|      state->handler = element3;
  958|  1.73k|      return XML_ROLE_CONTENT_PCDATA;
  959|  1.73k|    }
  960|     11|    break;
  961|    474|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    474|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 474, False: 5.52k]
  ------------------
  962|    474|    state->level = 2;
  963|    474|    state->handler = element6;
  964|    474|    return XML_ROLE_GROUP_OPEN;
  965|  1.73k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.73k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 1.73k, False: 4.26k]
  ------------------
  966|  1.73k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.73k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 5.99k]
  ------------------
  967|  1.73k|    state->handler = element7;
  968|  1.73k|    return XML_ROLE_CONTENT_ELEMENT;
  969|    216|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    216|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 216, False: 5.77k]
  ------------------
  970|    216|    state->handler = element7;
  971|    216|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|     87|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|     87|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 87, False: 5.90k]
  ------------------
  973|     87|    state->handler = element7;
  974|     87|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    569|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    569|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 569, False: 5.42k]
  ------------------
  976|    569|    state->handler = element7;
  977|    569|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  5.99k|  }
  979|     14|  return common(state, tok);
  980|  5.99k|}
xmlrole.c:element3:
  984|  2.03k|         const ENCODING *enc) {
  985|  2.03k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.03k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  2.03k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.03k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  2.03k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.03k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  2.03k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 7, False: 2.02k]
  ------------------
  989|    296|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    296|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 296, False: 1.73k]
  ------------------
  990|    296|    return XML_ROLE_ELEMENT_NONE;
  991|    515|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    515|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 515, False: 1.51k]
  ------------------
  992|    515|    state->handler = declClose;
  993|    515|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    515|    return XML_ROLE_GROUP_CLOSE;
  995|    721|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    721|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 721, False: 1.31k]
  ------------------
  996|    721|    state->handler = declClose;
  997|    721|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    721|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    492|  case XML_TOK_OR:
  ------------------
  |  |   88|    492|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 492, False: 1.53k]
  ------------------
 1000|    492|    state->handler = element4;
 1001|    492|    return XML_ROLE_ELEMENT_NONE;
 1002|  2.03k|  }
 1003|      7|  return common(state, tok);
 1004|  2.03k|}
xmlrole.c:element4:
 1008|  1.65k|         const ENCODING *enc) {
 1009|  1.65k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  1.65k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  1.65k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.65k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  1.65k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 14, False: 1.63k]
  ------------------
 1013|    440|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    440|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 440, False: 1.21k]
  ------------------
 1014|    440|    return XML_ROLE_ELEMENT_NONE;
 1015|  1.19k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.19k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 1.19k, False: 454]
  ------------------
 1016|  1.19k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.19k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.65k]
  ------------------
 1017|  1.19k|    state->handler = element5;
 1018|  1.19k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  1.65k|  }
 1020|     14|  return common(state, tok);
 1021|  1.65k|}
xmlrole.c:element5:
 1025|  1.47k|         const ENCODING *enc) {
 1026|  1.47k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  1.47k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  1.47k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.47k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  1.47k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 4, False: 1.46k]
  ------------------
 1030|    280|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    280|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 280, False: 1.19k]
  ------------------
 1031|    280|    return XML_ROLE_ELEMENT_NONE;
 1032|    444|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    444|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 444, False: 1.02k]
  ------------------
 1033|    444|    state->handler = declClose;
 1034|    444|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    444|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    744|  case XML_TOK_OR:
  ------------------
  |  |   88|    744|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 744, False: 728]
  ------------------
 1037|    744|    state->handler = element4;
 1038|    744|    return XML_ROLE_ELEMENT_NONE;
 1039|  1.47k|  }
 1040|      4|  return common(state, tok);
 1041|  1.47k|}
xmlrole.c:element6:
 1045|  4.47M|         const ENCODING *enc) {
 1046|  4.47M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.47M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.47M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.47M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.47M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.47M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.47M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 40, False: 4.47M]
  ------------------
 1050|  49.5k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  49.5k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 49.5k, False: 4.42M]
  ------------------
 1051|  49.5k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.34M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.34M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.34M, False: 124k]
  ------------------
 1053|  4.34M|    state->level += 1;
 1054|  4.34M|    return XML_ROLE_GROUP_OPEN;
 1055|  60.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  60.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 60.1k, False: 4.41M]
  ------------------
 1056|  60.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  60.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.47M]
  ------------------
 1057|  60.1k|    state->handler = element7;
 1058|  60.1k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  12.5k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  12.5k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 12.5k, False: 4.45M]
  ------------------
 1060|  12.5k|    state->handler = element7;
 1061|  12.5k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|  1.91k|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|  1.91k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 1.91k, False: 4.46M]
  ------------------
 1063|  1.91k|    state->handler = element7;
 1064|  1.91k|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|    837|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    837|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 837, False: 4.47M]
  ------------------
 1066|    837|    state->handler = element7;
 1067|    837|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.47M|  }
 1069|     40|  return common(state, tok);
 1070|  4.47M|}
xmlrole.c:element7:
 1074|   137k|         const ENCODING *enc) {
 1075|   137k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   137k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   137k|  UNUSED_P(end);
  ------------------
  |  |  135|   137k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   137k|  UNUSED_P(enc);
  ------------------
  |  |  135|   137k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   137k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 47, False: 137k]
  ------------------
 1079|  29.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  29.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 29.6k, False: 107k]
  ------------------
 1080|  29.6k|    return XML_ROLE_ELEMENT_NONE;
 1081|  18.9k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  18.9k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 18.9k, False: 118k]
  ------------------
 1082|  18.9k|    state->level -= 1;
 1083|  18.9k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 923, False: 18.0k]
  ------------------
 1084|    923|      state->handler = declClose;
 1085|    923|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|    923|    }
 1087|  18.9k|    return XML_ROLE_GROUP_CLOSE;
 1088|  2.20k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  2.20k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 2.20k, False: 134k]
  ------------------
 1089|  2.20k|    state->level -= 1;
 1090|  2.20k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 618, False: 1.58k]
  ------------------
 1091|    618|      state->handler = declClose;
 1092|    618|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    618|    }
 1094|  2.20k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  3.73k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  3.73k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 3.73k, False: 133k]
  ------------------
 1096|  3.73k|    state->level -= 1;
 1097|  3.73k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 257, False: 3.47k]
  ------------------
 1098|    257|      state->handler = declClose;
 1099|    257|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    257|    }
 1101|  3.73k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  7.49k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  7.49k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 7.49k, False: 129k]
  ------------------
 1103|  7.49k|    state->level -= 1;
 1104|  7.49k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 890, False: 6.60k]
  ------------------
 1105|    890|      state->handler = declClose;
 1106|    890|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    890|    }
 1108|  7.49k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  6.64k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  6.64k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 6.64k, False: 130k]
  ------------------
 1110|  6.64k|    state->handler = element6;
 1111|  6.64k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  68.4k|  case XML_TOK_OR:
  ------------------
  |  |   88|  68.4k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 68.4k, False: 68.7k]
  ------------------
 1113|  68.4k|    state->handler = element6;
 1114|  68.4k|    return XML_ROLE_GROUP_CHOICE;
 1115|   137k|  }
 1116|     47|  return common(state, tok);
 1117|   137k|}
xmlrole.c:notation0:
  616|  3.92k|          const ENCODING *enc) {
  617|  3.92k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  3.92k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  3.92k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.92k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  3.92k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 1, False: 3.91k]
  ------------------
  621|  1.96k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.96k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.96k, False: 1.95k]
  ------------------
  622|  1.96k|    return XML_ROLE_NOTATION_NONE;
  623|  1.95k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.95k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.95k, False: 1.96k]
  ------------------
  624|  1.95k|    state->handler = notation1;
  625|  1.95k|    return XML_ROLE_NOTATION_NAME;
  626|  3.92k|  }
  627|      1|  return common(state, tok);
  628|  3.92k|}
xmlrole.c:notation1:
  632|  3.89k|          const ENCODING *enc) {
  633|  3.89k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 2, False: 3.89k]
  ------------------
  634|  1.95k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.95k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.95k, False: 1.94k]
  ------------------
  635|  1.95k|    return XML_ROLE_NOTATION_NONE;
  636|  1.94k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.94k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.94k, False: 1.95k]
  ------------------
  637|  1.94k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.94k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 274, False: 1.67k]
  |  |  ------------------
  ------------------
  638|    274|      state->handler = notation3;
  639|    274|      return XML_ROLE_NOTATION_NONE;
  640|    274|    }
  641|  1.67k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.67k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.66k, False: 9]
  |  |  ------------------
  ------------------
  642|  1.66k|      state->handler = notation2;
  643|  1.66k|      return XML_ROLE_NOTATION_NONE;
  644|  1.66k|    }
  645|      9|    break;
  646|  3.89k|  }
  647|     11|  return common(state, tok);
  648|  3.89k|}
xmlrole.c:notation3:
  668|    543|          const ENCODING *enc) {
  669|    543|  UNUSED_P(ptr);
  ------------------
  |  |  135|    543|#  define UNUSED_P(p) (void)p
  ------------------
  670|    543|  UNUSED_P(end);
  ------------------
  |  |  135|    543|#  define UNUSED_P(p) (void)p
  ------------------
  671|    543|  UNUSED_P(enc);
  ------------------
  |  |  135|    543|#  define UNUSED_P(p) (void)p
  ------------------
  672|    543|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 3, False: 540]
  ------------------
  673|    273|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    273|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 273, False: 270]
  ------------------
  674|    273|    return XML_ROLE_NOTATION_NONE;
  675|    267|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    267|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 267, False: 276]
  ------------------
  676|    267|    state->handler = declClose;
  677|    267|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    267|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    543|  }
  680|      3|  return common(state, tok);
  681|    543|}
xmlrole.c:notation2:
  652|  3.31k|          const ENCODING *enc) {
  653|  3.31k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.31k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  3.31k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.31k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  3.31k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.31k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  3.31k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 5, False: 3.31k]
  ------------------
  657|  1.66k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.66k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.66k, False: 1.65k]
  ------------------
  658|  1.66k|    return XML_ROLE_NOTATION_NONE;
  659|  1.65k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.65k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.65k, False: 1.66k]
  ------------------
  660|  1.65k|    state->handler = notation4;
  661|  1.65k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  3.31k|  }
  663|      5|  return common(state, tok);
  664|  3.31k|}
xmlrole.c:notation4:
  685|  2.38k|          const ENCODING *enc) {
  686|  2.38k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  2.38k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  2.38k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  2.38k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 2, False: 2.37k]
  ------------------
  690|    736|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    736|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 736, False: 1.64k]
  ------------------
  691|    736|    return XML_ROLE_NOTATION_NONE;
  692|    345|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    345|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 345, False: 2.03k]
  ------------------
  693|    345|    state->handler = declClose;
  694|    345|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    345|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|  1.29k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.29k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 1.29k, False: 1.08k]
  ------------------
  697|  1.29k|    setTopLevel(state);
  ------------------
  |  |  116|  1.29k|    ((state)->handler                                                          \
  |  |  117|  1.29k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.29k, False: 0]
  |  |  ------------------
  ------------------
  698|  1.29k|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  2.38k|  }
  700|      2|  return common(state, tok);
  701|  2.38k|}
xmlrole.c:doctype5:
  319|  2.13k|         const ENCODING *enc) {
  320|  2.13k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.13k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.13k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.13k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.13k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 4, False: 2.13k]
  ------------------
  324|     31|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     31|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 31, False: 2.10k]
  ------------------
  325|     31|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.10k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.10k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.10k, False: 35]
  ------------------
  327|  2.10k|    state->handler = prolog2;
  328|  2.10k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.13k|  }
  330|      4|  return common(state, tok);
  331|  2.13k|}
xmlrole.c:prolog2:
  205|  3.32k|        const ENCODING *enc) {
  206|  3.32k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.32k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.32k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.32k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.32k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.32k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 16, False: 3.31k]
  ------------------
  210|    372|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    372|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 372, False: 2.95k]
  ------------------
  211|    372|    return XML_ROLE_NONE;
  212|    420|  case XML_TOK_PI:
  ------------------
  |  |   76|    420|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 420, False: 2.90k]
  ------------------
  213|    420|    return XML_ROLE_PI;
  214|    419|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    419|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 419, False: 2.90k]
  ------------------
  215|    419|    return XML_ROLE_COMMENT;
  216|  2.09k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.09k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.09k, False: 1.22k]
  ------------------
  217|  2.09k|    state->handler = error;
  218|  2.09k|    return XML_ROLE_INSTANCE_START;
  219|  3.32k|  }
  220|     16|  return common(state, tok);
  221|  3.32k|}
xmlrole.c:doctype3:
  284|    513|         const ENCODING *enc) {
  285|    513|  UNUSED_P(ptr);
  ------------------
  |  |  135|    513|#  define UNUSED_P(p) (void)p
  ------------------
  286|    513|  UNUSED_P(end);
  ------------------
  |  |  135|    513|#  define UNUSED_P(p) (void)p
  ------------------
  287|    513|  UNUSED_P(enc);
  ------------------
  |  |  135|    513|#  define UNUSED_P(p) (void)p
  ------------------
  288|    513|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 79, False: 434]
  ------------------
  289|    389|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    389|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 389, False: 124]
  ------------------
  290|    389|    return XML_ROLE_DOCTYPE_NONE;
  291|     45|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     45|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 45, False: 468]
  ------------------
  292|     45|    state->handler = doctype4;
  293|     45|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    513|  }
  295|     79|  return common(state, tok);
  296|    513|}
xmlrole.c:doctype4:
  300|     53|         const ENCODING *enc) {
  301|     53|  UNUSED_P(ptr);
  ------------------
  |  |  135|     53|#  define UNUSED_P(p) (void)p
  ------------------
  302|     53|  UNUSED_P(end);
  ------------------
  |  |  135|     53|#  define UNUSED_P(p) (void)p
  ------------------
  303|     53|  UNUSED_P(enc);
  ------------------
  |  |  135|     53|#  define UNUSED_P(p) (void)p
  ------------------
  304|     53|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 43]
  ------------------
  305|     21|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     21|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 21, False: 32]
  ------------------
  306|     21|    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: 42]
  ------------------
  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: 42]
  ------------------
  311|     11|    state->handler = prolog2;
  312|     11|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     53|  }
  314|     10|  return common(state, tok);
  315|     53|}
xmlrole.c:doctype2:
  268|  1.45k|         const ENCODING *enc) {
  269|  1.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.45k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 11, False: 1.44k]
  ------------------
  273|    734|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    734|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 734, False: 724]
  ------------------
  274|    734|    return XML_ROLE_DOCTYPE_NONE;
  275|    713|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    713|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 713, False: 745]
  ------------------
  276|    713|    state->handler = doctype3;
  277|    713|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.45k|  }
  279|     11|  return common(state, tok);
  280|  1.45k|}
xmlrole.c:common:
 1225|  1.23k|common(PROLOG_STATE *state, int tok) {
 1226|  1.23k|#ifdef XML_DTD
 1227|  1.23k|  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.23k]
  |  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.23k|  state->handler = error;
 1233|  1.23k|  return XML_ROLE_ERROR;
 1234|  1.23k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  36.5M|                                           const char **fromLimRef) {
  328|  36.5M|  const char *fromLim = *fromLimRef;
  329|  36.5M|  size_t walked = 0;
  330|  40.8M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 40.8M, False: 4.88k]
  ------------------
  331|  40.8M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  40.8M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 803k, False: 40.0M]
  ------------------
  333|  40.8M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   803k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 802k, False: 200]
  ------------------
  335|   802k|        fromLim += 4 - 1;
  336|   802k|        break;
  337|   802k|      } else {
  338|    200|        walked = 0;
  339|    200|      }
  340|  40.0M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 520k, False: 39.4M]
  ------------------
  341|  40.0M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|   520k|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 519k, False: 1.55k]
  ------------------
  343|   519k|        fromLim += 3 - 1;
  344|   519k|        break;
  345|   519k|      } else {
  346|  1.55k|        walked = 0;
  347|  1.55k|      }
  348|  39.4M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 807k, False: 38.6M]
  ------------------
  349|  39.4M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|   807k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 806k, False: 664]
  ------------------
  351|   806k|        fromLim += 2 - 1;
  352|   806k|        break;
  353|   806k|      } else {
  354|    664|        walked = 0;
  355|    664|      }
  356|  38.6M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 34.4M, False: 4.25M]
  ------------------
  357|  38.6M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  34.4M|      break;
  359|  34.4M|    }
  360|  40.8M|  }
  361|  36.5M|  *fromLimRef = fromLim;
  362|  36.5M|}
XmlUtf8Encode:
 1255|  55.3k|XmlUtf8Encode(int c, char *buf) {
 1256|  55.3k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  55.3k|    min2 = 0x80,
 1259|  55.3k|    min3 = 0x800,
 1260|  55.3k|    min4 = 0x10000
 1261|  55.3k|  };
 1262|       |
 1263|  55.3k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 55.3k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  55.3k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 21.1k, False: 34.1k]
  ------------------
 1266|  21.1k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  21.1k|    return 1;
 1268|  21.1k|  }
 1269|  34.1k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 14.4k, False: 19.6k]
  ------------------
 1270|  14.4k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  14.4k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  14.4k|    return 2;
 1273|  14.4k|  }
 1274|  19.6k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 17.5k, False: 2.12k]
  ------------------
 1275|  17.5k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  17.5k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  17.5k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  17.5k|    return 3;
 1279|  17.5k|  }
 1280|  2.12k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 2.12k, False: 0]
  ------------------
 1281|  2.12k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  2.12k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  2.12k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  2.12k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  2.12k|    return 4;
 1286|  2.12k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  2.12k|}
xmltok.c:checkCharRefNumber:
 1231|  64.0k|checkCharRefNumber(int result) {
 1232|  64.0k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 36.5k, False: 27.5k]
  ------------------
 1233|      4|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 4, False: 64.0k]
  ------------------
 1234|      7|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 64.0k]
  ------------------
 1235|     10|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 64.0k]
  ------------------
 1236|     13|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 64.0k]
  ------------------
 1237|     16|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 64.0k]
  ------------------
 1238|     25|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 9, False: 64.0k]
  ------------------
 1239|     28|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 64.0k]
  ------------------
 1240|     31|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 64.0k]
  ------------------
 1241|     31|    return -1;
 1242|  26.3k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 26.3k, False: 37.7k]
  ------------------
 1243|  26.3k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 124, False: 26.1k]
  ------------------
 1244|    124|      return -1;
 1245|  26.1k|    break;
 1246|  26.1k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.16k, False: 62.8k]
  ------------------
 1247|  1.16k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 1.15k]
  |  Branch (1247:29): [True: 7, False: 1.15k]
  ------------------
 1248|     10|      return -1;
 1249|  1.15k|    break;
 1250|  64.0k|  }
 1251|  63.8k|  return result;
 1252|  64.0k|}
xmltok.c:utf8_toUtf8:
  366|  36.5M|            char **toP, const char *toLim) {
  367|  36.5M|  bool input_incomplete = false;
  368|  36.5M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  36.5M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  36.5M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  36.5M|  UNUSED_P(enc);
  ------------------
  |  |  135|  36.5M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  36.5M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 13.4k, False: 36.5M]
  ------------------
  375|  13.4k|    fromLim = *fromP + bytesStorable;
  376|  13.4k|    output_exhausted = true;
  377|  13.4k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  36.5M|  {
  381|  36.5M|    const char *const fromLimBefore = fromLim;
  382|  36.5M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  36.5M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 2.41k, False: 36.5M]
  ------------------
  384|  2.41k|      input_incomplete = true;
  385|  2.41k|    }
  386|  36.5M|  }
  387|       |
  388|  36.5M|  {
  389|  36.5M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  36.5M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  36.5M|    *fromP += bytesToCopy;
  392|  36.5M|    *toP += bytesToCopy;
  393|  36.5M|  }
  394|       |
  395|  36.5M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 13.4k, False: 36.5M]
  ------------------
  396|  13.4k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  36.5M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 36.5M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  36.5M|  else
  400|  36.5M|    return XML_CONVERT_COMPLETED;
  401|  36.5M|}
xmltok.c:utf8_isName2:
  140|  57.2k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  57.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  57.2k|#  define UNUSED_P(p) (void)p
  ------------------
  142|  57.2k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  57.2k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  57.2k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  57.2k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  57.2k|}
xmltok.c:utf8_isName3:
  146|   930k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|   930k|  UNUSED_P(enc);
  ------------------
  |  |  135|   930k|#  define UNUSED_P(p) (void)p
  ------------------
  148|   930k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|   930k|  (namingBitmap                                                                \
  |  |   97|   930k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|   930k|         << 3)                                                                 \
  |  |   99|   930k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|   930k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|   930k|}
xmltok.c:isNever:
  133|     84|isNever(const ENCODING *enc, const char *p) {
  134|     84|  UNUSED_P(enc);
  ------------------
  |  |  135|     84|#  define UNUSED_P(p) (void)p
  ------------------
  135|     84|  UNUSED_P(p);
  ------------------
  |  |  135|     84|#  define UNUSED_P(p) (void)p
  ------------------
  136|     84|  return 0;
  137|     84|}
xmltok.c:utf8_isNmstrt2:
  154|  39.7k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|  39.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  39.7k|#  define UNUSED_P(p) (void)p
  ------------------
  156|  39.7k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|  39.7k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  39.7k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  39.7k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|  39.7k|}
xmltok.c:utf8_isNmstrt3:
  160|  5.20k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  5.20k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.20k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  5.20k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  5.20k|  (namingBitmap                                                                \
  |  |   97|  5.20k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  5.20k|         << 3)                                                                 \
  |  |   99|  5.20k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  5.20k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  5.20k|}
xmltok.c:utf8_isInvalid2:
  168|   343k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   343k|  UNUSED_P(enc);
  ------------------
  |  |  135|   343k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   343k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   343k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 16, False: 343k]
  |  |  |  Branch (113:19): [True: 139, False: 343k]
  |  |  |  Branch (113:43): [True: 91, False: 343k]
  |  |  ------------------
  ------------------
  171|   343k|}
xmltok.c:utf8_isInvalid3:
  174|  21.6M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  21.6M|  UNUSED_P(enc);
  ------------------
  |  |  135|  21.6M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  21.6M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  21.6M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 97, False: 21.6M]
  |  |  ------------------
  |  |  117|  21.6M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 67, False: 21.6M]
  |  |  |  Branch (117:8): [True: 95.0k, False: 21.5M]
  |  |  |  Branch (117:24): [True: 3.94k, False: 91.1k]
  |  |  ------------------
  |  |  118|  21.6M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  21.6M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 41, False: 21.6M]
  |  |  |  Branch (119:8): [True: 1.67M, False: 19.9M]
  |  |  ------------------
  |  |  120|  21.6M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 17, False: 1.67M]
  |  |  |  Branch (120:31): [True: 4, False: 1.67M]
  |  |  ------------------
  |  |  121|  21.6M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 11, False: 19.9M]
  |  |  ------------------
  |  |  122|  19.9M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 9, False: 19.9M]
  |  |  |  Branch (122:22): [True: 37.6k, False: 19.8M]
  |  |  ------------------
  ------------------
  177|  21.6M|}
xmltok.c:utf8_isInvalid4:
  180|   181k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|   181k|  UNUSED_P(enc);
  ------------------
  |  |  135|   181k|#  define UNUSED_P(p) (void)p
  ------------------
  182|   181k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|   181k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 142, False: 181k]
  |  |  |  Branch (125:28): [True: 69, False: 180k]
  |  |  |  Branch (125:55): [True: 8, False: 180k]
  |  |  ------------------
  |  |  126|   181k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 11, False: 180k]
  |  |  ------------------
  |  |  127|   181k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 49, False: 180k]
  |  |  |  Branch (127:8): [True: 17.5k, False: 163k]
  |  |  ------------------
  |  |  128|   180k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 13, False: 17.5k]
  |  |  |  Branch (128:31): [True: 13, False: 17.5k]
  |  |  ------------------
  |  |  129|   180k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 3, False: 163k]
  |  |  ------------------
  |  |  130|   163k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 20, False: 163k]
  |  |  |  Branch (130:22): [True: 18.9k, False: 144k]
  |  |  ------------------
  ------------------
  183|   181k|}
xmltok.c:unicode_byte_type:
  595|   129M|unicode_byte_type(char hi, char lo) {
  596|   129M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 128M, False: 1.37M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   327k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 327k, False: 129M]
  ------------------
  599|   660k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 333k, False: 129M]
  ------------------
  600|   832k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 172k, False: 129M]
  ------------------
  601|  1.19M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 361k, False: 129M]
  ------------------
  602|  1.19M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     93|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 93, False: 129M]
  ------------------
  605|    187|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 94, False: 129M]
  ------------------
  606|    285|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 98, False: 129M]
  ------------------
  607|    394|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 109, False: 129M]
  ------------------
  608|    394|    return BT_TRAIL;
  609|   183k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 183k, False: 129M]
  ------------------
  610|   183k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 183k, False: 223]
  ------------------
  611|    206|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 206, False: 183k]
  ------------------
  612|    223|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 17, False: 183k]
  ------------------
  613|    223|      return BT_NONXML;
  614|   183k|    }
  615|   183k|    break;
  616|   129M|  }
  617|   128M|  return BT_NONASCII;
  618|   129M|}
xmltok.c:little2_toUtf8:
  623|   204k|      char **toP, const char *toLim) {                                         \
  624|   204k|    const char *from = *fromP;                                                 \
  625|   204k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   204k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   204k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  13.4M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 13.2M, False: 202k]
  ------------------
  628|  13.2M|      int plane;                                                               \
  629|  13.2M|      unsigned char lo2;                                                       \
  630|  13.2M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  13.2M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  13.2M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  13.2M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  13.2M|      switch (hi) {                                                            \
  633|   314k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 314k, False: 12.9M]
  ------------------
  634|   314k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 275k, False: 38.6k]
  ------------------
  635|   275k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 431, False: 275k]
  ------------------
  636|    431|            *fromP = from;                                                     \
  637|    431|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    431|          }                                                                    \
  639|   275k|          *(*toP)++ = lo;                                                      \
  640|   275k|          break;                                                               \
  641|   275k|        }                                                                      \
  642|   314k|        /* fall through */                                                     \
  643|   314k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 10.1k, False: 13.2M]
  ------------------
  644|  59.9k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 11.1k, False: 13.2M]
  ------------------
  645|  67.4k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 7.43k, False: 13.2M]
  ------------------
  646|   176k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 109k, False: 13.1M]
  ------------------
  647|   177k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.39k, False: 13.2M]
  ------------------
  648|   208k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 30.4k, False: 13.1M]
  ------------------
  649|   220k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 12.0k, False: 13.2M]
  ------------------
  650|   220k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 304, False: 220k]
  ------------------
  651|    304|          *fromP = from;                                                       \
  652|    304|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    304|        }                                                                      \
  654|   220k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   220k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   220k|        break;                                                                 \
  657|  12.5M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 12.5M, False: 697k]
  ------------------
  658|  12.5M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.65k, False: 12.5M]
  ------------------
  659|  1.65k|          *fromP = from;                                                       \
  660|  1.65k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.65k|        }                                                                      \
  662|  12.5M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  12.5M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  12.5M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  12.5M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  12.5M|        break;                                                                 \
  667|  12.5M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 69.5k, False: 13.1M]
  ------------------
  668|   153k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 84.0k, False: 13.1M]
  ------------------
  669|   179k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 25.7k, False: 13.1M]
  ------------------
  670|   201k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 22.0k, False: 13.1M]
  ------------------
  671|   201k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 281, False: 201k]
  ------------------
  672|    281|          *fromP = from;                                                       \
  673|    281|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    281|        }                                                                      \
  675|   201k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 201k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   201k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   201k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   201k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   201k|        from += 2;                                                             \
  683|   201k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   201k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   201k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   201k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   201k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   201k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   201k|        break;                                                                 \
  688|  13.2M|      }                                                                        \
  689|  13.2M|    }                                                                          \
  690|   204k|    *fromP = from;                                                             \
  691|   202k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 202k]
  ------------------
  692|   202k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   202k|    else                                                                       \
  694|   202k|      return XML_CONVERT_COMPLETED;                                            \
  695|   202k|  }
xmltok.c:getEncodingIndex:
 1502|  39.0k|getEncodingIndex(const char *name) {
 1503|  39.0k|  static const char *const encodingNames[] = {
 1504|  39.0k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.0k|  };
 1506|  39.0k|  int i;
 1507|  39.0k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.4k, False: 19.5k]
  ------------------
 1508|  19.4k|    return NO_ENC;
 1509|  58.7k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 58.6k, False: 36]
  ------------------
 1510|  58.6k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.4k, False: 39.2k]
  ------------------
 1511|  19.4k|      return i;
 1512|     36|  return UNKNOWN_ENC;
 1513|  19.5k|}
xmltok.c:streqci:
 1005|  58.7k|streqci(const char *s1, const char *s2) {
 1006|   176k|  for (;;) {
 1007|   176k|    char c1 = *s1++;
 1008|   176k|    char c2 = *s2++;
 1009|   176k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   176k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    219|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 219, False: 175k]
  |  Branch (1009:26): [True: 219, False: 0]
  ------------------
 1010|    219|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    219|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    219|#define ASCII_a 0x61
  ------------------
 1011|   176k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   176k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 176k]
  |  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|   176k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 39.2k, False: 136k]
  ------------------
 1018|  39.2k|      return 0;
 1019|   136k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.4k, False: 117k]
  ------------------
 1020|  19.4k|      break;
 1021|   136k|  }
 1022|  19.4k|  return 1;
 1023|  58.7k|}
xmltok.c:initScan:
 1531|  19.4k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.4k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.4k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.4k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.4k|  encPtr = enc->encPtr;
 1537|  19.4k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 38, False: 19.4k]
  ------------------
 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|     38|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     38|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 38, False: 0]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 38]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 38]
  ------------------
 1549|      0|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 38]
  ------------------
 1550|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     38|    }
 1552|     38|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 33, False: 5]
  ------------------
 1553|      1|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 1, False: 37]
  ------------------
 1554|      2|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 1, False: 37]
  ------------------
 1555|      3|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 1, False: 37]
  ------------------
 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: 37]
  ------------------
 1560|      5|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 1, False: 37]
  ------------------
 1561|      5|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|     38|    }
 1563|  19.4k|  } else {
 1564|  19.4k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      7|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 7, False: 19.4k]
  ------------------
 1566|      7|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      7|#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: 7]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      7|      *nextTokPtr = ptr + 2;
 1569|      7|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      7|      return XML_TOK_BOM;
  ------------------
  |  |   79|      7|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  4.73k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 4.73k, False: 14.7k]
  ------------------
 1573|  4.73k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  4.73k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 4.73k]
  ------------------
 1574|  4.73k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  4.73k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 4.73k]
  ------------------
 1575|  4.73k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  4.73k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  4.73k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  4.73k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      3|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 3, False: 19.4k]
  ------------------
 1580|      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 (1580:11): [True: 0, False: 3]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|      3|      *nextTokPtr = ptr + 2;
 1583|      3|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      3|      return XML_TOK_BOM;
  ------------------
  |  |   79|      3|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|    287|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 287, False: 19.1k]
  ------------------
 1586|       |      /* Maybe a UTF-8 BOM (EF BB BF) */
 1587|       |      /* If there's an explicitly specified (external) encoding
 1588|       |         of ISO-8859-1 or some flavour of UTF-16
 1589|       |         and this is an external text entity,
 1590|       |         don't look for the BOM,
 1591|       |         because it might be a legal data.
 1592|       |      */
 1593|    287|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|    287|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 287]
  ------------------
 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|    287|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 286]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|    286|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 271, False: 15]
  ------------------
 1602|    271|        *nextTokPtr = ptr + 3;
 1603|    271|        *encPtr = encodingTable[UTF_8_ENC];
 1604|    271|        return XML_TOK_BOM;
  ------------------
  |  |   79|    271|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|    271|      }
 1606|     15|      break;
 1607|  14.4k|    default:
  ------------------
  |  Branch (1607:5): [True: 14.4k, False: 5.02k]
  ------------------
 1608|  14.4k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.17k, False: 8.25k]
  ------------------
 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.17k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.3k|#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.17k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.17k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.17k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.17k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  8.25k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 972, False: 7.27k]
  ------------------
 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|    972|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    972|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 972]
  ------------------
 1630|      0|          break;
 1631|    972|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    972|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    972|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    972|      }
 1634|  7.27k|      break;
 1635|  19.4k|    }
 1636|  19.4k|  }
 1637|  7.32k|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|  7.32k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|  7.32k|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  7.32k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.4k|}
xmltok.c:big2_toUtf8:
  623|   116k|      char **toP, const char *toLim) {                                         \
  624|   116k|    const char *from = *fromP;                                                 \
  625|   116k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   116k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   116k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  36.0M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 35.9M, False: 112k]
  ------------------
  628|  35.9M|      int plane;                                                               \
  629|  35.9M|      unsigned char lo2;                                                       \
  630|  35.9M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  35.9M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  35.9M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  35.9M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  35.9M|      switch (hi) {                                                            \
  633|   253k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 253k, False: 35.7M]
  ------------------
  634|   253k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 223k, False: 30.0k]
  ------------------
  635|   223k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 313, False: 222k]
  ------------------
  636|    313|            *fromP = from;                                                     \
  637|    313|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    313|          }                                                                    \
  639|   223k|          *(*toP)++ = lo;                                                      \
  640|   222k|          break;                                                               \
  641|   223k|        }                                                                      \
  642|   253k|        /* fall through */                                                     \
  643|   253k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 5.89k, False: 35.9M]
  ------------------
  644|  70.3k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 34.4k, False: 35.9M]
  ------------------
  645|  72.5k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 2.25k, False: 35.9M]
  ------------------
  646|   134k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 61.9k, False: 35.9M]
  ------------------
  647|   137k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 2.87k, False: 35.9M]
  ------------------
  648|   139k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 1.81k, False: 35.9M]
  ------------------
  649|   153k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 14.7k, False: 35.9M]
  ------------------
  650|   153k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 259, False: 153k]
  ------------------
  651|    259|          *fromP = from;                                                       \
  652|    259|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    259|        }                                                                      \
  654|   153k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   153k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   153k|        break;                                                                 \
  657|  35.4M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 35.4M, False: 483k]
  ------------------
  658|  35.4M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.51k, False: 35.4M]
  ------------------
  659|  3.51k|          *fromP = from;                                                       \
  660|  3.51k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.51k|        }                                                                      \
  662|  35.4M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  35.4M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  35.4M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  35.4M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  35.4M|        break;                                                                 \
  667|  35.4M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 33.6k, False: 35.9M]
  ------------------
  668|  67.2k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 33.5k, False: 35.9M]
  ------------------
  669|  80.1k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 12.9k, False: 35.9M]
  ------------------
  670|   106k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 26.2k, False: 35.9M]
  ------------------
  671|   106k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 372, False: 105k]
  ------------------
  672|    372|          *fromP = from;                                                       \
  673|    372|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    372|        }                                                                      \
  675|   106k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 105k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   105k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   105k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   105k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   105k|        from += 2;                                                             \
  683|   105k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   105k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   105k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   105k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   105k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   105k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   105k|        break;                                                                 \
  688|  35.9M|      }                                                                        \
  689|  35.9M|    }                                                                          \
  690|   116k|    *fromP = from;                                                             \
  691|   112k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 112k]
  ------------------
  692|   112k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   112k|    else                                                                       \
  694|   112k|      return XML_CONVERT_COMPLETED;                                            \
  695|   112k|  }
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|    325|               const ENCODING **encoding, int *standalone) {
 1156|    325|  const char *val = NULL;
 1157|    325|  const char *name = NULL;
 1158|    325|  const char *nameEnd = NULL;
 1159|    325|  ptr += 5 * enc->minBytesPerChar;
 1160|    325|  end -= 2 * enc->minBytesPerChar;
 1161|    325|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 181, False: 144]
  ------------------
 1162|    325|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 13, False: 131]
  ------------------
 1163|    194|    *badPtr = ptr;
 1164|    194|    return 0;
 1165|    194|  }
 1166|    131|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    131|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 5, False: 126]
  ------------------
 1167|      5|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 5, False: 0]
  ------------------
 1168|      5|      *badPtr = name;
 1169|      5|      return 0;
 1170|      5|    }
 1171|    126|  } else {
 1172|    126|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 126, False: 0]
  ------------------
 1173|    126|      *versionPtr = val;
 1174|    126|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 126, False: 0]
  ------------------
 1175|    126|      *versionEndPtr = ptr;
 1176|    126|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 15, False: 111]
  ------------------
 1177|     15|      *badPtr = ptr;
 1178|     15|      return 0;
 1179|     15|    }
 1180|    111|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 15, False: 96]
  ------------------
 1181|     15|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 15]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|     15|      return 1;
 1187|     15|    }
 1188|    111|  }
 1189|     96|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     96|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 47, False: 49]
  |  |  ------------------
  ------------------
 1190|     47|    int c = toAscii(enc, val, end);
 1191|     47|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     47|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     16|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     31|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     30|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 16, False: 31]
  |  Branch (1191:28): [True: 16, False: 0]
  |  Branch (1191:48): [True: 30, False: 1]
  |  Branch (1191:64): [True: 29, False: 1]
  ------------------
 1192|      2|      *badPtr = val;
 1193|      2|      return 0;
 1194|      2|    }
 1195|     45|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 45, False: 0]
  ------------------
 1196|     45|      *encodingName = val;
 1197|     45|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 45, False: 0]
  ------------------
 1198|     45|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     45|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 6, False: 39]
  ------------------
 1200|      6|      *badPtr = ptr;
 1201|      6|      return 0;
 1202|      6|    }
 1203|     39|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 37, False: 2]
  ------------------
 1204|     37|      return 1;
 1205|     39|  }
 1206|     51|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|    102|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 6, False: 45]
  ------------------
 1207|     51|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 45]
  ------------------
 1208|      6|    *badPtr = name;
 1209|      6|    return 0;
 1210|      6|  }
 1211|     45|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     45|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 27, False: 18]
  |  |  ------------------
  ------------------
 1212|     27|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 27, False: 0]
  ------------------
 1213|     27|      *standalone = 1;
 1214|     27|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     18|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17, False: 1]
  |  |  ------------------
  ------------------
 1215|     17|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 17, False: 0]
  ------------------
 1216|     17|      *standalone = 0;
 1217|     17|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    249|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 205, False: 44]
  ------------------
 1222|    205|    ptr += enc->minBytesPerChar;
 1223|     44|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 8, False: 36]
  ------------------
 1224|      8|    *badPtr = ptr;
 1225|      8|    return 0;
 1226|      8|  }
 1227|     36|  return 1;
 1228|     44|}
xmltok.c:parsePseudoAttribute:
 1061|    496|                     const char **valPtr, const char **nextTokPtr) {
 1062|    496|  int c;
 1063|    496|  char open;
 1064|    496|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 51, False: 445]
  ------------------
 1065|     51|    *namePtr = NULL;
 1066|     51|    return 1;
 1067|     51|  }
 1068|    445|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 4, False: 441]
  ------------------
 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: 252, False: 441]
  ------------------
 1075|    441|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 14, False: 427]
  ------------------
 1076|     14|    *namePtr = NULL;
 1077|     14|    return 1;
 1078|     14|  }
 1079|    427|  *namePtr = ptr;
 1080|  2.85k|  for (;;) {
 1081|  2.85k|    c = toAscii(enc, ptr, end);
 1082|  2.85k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 54, False: 2.80k]
  ------------------
 1083|     54|      *nextTokPtr = ptr;
 1084|     54|      return 0;
 1085|     54|    }
 1086|  2.80k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.80k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 334, False: 2.47k]
  ------------------
 1087|    334|      *nameEndPtr = ptr;
 1088|    334|      break;
 1089|    334|    }
 1090|  2.47k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 39, False: 2.43k]
  ------------------
 1091|     39|      *nameEndPtr = ptr;
 1092|    368|      do {
 1093|    368|        ptr += enc->minBytesPerChar;
 1094|    368|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 329, False: 39]
  ------------------
 1095|     39|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     39|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 31, False: 8]
  ------------------
 1096|     31|        *nextTokPtr = ptr;
 1097|     31|        return 0;
 1098|     31|      }
 1099|      8|      break;
 1100|     39|    }
 1101|  2.43k|    ptr += enc->minBytesPerChar;
 1102|  2.43k|  }
 1103|    342|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 4, False: 338]
  ------------------
 1104|      4|    *nextTokPtr = ptr;
 1105|      4|    return 0;
 1106|      4|  }
 1107|    338|  ptr += enc->minBytesPerChar;
 1108|    338|  c = toAscii(enc, ptr, end);
 1109|    599|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 261, False: 338]
  ------------------
 1110|    261|    ptr += enc->minBytesPerChar;
 1111|    261|    c = toAscii(enc, ptr, end);
 1112|    261|  }
 1113|    338|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    676|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     69|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 69, False: 269]
  |  Branch (1113:26): [True: 31, False: 38]
  ------------------
 1114|     31|    *nextTokPtr = ptr;
 1115|     31|    return 0;
 1116|     31|  }
 1117|    307|  open = (char)c;
 1118|    307|  ptr += enc->minBytesPerChar;
 1119|    307|  *valPtr = ptr;
 1120|  2.17k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.17k|    c = toAscii(enc, ptr, end);
 1122|  2.17k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 229, False: 1.94k]
  ------------------
 1123|    229|      break;
 1124|  1.94k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  1.94k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    358|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.59k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    715|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 358, False: 1.59k]
  |  Branch (1124:28): [True: 356, False: 2]
  |  Branch (1124:48): [True: 715, False: 877]
  |  Branch (1124:64): [True: 481, False: 234]
  ------------------
 1125|  1.94k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.11k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    564|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.73k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 564, False: 547]
  |  Branch (1125:31): [True: 324, False: 240]
  |  Branch (1125:48): [True: 545, False: 242]
  ------------------
 1126|  1.94k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.49k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    307|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 307, False: 238]
  |  Branch (1126:32): [True: 78, False: 229]
  ------------------
 1127|     78|      *nextTokPtr = ptr;
 1128|     78|      return 0;
 1129|     78|    }
 1130|  1.94k|  }
 1131|    229|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    229|  return 1;
 1133|    307|}
xmltok.c:toAscii:
 1033|  7.43k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.43k|  char buf[1];
 1035|  7.43k|  char *p = buf;
 1036|  7.43k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.43k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.43k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 224, False: 7.21k]
  ------------------
 1038|    224|    return -1;
 1039|  7.21k|  else
 1040|  7.21k|    return buf[0];
 1041|  7.43k|}
xmltok.c:isSpace:
 1044|  4.82k|isSpace(int c) {
 1045|  4.82k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.29k, False: 1.52k]
  ------------------
 1046|    571|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 571, False: 4.25k]
  ------------------
 1047|    936|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 365, False: 4.46k]
  ------------------
 1048|  1.29k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 361, False: 4.46k]
  ------------------
 1049|  1.52k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 230, False: 4.59k]
  ------------------
 1050|  1.52k|    return 1;
 1051|  4.82k|  }
 1052|  3.29k|  return 0;
 1053|  4.82k|}

xmltok.c:normal_prologTok:
 1018|  5.02M|                  const char **nextTokPtr) {
 1019|  5.02M|  int tok;
 1020|  5.02M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.13k, False: 5.02M]
  ------------------
 1021|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.02M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.02M|#  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.02M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.62k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.62k, False: 5.02M]
  ------------------
 1033|  4.62k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.62k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.62k|#  define MINBPC(enc) 1
  ------------------
 1034|  10.8k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 10.8k, False: 5.01M]
  ------------------
 1035|  10.8k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  10.8k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  10.8k|#  define MINBPC(enc) 1
  ------------------
 1036|  29.5k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 29.5k, False: 4.99M]
  ------------------
 1037|  29.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  29.5k|#  define MINBPC(enc) 1
  ------------------
 1038|  29.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  29.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  29.5k|    {                                                                          \
  |  |  |  |  135|  29.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  29.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  29.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 20, False: 29.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     20|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     20|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     20|      }                                                                        \
  |  |  |  |  138|  29.5k|    }
  |  |  ------------------
  ------------------
 1039|  29.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  29.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  29.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 23, False: 29.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  22.1k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 22.1k, False: 7.42k]
  ------------------
 1041|  22.1k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  22.1k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  22.1k|#  define MINBPC(enc) 1
  ------------------
 1042|  3.44k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.44k, False: 26.1k]
  ------------------
 1043|  3.44k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.44k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.44k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.34k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.34k, False: 27.2k]
  ------------------
 1045|  3.86k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.52k, False: 28.0k]
  ------------------
 1046|  3.86k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 29.5k]
  ------------------
 1047|  3.91k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 45, False: 29.5k]
  ------------------
 1048|  3.94k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 38, False: 29.5k]
  ------------------
 1049|  3.95k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 29.5k]
  ------------------
 1050|  3.95k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.95k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.95k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.95k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  29.5k|    }
 1053|     23|    *nextTokPtr = ptr;
 1054|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
 1055|  29.5k|  }
 1056|   127k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 127k, False: 4.89M]
  ------------------
 1057|   127k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|   127k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 133, False: 127k]
  ------------------
 1058|    133|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    133|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    133|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    133|    }
 1062|       |    /* fall through */
 1063|   192k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 64.6k, False: 4.96M]
  ------------------
 1064|   242k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 50.6k, False: 4.97M]
  ------------------
 1065|   250k|    for (;;) {
 1066|   250k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   250k|#  define MINBPC(enc) 1
  ------------------
 1067|   250k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   250k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   250k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   250k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 546, False: 249k]
  ------------------
 1068|    546|        break;
 1069|   249k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   249k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   249k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|    912|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 912, False: 248k]
  ------------------
 1071|  6.33k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 5.42k, False: 244k]
  ------------------
 1072|  6.33k|        break;
 1073|    966|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 966, False: 248k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    966|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|    966|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 956, False: 10]
  ------------------
 1076|    956|          break;
 1077|       |        /* fall through */
 1078|   242k|      default:
  ------------------
  |  Branch (1078:7): [True: 242k, False: 7.30k]
  ------------------
 1079|   242k|        *nextTokPtr = ptr;
 1080|   242k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   242k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   249k|      }
 1082|   249k|    }
 1083|    546|    *nextTokPtr = ptr;
 1084|    546|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    546|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.93k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.93k, False: 5.02M]
  ------------------
 1086|  3.93k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.93k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.93k|#  define MINBPC(enc) 1
  ------------------
 1087|    757|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 757, False: 5.02M]
  ------------------
 1088|    757|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    757|#  define MINBPC(enc) 1
  ------------------
 1089|    757|    return XML_TOK_COMMA;
  ------------------
  |  |  107|    757|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.68k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.68k, False: 5.02M]
  ------------------
 1091|  2.68k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.68k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.68k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.68k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.04k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.04k, False: 5.02M]
  ------------------
 1094|  1.04k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.04k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.04k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.04k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.04k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.04k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 5, False: 1.04k]
  ------------------
 1096|      5|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      5|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.04k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|  1.04k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 17, False: 1.02k]
  |  |  ------------------
  ------------------
 1098|     17|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     17|    {                                                                          \
  |  |  135|     17|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     17|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     17|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 16]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     17|    }
  ------------------
 1099|     16|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     16|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 15]
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     16|    }
 1104|  1.03k|    *nextTokPtr = ptr;
 1105|  1.03k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.03k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.37M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.37M, False: 653k]
  ------------------
 1107|  4.37M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.37M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.37M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.37M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  58.6k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 58.6k, False: 4.96M]
  ------------------
 1110|  58.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  58.6k|#  define MINBPC(enc) 1
  ------------------
 1111|  58.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  58.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  58.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  58.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 22, False: 58.6k]
  ------------------
 1112|     22|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     22|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  58.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  58.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  58.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 14, False: 58.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  2.68k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 2.68k, False: 55.9k]
  ------------------
 1115|  2.68k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.68k|#  define MINBPC(enc) 1
  ------------------
 1116|  2.68k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  2.68k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  3.47k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 3.47k, False: 55.1k]
  ------------------
 1118|  3.47k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.47k|#  define MINBPC(enc) 1
  ------------------
 1119|  3.47k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  3.47k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  6.94k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 6.94k, False: 51.7k]
  ------------------
 1121|  6.94k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.94k|#  define MINBPC(enc) 1
  ------------------
 1122|  6.94k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  6.94k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  1.61k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 1.61k, False: 57.0k]
  ------------------
 1124|  2.05k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 436, False: 58.2k]
  ------------------
 1125|  31.6k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 29.5k, False: 29.1k]
  ------------------
 1126|  32.3k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 748, False: 57.9k]
  ------------------
 1127|  32.5k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 202, False: 58.4k]
  ------------------
 1128|  33.9k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 1.35k, False: 57.3k]
  ------------------
 1129|  45.5k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 11.6k, False: 47.0k]
  ------------------
 1130|  45.5k|      *nextTokPtr = ptr;
 1131|  45.5k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  45.5k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  58.6k|    }
 1133|     14|    *nextTokPtr = ptr;
 1134|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
 1135|  71.3k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 71.3k, False: 4.95M]
  ------------------
 1136|  71.3k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  71.3k|#  define MINBPC(enc) 1
  ------------------
 1137|  71.3k|    return XML_TOK_OR;
  ------------------
  |  |   88|  71.3k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  18.1k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 18.1k, False: 5.00M]
  ------------------
 1139|  18.1k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  18.1k|#  define MINBPC(enc) 1
  ------------------
 1140|  18.1k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  18.1k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  32.5k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 32.5k, False: 4.99M]
  ------------------
 1142|  32.5k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  32.5k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  32.5k|#  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|  1.63k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      2|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 477, False: 5.02M]
  |  |  ------------------
  |  | 1145|    477|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 10, False: 467]
  |  |  ------------------
  |  | 1146|     10|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     10|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    467|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    467|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    467|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 11, False: 456]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     11|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     11|    }                                                                          \
  |  | 1151|    467|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    456|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    456|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 222, False: 234]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    222|      ptr += n;                                                                \
  |  | 1153|    222|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    222|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    222|      break;                                                                   \
  |  | 1155|    222|    }                                                                          \
  |  | 1156|    456|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    234|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    234|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 232, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    232|      ptr += n;                                                                \
  |  | 1158|    232|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    232|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    232|      break;                                                                   \
  |  | 1160|    232|    }                                                                          \
  |  | 1161|    234|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      2|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  1.81k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     16|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 542, False: 5.02M]
  |  |  ------------------
  |  | 1145|    542|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 8, False: 534]
  |  |  ------------------
  |  | 1146|     16|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      8|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    534|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    534|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    534|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 57, False: 477]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     57|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     57|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     57|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     57|    }                                                                          \
  |  | 1151|    534|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    477|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    477|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 218, False: 259]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    218|      ptr += n;                                                                \
  |  | 1153|    218|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    218|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    218|      break;                                                                   \
  |  | 1155|    218|    }                                                                          \
  |  | 1156|    477|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    259|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    259|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 243, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    243|      ptr += n;                                                                \
  |  | 1158|    243|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    243|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    243|      break;                                                                   \
  |  | 1160|    243|    }                                                                          \
  |  | 1161|    259|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    148|    LEAD_CASE(4)
  ------------------
  |  | 1144|     17|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 63, False: 5.02M]
  |  |  ------------------
  |  | 1145|     63|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 12, False: 51]
  |  |  ------------------
  |  | 1146|     17|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     12|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     51|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     51|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     51|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 34, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     34|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     34|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     34|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     34|    }                                                                          \
  |  | 1151|     51|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     17|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     17|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     17|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     17|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|   111k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 111k, False: 4.91M]
  ------------------
 1168|   174k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 62.6k, False: 4.96M]
  ------------------
 1169|   174k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   174k|#define XML_TOK_NAME 18
  ------------------
 1170|   174k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   174k|#  define MINBPC(enc) 1
  ------------------
 1171|   174k|    break;
 1172|    488|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 488, False: 5.02M]
  ------------------
 1173|    954|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 466, False: 5.02M]
  ------------------
 1174|  1.17k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 220, False: 5.02M]
  ------------------
 1175|  1.17k|#  ifdef XML_NS
 1176|  1.17k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.02M]
  ------------------
 1177|  1.17k|#  endif
 1178|  1.17k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.17k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.17k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.17k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.17k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.02M]
  ------------------
 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|     83|  default:
  ------------------
  |  Branch (1193:3): [True: 83, False: 5.02M]
  ------------------
 1194|     83|    *nextTokPtr = ptr;
 1195|     83|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     83|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.02M|  }
 1197|  2.82M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.82M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.82M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.82M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  8.04M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.64M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.82M]
  |  |  ------------------
  |  |   82|  2.64M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.64M|    /* fall through */                                                         \
  |  |   87|  2.64M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 188k, False: 2.63M]
  |  |  ------------------
  |  |   88|  2.59M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.40M, False: 413k]
  |  |  ------------------
  |  |   89|  2.61M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 18.3k, False: 2.80M]
  |  |  ------------------
  |  |   90|  2.64M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 26.8k, False: 2.79M]
  |  |  ------------------
  |  |   91|  2.64M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.34k, False: 2.82M]
  |  |  ------------------
  |  |   92|  2.64M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.64M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.64M|    break;                                                                     \
  |  |   94|  2.64M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.19k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.22k, False: 2.82M]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.22k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 2.21k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.19k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.21k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.43k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.21k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 19, False: 2.19k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.19k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |   74|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     22|    }                                                                          \
  |  |  |  |   77|  2.21k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.19k|    break;
  |  |  ------------------
  |  |   95|  2.19k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.23k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.25k, False: 2.82M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.25k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.23k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.24k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.49k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.24k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 1.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.23k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.23k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|  1.24k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.23k|    break;
  |  |  ------------------
  |  |   96|  1.23k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 2.82M]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, 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|     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;
  |  |  ------------------
  ------------------
 1200|  4.58k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 4.58k, False: 2.81M]
  ------------------
 1201|  39.8k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 35.2k, False: 2.78M]
  ------------------
 1202|  40.3k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 475, False: 2.82M]
  ------------------
 1203|  79.1k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 38.8k, False: 2.78M]
  ------------------
 1204|  81.6k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.57k, False: 2.82M]
  ------------------
 1205|  81.7k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 10, False: 2.82M]
  ------------------
 1206|  97.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 16.0k, False: 2.80M]
  ------------------
 1207|   136k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 38.3k, False: 2.78M]
  ------------------
 1208|   162k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 26.3k, False: 2.79M]
  ------------------
 1209|   162k|      *nextTokPtr = ptr;
 1210|   162k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.82M]
  ------------------
 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|    796|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 796, False: 2.82M]
  ------------------
 1232|    796|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    796|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 2, False: 794]
  ------------------
 1233|      2|        *nextTokPtr = ptr;
 1234|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1235|      2|      }
 1236|    794|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    794|#  define MINBPC(enc) 1
  ------------------
 1237|    794|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    794|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    462|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 462, False: 2.82M]
  ------------------
 1239|    462|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    462|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 461]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    461|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    461|#  define MINBPC(enc) 1
  ------------------
 1244|    461|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    461|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|  12.0k|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 12.0k, False: 2.81M]
  ------------------
 1246|  12.0k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  12.0k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 12.0k]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|  12.0k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  12.0k|#  define MINBPC(enc) 1
  ------------------
 1251|  12.0k|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|  12.0k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     55|    default:
  ------------------
  |  Branch (1252:5): [True: 55, False: 2.82M]
  ------------------
 1253|     55|      *nextTokPtr = ptr;
 1254|     55|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     55|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.82M|    }
 1256|  2.82M|  }
 1257|    237|  return -tok;
 1258|   176k|}
xmltok.c:normal_scanLit:
  984|  15.4k|                const char **nextTokPtr) {
  985|  12.2M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  12.2M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  12.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  12.2M|    switch (t) {
  988|  5.82k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.13k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.13k, False: 12.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.13k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.13k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.13k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     15|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     15|    }                                                                          \
  |  |  |  |   56|  1.13k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.11k|    break;
  |  |  ------------------
  |  |   61|  1.33k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.31k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.33k, False: 12.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.33k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.33k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.31k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.33k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.33k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.33k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  1.33k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.31k|    break;
  |  |  ------------------
  |  |   62|  1.31k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    425|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 438, False: 12.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|    438|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 436]
  |  |  |  |  ------------------
  |  |  |  |   51|    425|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    436|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    436|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    436|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 425]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|    436|    ptr += n;                                                                  \
  |  |  |  |   57|    425|    break;
  |  |  ------------------
  |  |   63|    425|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 12.2M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 12.2M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 12.2M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  14.5k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 14.5k, False: 12.2M]
  ------------------
  990|  25.8k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 11.2k, False: 12.2M]
  ------------------
  991|  25.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  25.8k|#  define MINBPC(enc) 1
  ------------------
  992|  25.8k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 10.4k, False: 15.3k]
  ------------------
  993|  10.4k|        break;
  994|  15.3k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  15.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  15.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  15.3k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 8, False: 15.3k]
  ------------------
  995|      8|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      8|#define XML_TOK_LITERAL 27
  ------------------
  996|  15.3k|      *nextTokPtr = ptr;
  997|  15.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  15.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  4.69k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 4.69k, False: 10.6k]
  ------------------
  999|  6.26k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.57k, False: 13.7k]
  ------------------
 1000|  8.25k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.98k, False: 13.3k]
  ------------------
 1001|  15.2k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 7.01k, False: 8.32k]
  ------------------
 1002|  15.2k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 15, False: 15.3k]
  ------------------
 1003|  15.3k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 39, False: 15.3k]
  ------------------
 1004|  15.3k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  15.3k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     13|      default:
  ------------------
  |  Branch (1005:7): [True: 13, False: 15.3k]
  ------------------
 1006|     13|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1007|  15.3k|      }
 1008|  12.2M|    default:
  ------------------
  |  Branch (1008:5): [True: 12.2M, False: 28.7k]
  ------------------
 1009|  12.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.2M|#  define MINBPC(enc) 1
  ------------------
 1010|  12.2M|      break;
 1011|  12.2M|    }
 1012|  12.2M|  }
 1013|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  15.4k|}
xmltok.c:normal_scanDecl:
  183|  22.1k|                 const char **nextTokPtr) {
  184|  22.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  22.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  22.1k|    {                                                                          \
  |  |  |  |  135|  22.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  22.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  22.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 22.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  22.1k|    }
  |  |  ------------------
  ------------------
  185|  22.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  22.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    810|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 810, False: 21.3k]
  ------------------
  187|    810|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    810|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    810|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 22.1k]
  ------------------
  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|    871|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 871, False: 21.2k]
  ------------------
  192|  21.3k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 20.4k, False: 1.68k]
  ------------------
  193|  21.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
  194|  21.3k|    break;
  195|      3|  default:
  ------------------
  |  Branch (195:3): [True: 3, False: 22.1k]
  ------------------
  196|      3|    *nextTokPtr = ptr;
  197|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  198|  22.1k|  }
  199|   142k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   142k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   142k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   142k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     10|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 10, False: 142k]
  ------------------
  202|     10|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     10|    {                                                                          \
  |  |  135|     10|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     10|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     10|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 8]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     10|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      8|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      8|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      8|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 3, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      2|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 2, False: 6]
  ------------------
  206|      3|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 7]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 7]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 7]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|      8|      }
  212|       |      /* fall through */
  213|  8.54k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 8.53k, False: 134k]
  ------------------
  214|  16.2k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 7.75k, False: 134k]
  ------------------
  215|  21.2k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 4.96k, False: 137k]
  ------------------
  216|  21.2k|      *nextTokPtr = ptr;
  217|  21.2k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  21.2k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   106k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 106k, False: 35.8k]
  ------------------
  219|   121k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 14.6k, False: 128k]
  ------------------
  220|   121k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   121k|#  define MINBPC(enc) 1
  ------------------
  221|   121k|      break;
  222|     25|    default:
  ------------------
  |  Branch (222:5): [True: 25, False: 142k]
  ------------------
  223|     25|      *nextTokPtr = ptr;
  224|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  225|   142k|    }
  226|   142k|  }
  227|     35|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  21.3k|}
xmltok.c:normal_scanComment:
  146|  1.82k|                    const char **nextTokPtr) {
  147|  1.82k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.82k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.82k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.81k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.81k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.81k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 12, False: 1.80k]
  ------------------
  149|     12|      *nextTokPtr = ptr;
  150|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  151|     12|    }
  152|  1.80k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.80k|#  define MINBPC(enc) 1
  ------------------
  153|  1.30M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  1.30M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.30M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.30M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  2.52M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  19.9k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  19.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 19.9k, False: 1.28M]
  |  |  |  |  ------------------
  |  |  |  |   50|  19.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 19.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  19.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  19.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  19.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  19.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 19.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|  19.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  19.9k|    break;
  |  |  ------------------
  |  |   61|  1.22M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.22M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.22M, False: 75.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.22M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 1.22M]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.22M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.22M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.22M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.22M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.22M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  1.22M|    ptr += n;                                                                  \
  |  |  |  |   57|  1.22M|    break;
  |  |  ------------------
  |  |   62|  1.22M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  17.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 17.8k, False: 1.28M]
  |  |  |  |  ------------------
  |  |  |  |   50|  17.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 17.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  17.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  17.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  17.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  17.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 17.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  17.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  17.7k|    break;
  |  |  ------------------
  |  |   63|  17.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 3, False: 1.30M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 4, False: 1.30M]
  |  |  ------------------
  |  |   65|     11|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 1.30M]
  |  |  ------------------
  |  |   66|     11|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.44k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.44k, False: 1.29M]
  ------------------
  157|  2.44k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.44k|#  define MINBPC(enc) 1
  ------------------
  158|  2.44k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.44k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.44k|    {                                                                          \
  |  |  |  |  135|  2.44k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.44k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.44k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.44k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.44k|    }
  |  |  ------------------
  ------------------
  159|  2.44k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.44k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.68k, False: 765]
  |  |  ------------------
  ------------------
  160|  1.68k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.68k|#  define MINBPC(enc) 1
  ------------------
  161|  1.68k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.68k|    {                                                                          \
  |  |  |  |  135|  1.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.68k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.68k|    }
  |  |  ------------------
  ------------------
  162|  1.68k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.68k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 32, False: 1.64k]
  ------------------
  163|     32|            *nextTokPtr = ptr;
  164|     32|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  165|     32|          }
  166|  1.64k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.64k|#  define MINBPC(enc) 1
  ------------------
  167|  1.64k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.64k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.68k|        }
  169|    765|        break;
  170|  35.4k|      default:
  ------------------
  |  Branch (170:7): [True: 35.4k, False: 1.26M]
  ------------------
  171|  35.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  35.4k|#  define MINBPC(enc) 1
  ------------------
  172|  35.4k|        break;
  173|  1.30M|      }
  174|  1.30M|    }
  175|  1.80k|  }
  176|     97|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     97|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.82k|}
xmltok.c:normal_scanPi:
  277|  6.77k|               const char **nextTokPtr) {
  278|  6.77k|  int tok;
  279|  6.77k|  const char *target = ptr;
  280|  6.77k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.77k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.77k|    {                                                                          \
  |  |  |  |  135|  6.77k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.77k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.77k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 6.76k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  6.77k|    }
  |  |  ------------------
  ------------------
  281|  6.76k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.76k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  7.19k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.94k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.76k]
  |  |  ------------------
  |  |  111|  5.94k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  5.94k|    /* fall through */                                                         \
  |  |  116|  5.94k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.56k, False: 1.20k]
  |  |  ------------------
  |  |  117|  5.94k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 385, False: 6.38k]
  |  |  ------------------
  |  |  118|  5.94k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.94k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.94k|    break;                                                                     \
  |  |  120|  5.94k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    390|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 396, False: 6.37k]
  |  |  |  |  ------------------
  |  |  |  |  100|    396|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 395]
  |  |  |  |  ------------------
  |  |  |  |  101|    390|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    395|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    790|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    395|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 392]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    392|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    392|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 390]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    395|    ptr += n;                                                                  \
  |  |  |  |  107|    390|    break;
  |  |  ------------------
  |  |  121|    408|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    398|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 408, False: 6.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|    408|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 406]
  |  |  |  |  ------------------
  |  |  |  |  101|    398|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    406|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    812|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    406|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 401]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    401|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    401|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 398]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    406|    ptr += n;                                                                  \
  |  |  |  |  107|    398|    break;
  |  |  ------------------
  |  |  122|    398|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 6.75k]
  |  |  |  |  ------------------
  |  |  |  |  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: 9, 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|     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;
  |  |  ------------------
  ------------------
  283|      2|  default:
  ------------------
  |  Branch (283:3): [True: 2, False: 6.76k]
  ------------------
  284|      2|    *nextTokPtr = ptr;
  285|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  286|  6.76k|  }
  287|  52.2k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  52.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  52.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  52.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|   132k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  39.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 52.2k]
  |  |  ------------------
  |  |   82|  39.6k|    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|  39.6k|    /* fall through */                                                         \
  |  |   87|  39.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.46k, False: 47.7k]
  |  |  ------------------
  |  |   88|  37.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 32.8k, False: 19.3k]
  |  |  ------------------
  |  |   89|  39.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.80k, False: 50.4k]
  |  |  ------------------
  |  |   90|  39.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 52.0k]
  |  |  ------------------
  |  |   91|  39.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 244, False: 51.9k]
  |  |  ------------------
  |  |   92|  39.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  39.6k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  39.6k|    break;                                                                     \
  |  |   94|  39.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    289|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 304, False: 51.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|    304|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 303]
  |  |  |  |  ------------------
  |  |  |  |   72|    289|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    303|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    606|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    303|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 294]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    294|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    294|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 289]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    303|    ptr += n;                                                                  \
  |  |  |  |   78|    289|    break;
  |  |  ------------------
  |  |   95|  5.68k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  5.64k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5.68k, False: 46.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|  5.68k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 5.67k]
  |  |  |  |  ------------------
  |  |  |  |   72|  5.64k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  5.67k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.67k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.67k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  5.67k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.67k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 32, False: 5.64k]
  |  |  |  |  ------------------
  |  |  |  |   74|     37|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     37|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     37|    }                                                                          \
  |  |  |  |   77|  5.67k|    ptr += n;                                                                  \
  |  |  |  |   78|  5.64k|    break;
  |  |  ------------------
  |  |   96|  5.64k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 52.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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: 12, 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|     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;
  |  |  ------------------
  ------------------
  290|  1.71k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.71k, False: 50.5k]
  ------------------
  291|  2.18k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 476, False: 51.7k]
  ------------------
  292|  2.74k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 554, False: 51.6k]
  ------------------
  293|  2.74k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.74k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.73k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.73k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.73k|#  define MINBPC(enc) 1
  ------------------
  298|  2.18M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  2.18M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.18M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.18M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  4.20M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  34.6k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  34.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 34.6k, False: 2.14M]
  |  |  |  |  ------------------
  |  |  |  |   50|  34.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 34.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  34.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  34.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  34.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  34.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 34.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|  34.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  34.6k|    break;
  |  |  ------------------
  |  |   61|  2.05M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.05M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.05M, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.05M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.05M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.05M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.05M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.05M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.05M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 2.05M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  2.05M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.05M|    break;
  |  |  ------------------
  |  |   62|  2.05M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.4k, False: 2.17M]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 11.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  11.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 11.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  11.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  11.4k|    break;
  |  |  ------------------
  |  |   63|  11.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 2.18M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 2.18M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 2.18M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.49k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.49k, False: 2.17M]
  ------------------
  302|  3.49k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.49k|#  define MINBPC(enc) 1
  ------------------
  303|  3.49k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.49k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.49k|    {                                                                          \
  |  |  |  |  135|  3.49k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.49k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.49k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 3.49k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  3.49k|    }
  |  |  ------------------
  ------------------
  304|  3.49k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.49k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.57k, False: 917]
  |  |  ------------------
  ------------------
  305|  2.57k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.57k|#  define MINBPC(enc) 1
  ------------------
  306|  2.57k|            return tok;
  307|  2.57k|          }
  308|    917|          break;
  309|  76.1k|        default:
  ------------------
  |  Branch (309:9): [True: 76.1k, False: 2.10M]
  ------------------
  310|  76.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  76.1k|#  define MINBPC(enc) 1
  ------------------
  311|  76.1k|          break;
  312|  2.18M|        }
  313|  2.18M|      }
  314|    119|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    119|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.84k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.84k, False: 48.3k]
  ------------------
  316|  3.84k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.84k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.84k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.84k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.84k|#  define MINBPC(enc) 1
  ------------------
  321|  3.84k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.84k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.84k|    {                                                                          \
  |  |  |  |  135|  3.84k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.84k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 3.80k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  3.84k|    }
  |  |  ------------------
  ------------------
  322|  3.80k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.80k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.79k, False: 16]
  |  |  ------------------
  ------------------
  323|  3.79k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.79k|#  define MINBPC(enc) 1
  ------------------
  324|  3.79k|        return tok;
  325|  3.79k|      }
  326|       |      /* fall through */
  327|     25|    default:
  ------------------
  |  Branch (327:5): [True: 9, False: 52.2k]
  ------------------
  328|     25|      *nextTokPtr = ptr;
  329|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  330|  52.2k|    }
  331|  52.2k|  }
  332|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.73k|}
xmltok.c:normal_checkPiTarget:
  232|  6.58k|                      int *tokPtr) {
  233|  6.58k|  int upper = 0;
  234|  6.58k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.58k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  6.58k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  6.58k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  6.58k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  6.58k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 4.15k, False: 2.43k]
  ------------------
  237|  4.15k|    return 1;
  238|  2.43k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.43k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    991|  case ASCII_x:
  ------------------
  |  |   86|    991|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 991, False: 1.44k]
  ------------------
  240|    991|    break;
  241|    794|  case ASCII_X:
  ------------------
  |  |   59|    794|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 794, False: 1.63k]
  ------------------
  242|    794|    upper = 1;
  243|    794|    break;
  244|    646|  default:
  ------------------
  |  Branch (244:3): [True: 646, False: 1.78k]
  ------------------
  245|    646|    return 1;
  246|  2.43k|  }
  247|  1.78k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.78k|#  define MINBPC(enc) 1
  ------------------
  248|  1.78k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.78k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    709|  case ASCII_m:
  ------------------
  |  |   75|    709|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 709, False: 1.07k]
  ------------------
  250|    709|    break;
  251|    405|  case ASCII_M:
  ------------------
  |  |   48|    405|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 405, False: 1.38k]
  ------------------
  252|    405|    upper = 1;
  253|    405|    break;
  254|    671|  default:
  ------------------
  |  Branch (254:3): [True: 671, False: 1.11k]
  ------------------
  255|    671|    return 1;
  256|  1.78k|  }
  257|  1.11k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.11k|#  define MINBPC(enc) 1
  ------------------
  258|  1.11k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.11k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    277|  case ASCII_l:
  ------------------
  |  |   74|    277|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 277, False: 837]
  ------------------
  260|    277|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.11k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|    835|  default:
  ------------------
  |  Branch (264:3): [True: 835, False: 279]
  ------------------
  265|    835|    return 1;
  266|  1.11k|  }
  267|    279|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 275]
  ------------------
  268|      4|    return 0;
  269|    275|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    275|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    275|  return 1;
  271|    279|}
xmltok.c:normal_scanPercent:
  924|  3.93k|                    const char **nextTokPtr) {
  925|  3.93k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.93k|    {                                                                          \
  |  |  |  |  135|  3.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.93k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 24, False: 3.91k]
  |  |  |  |  ------------------
  |  |  |  |  136|     24|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     24|      }                                                                        \
  |  |  |  |  138|  3.93k|    }
  |  |  ------------------
  ------------------
  926|  3.91k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.91k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.67k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.56k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.91k]
  |  |  ------------------
  |  |  111|  1.56k|    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.56k|    /* fall through */                                                         \
  |  |  116|  1.56k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 808, False: 3.10k]
  |  |  ------------------
  |  |  117|  1.56k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 754, False: 3.16k]
  |  |  ------------------
  |  |  118|  1.56k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.56k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.56k|    break;                                                                     \
  |  |  120|  1.56k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    196|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 219, False: 3.69k]
  |  |  |  |  ------------------
  |  |  |  |  100|    219|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 217]
  |  |  |  |  ------------------
  |  |  |  |  101|    196|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    217|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    434|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    217|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 19, False: 198]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    198|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    198|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 196]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|    217|    ptr += n;                                                                  \
  |  |  |  |  107|    196|    break;
  |  |  ------------------
  |  |  121|    205|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    201|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 205, False: 3.71k]
  |  |  |  |  ------------------
  |  |  |  |  100|    205|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 204]
  |  |  |  |  ------------------
  |  |  |  |  101|    201|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    204|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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: 2, False: 202]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    202|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    202|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 201]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    204|    ptr += n;                                                                  \
  |  |  |  |  107|    201|    break;
  |  |  ------------------
  |  |  122|    201|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 3.90k]
  |  |  |  |  ------------------
  |  |  |  |  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: 9, 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|     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;
  |  |  ------------------
  ------------------
  928|    482|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 482, False: 3.43k]
  ------------------
  929|    725|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 243, False: 3.67k]
  ------------------
  930|  1.90k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 1.18k, False: 2.73k]
  ------------------
  931|  1.91k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 6, False: 3.90k]
  ------------------
  932|  1.91k|    *nextTokPtr = ptr;
  933|  1.91k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.91k|#define XML_TOK_PERCENT 22
  ------------------
  934|      1|  default:
  ------------------
  |  Branch (934:3): [True: 1, False: 3.91k]
  ------------------
  935|      1|    *nextTokPtr = ptr;
  936|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  937|  3.91k|  }
  938|  4.53k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.53k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.53k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  6.86k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.18k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.53k]
  |  |  ------------------
  |  |   82|  2.18k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.18k|    /* fall through */                                                         \
  |  |   87|  2.18k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 944, False: 3.59k]
  |  |  ------------------
  |  |   88|  1.38k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 438, False: 4.09k]
  |  |  ------------------
  |  |   89|  1.60k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 222, False: 4.31k]
  |  |  ------------------
  |  |   90|  1.89k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 288, False: 4.24k]
  |  |  ------------------
  |  |   91|  2.18k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 292, False: 4.24k]
  |  |  ------------------
  |  |   92|  2.18k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.18k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.18k|    break;                                                                     \
  |  |   94|  2.18k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    284|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 301, False: 4.23k]
  |  |  |  |  ------------------
  |  |  |  |   71|    301|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 299]
  |  |  |  |  ------------------
  |  |  |  |   72|    284|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    299|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    598|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    299|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 285]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    285|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    285|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 284]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|    299|    ptr += n;                                                                  \
  |  |  |  |   78|    284|    break;
  |  |  ------------------
  |  |   95|    284|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    197|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 211, False: 4.32k]
  |  |  |  |  ------------------
  |  |  |  |   71|    211|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 210]
  |  |  |  |  ------------------
  |  |  |  |   72|    197|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    210|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    420|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    210|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 199]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    199|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    199|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 197]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    210|    ptr += n;                                                                  \
  |  |  |  |   78|    197|    break;
  |  |  ------------------
  |  |   96|    197|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 4.52k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#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: 9, 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|     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;
  |  |  ------------------
  ------------------
  941|  1.81k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.81k, False: 2.72k]
  ------------------
  942|  1.81k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.81k|#  define MINBPC(enc) 1
  ------------------
  943|  1.81k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.81k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     13|    default:
  ------------------
  |  Branch (944:5): [True: 13, False: 4.52k]
  ------------------
  945|     13|      *nextTokPtr = ptr;
  946|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  947|  4.53k|    }
  948|  4.53k|  }
  949|     88|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     88|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.95k|}
xmltok.c:normal_scanPoundName:
  954|  32.5k|                      const char **nextTokPtr) {
  955|  32.5k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  32.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  32.5k|    {                                                                          \
  |  |  |  |  135|  32.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  32.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  32.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  32.5k|    }
  |  |  ------------------
  ------------------
  956|  32.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  32.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  32.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  32.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  32.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 32.5k]
  |  |  ------------------
  |  |  111|  32.5k|    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|  32.5k|    /* fall through */                                                         \
  |  |  116|  32.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 32.0k, False: 515]
  |  |  ------------------
  |  |  117|  32.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 463, False: 32.0k]
  |  |  ------------------
  |  |  118|  32.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  32.5k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  32.5k|    break;                                                                     \
  |  |  120|  32.5k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      8|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 22]
  |  |  |  |  ------------------
  |  |  |  |  101|      8|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     44|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     13|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     22|    ptr += n;                                                                  \
  |  |  |  |  107|      8|    break;
  |  |  ------------------
  |  |  121|      9|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      1|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     14|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      7|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, 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: 3, False: 1]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      1|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, 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|     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;
  |  |  ------------------
  ------------------
  958|      1|  default:
  ------------------
  |  Branch (958:3): [True: 1, False: 32.5k]
  ------------------
  959|      1|    *nextTokPtr = ptr;
  960|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  961|  32.5k|  }
  962|   228k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   228k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   228k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   228k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   711k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   195k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 228k]
  |  |  ------------------
  |  |   82|   195k|    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|   195k|    /* fall through */                                                         \
  |  |   87|   195k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 125k, False: 102k]
  |  |  ------------------
  |  |   88|   194k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 68.8k, False: 159k]
  |  |  ------------------
  |  |   89|   194k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 218, False: 228k]
  |  |  ------------------
  |  |   90|   195k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 228k]
  |  |  ------------------
  |  |   91|   195k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 247, False: 228k]
  |  |  ------------------
  |  |   92|   195k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   195k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   195k|    break;                                                                     \
  |  |   94|   195k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    255|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 273, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |   71|    273|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 271]
  |  |  |  |  ------------------
  |  |  |  |   72|    255|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    271|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    542|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    271|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 256]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    256|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    256|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 255]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|    271|    ptr += n;                                                                  \
  |  |  |  |   78|    255|    break;
  |  |  ------------------
  |  |   95|    261|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    234|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 261, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |   71|    261|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 259]
  |  |  |  |  ------------------
  |  |  |  |   72|    234|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    259|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    518|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    259|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 21, False: 238]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    238|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    238|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 234]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|    259|    ptr += n;                                                                  \
  |  |  |  |   78|    234|    break;
  |  |  ------------------
  |  |   96|    234|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     36|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     18|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  28.9k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 28.9k, False: 199k]
  ------------------
  966|  30.8k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 1.81k, False: 226k]
  ------------------
  967|  31.2k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 476, False: 227k]
  ------------------
  968|  31.8k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 573, False: 227k]
  ------------------
  969|  32.1k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 247, False: 228k]
  ------------------
  970|  32.1k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 228k]
  ------------------
  971|  32.3k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 245, False: 228k]
  ------------------
  972|  32.3k|      *nextTokPtr = ptr;
  973|  32.3k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  32.3k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     28|    default:
  ------------------
  |  Branch (974:5): [True: 28, False: 228k]
  ------------------
  975|     28|      *nextTokPtr = ptr;
  976|     28|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  977|   228k|    }
  978|   228k|  }
  979|     73|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     73|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  32.5k|}
xmltok.c:normal_contentTok:
  824|  10.6M|                   const char **nextTokPtr) {
  825|  10.6M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 177k, False: 10.4M]
  ------------------
  826|   177k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   177k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  10.4M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  10.4M|#  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|  10.4M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.4M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.41M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.41M, False: 8.01M]
  ------------------
  838|  2.41M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.41M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.41M|#  define MINBPC(enc) 1
  ------------------
  839|   207k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 207k, False: 10.2M]
  ------------------
  840|   207k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   207k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   207k|#  define MINBPC(enc) 1
  ------------------
  841|  2.01k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 2.01k, False: 10.4M]
  ------------------
  842|  2.01k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.01k|#  define MINBPC(enc) 1
  ------------------
  843|  2.01k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.01k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.01k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 20, False: 1.99k]
  ------------------
  844|     20|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     20|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  1.99k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.99k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 218, False: 1.77k]
  ------------------
  846|    218|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    218|#  define MINBPC(enc) 1
  ------------------
  847|  1.99k|    *nextTokPtr = ptr;
  848|  1.99k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.99k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  6.67M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 6.67M, False: 3.75M]
  ------------------
  850|  6.67M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.67M|#  define MINBPC(enc) 1
  ------------------
  851|  6.67M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.67M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  12.7k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 12.7k, False: 10.4M]
  ------------------
  853|  12.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.7k|#  define MINBPC(enc) 1
  ------------------
  854|  12.7k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  12.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  12.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  12.7k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 2.83k, False: 9.88k]
  ------------------
  855|  2.83k|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|  2.83k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  9.88k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  9.88k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 4.18k, False: 5.69k]
  ------------------
  857|  4.18k|      break;
  858|  5.69k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.69k|#  define MINBPC(enc) 1
  ------------------
  859|  5.69k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  5.69k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 202, False: 5.49k]
  ------------------
  860|    202|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    202|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  5.49k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.49k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 5.49k, False: 1]
  ------------------
  862|  5.49k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  5.49k|#  define MINBPC(enc) 1
  ------------------
  863|  5.49k|      break;
  864|  5.49k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|   141k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  29.9k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  29.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 29.9k, False: 10.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|  29.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 8, False: 29.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  29.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      8|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  29.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  29.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  29.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 29.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  29.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  29.9k|    break;
  |  |  ------------------
  |  |   61|  29.9k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.83k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.85k, False: 10.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.85k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 8.85k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.83k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.85k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.85k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  8.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 8.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     14|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     14|    }                                                                          \
  |  |  |  |   56|  8.85k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.83k|    break;
  |  |  ------------------
  |  |   62|  31.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  31.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 31.8k, False: 10.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|  31.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 6, False: 31.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  31.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  31.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  31.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  31.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 27, False: 31.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     27|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     27|    }                                                                          \
  |  |  |  |   56|  31.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  31.7k|    break;
  |  |  ------------------
  |  |   63|  31.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 30, False: 10.4M]
  |  |  ------------------
  |  |   64|     41|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 11, False: 10.4M]
  |  |  ------------------
  |  |   65|     56|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 15, False: 10.4M]
  |  |  ------------------
  |  |   66|     56|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     56|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     56|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  1.05M|  default:
  ------------------
  |  Branch (868:3): [True: 1.05M, False: 9.37M]
  ------------------
  869|  1.05M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.05M|#  define MINBPC(enc) 1
  ------------------
  870|  1.05M|    break;
  871|  10.4M|  }
  872|  60.5M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  60.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  60.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  60.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|  95.4k|      LEAD_CASE(2)
  ------------------
  |  |  875|  95.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 95.4k, False: 60.4M]
  |  |  ------------------
  |  |  876|  95.4k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  95.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  95.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 95.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 5, False: 95.4k]
  |  |  ------------------
  |  |  877|     14|      *nextTokPtr = ptr;                                                       \
  |  |  878|     14|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     14|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     14|    }                                                                          \
  |  |  880|  95.4k|    ptr += n;                                                                  \
  |  |  881|  95.4k|    break;
  ------------------
  883|  7.79M|      LEAD_CASE(3)
  ------------------
  |  |  875|  7.79M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 7.79M, False: 52.7M]
  |  |  ------------------
  |  |  876|  7.79M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  7.79M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.79M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 8, False: 7.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 7.79M]
  |  |  ------------------
  |  |  877|     11|      *nextTokPtr = ptr;                                                       \
  |  |  878|     11|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     11|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     11|    }                                                                          \
  |  |  880|  7.79M|    ptr += n;                                                                  \
  |  |  881|  7.79M|    break;
  ------------------
  884|  64.0k|      LEAD_CASE(4)
  ------------------
  |  |  875|  64.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 64.0k, False: 60.4M]
  |  |  ------------------
  |  |  876|  64.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  64.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  64.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 25, False: 64.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 64.0k]
  |  |  ------------------
  |  |  877|     28|      *nextTokPtr = ptr;                                                       \
  |  |  878|     28|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     28|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     28|    }                                                                          \
  |  |  880|  64.0k|    ptr += n;                                                                  \
  |  |  881|  64.0k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  43.8k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 43.8k, False: 60.4M]
  ------------------
  887|  43.8k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  43.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  43.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 43.4k, False: 348]
  |  |  ------------------
  ------------------
  888|  43.4k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  43.4k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 38.4k, False: 5.02k]
  ------------------
  889|  38.4k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  38.4k|#  define MINBPC(enc) 1
  ------------------
  890|  38.4k|          break;
  891|  38.4k|        }
  892|  5.02k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  5.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  5.02k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 4.82k, False: 201]
  |  |  ------------------
  ------------------
  893|  4.82k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  4.82k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 4.81k, False: 14]
  ------------------
  894|  4.81k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.81k|#  define MINBPC(enc) 1
  ------------------
  895|  4.81k|            break;
  896|  4.81k|          }
  897|     14|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|     14|#  define MINBPC(enc) 1
  ------------------
  898|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  899|  4.82k|        }
  900|  5.02k|      }
  901|       |      /* fall through */
  902|  47.1k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 46.5k, False: 60.4M]
  ------------------
  903|   231k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 184k, False: 60.3M]
  ------------------
  904|   231k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 19, False: 60.5M]
  ------------------
  905|   231k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 7, False: 60.5M]
  ------------------
  906|   231k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 60.5M]
  ------------------
  907|   232k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 1.09k, False: 60.5M]
  ------------------
  908|  1.02M|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 788k, False: 59.7M]
  ------------------
  909|  1.02M|      *nextTokPtr = ptr;
  910|  1.02M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.02M|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  51.4M|    default:
  ------------------
  |  Branch (911:5): [True: 51.4M, False: 9.02M]
  ------------------
  912|  51.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  51.4M|#  define MINBPC(enc) 1
  ------------------
  913|  51.4M|      break;
  914|  60.5M|    }
  915|  60.5M|  }
  916|   109k|  *nextTokPtr = ptr;
  917|   109k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   109k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  1.13M|}
xmltok.c:normal_scanLt:
  726|  2.41M|               const char **nextTokPtr) {
  727|  2.41M|#  ifdef XML_NS
  728|  2.41M|  int hadColon;
  729|  2.41M|#  endif
  730|  2.41M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.41M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.41M|    {                                                                          \
  |  |  |  |  135|  2.41M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.41M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.41M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 29, False: 2.41M]
  |  |  |  |  ------------------
  |  |  |  |  136|     29|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     29|      }                                                                        \
  |  |  |  |  138|  2.41M|    }
  |  |  ------------------
  ------------------
  731|  2.41M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.41M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.41M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  2.36M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.39M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.41M]
  |  |  ------------------
  |  |  111|  2.39M|    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.39M|    /* fall through */                                                         \
  |  |  116|  2.39M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.35M, False: 58.4k]
  |  |  ------------------
  |  |  117|  2.39M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 37.7k, False: 2.37M]
  |  |  ------------------
  |  |  118|  2.39M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.39M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.39M|    break;                                                                     \
  |  |  120|  2.39M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  2.14k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 2.16k, False: 2.41M]
  |  |  |  |  ------------------
  |  |  |  |  100|  2.16k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 2.15k]
  |  |  |  |  ------------------
  |  |  |  |  101|  2.14k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  2.15k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.31k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.15k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 2.15k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  2.15k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.15k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 2.14k]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|  2.15k|    ptr += n;                                                                  \
  |  |  |  |  107|  2.14k|    break;
  |  |  ------------------
  |  |  121|  2.14k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.15k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.17k, False: 2.41M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.17k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 1.17k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.15k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.17k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.35k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.17k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.17k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.17k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 14, False: 1.15k]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|  1.17k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.15k|    break;
  |  |  ------------------
  |  |  122|  1.15k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 2.41M]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 1, 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|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  2.64k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 2.64k, False: 2.40M]
  ------------------
  734|  2.64k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.64k|#  define MINBPC(enc) 1
  ------------------
  735|  2.64k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.64k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.64k|    {                                                                          \
  |  |  |  |  135|  2.64k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.64k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.64k|    }
  |  |  ------------------
  ------------------
  736|  2.64k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.64k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.64k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 12, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|  1.01k|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 1.01k, False: 1.62k]
  ------------------
  738|  1.01k|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.01k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.01k|#  define MINBPC(enc) 1
  ------------------
  739|  1.61k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.61k, False: 1.03k]
  ------------------
  740|  1.61k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.61k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.61k|#  define MINBPC(enc) 1
  ------------------
  741|  2.64k|    }
  742|     12|    *nextTokPtr = ptr;
  743|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  744|  3.33k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.33k, False: 2.40M]
  ------------------
  745|  3.33k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.33k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.33k|#  define MINBPC(enc) 1
  ------------------
  746|  11.3k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 11.3k, False: 2.40M]
  ------------------
  747|  11.3k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.3k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.3k|#  define MINBPC(enc) 1
  ------------------
  748|     23|  default:
  ------------------
  |  Branch (748:3): [True: 23, False: 2.41M]
  ------------------
  749|     23|    *nextTokPtr = ptr;
  750|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  751|  2.41M|  }
  752|  2.39M|#  ifdef XML_NS
  753|  2.39M|  hadColon = 0;
  754|  2.39M|#  endif
  755|       |  /* we have a start-tag */
  756|  2.61M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  2.61M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.61M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.61M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   714k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   177k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.61M]
  |  |  ------------------
  |  |   82|   177k|    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|   177k|    /* fall through */                                                         \
  |  |   87|   177k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 99.7k, False: 2.51M]
  |  |  ------------------
  |  |   88|   170k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 70.8k, False: 2.54M]
  |  |  ------------------
  |  |   89|   174k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 4.03k, False: 2.61M]
  |  |  ------------------
  |  |   90|   175k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.30k, False: 2.61M]
  |  |  ------------------
  |  |   91|   177k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.72k, False: 2.61M]
  |  |  ------------------
  |  |   92|   177k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   177k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   177k|    break;                                                                     \
  |  |   94|   177k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  15.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 15.2k, False: 2.60M]
  |  |  |  |  ------------------
  |  |  |  |   71|  15.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 15.2k]
  |  |  |  |  ------------------
  |  |  |  |   72|  15.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  15.2k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  30.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  15.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 15.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  15.2k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  15.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 15.2k]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|  15.2k|    ptr += n;                                                                  \
  |  |  |  |   78|  15.2k|    break;
  |  |  ------------------
  |  |   95|  31.6k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  31.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 31.6k, False: 2.58M]
  |  |  |  |  ------------------
  |  |  |  |   71|  31.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 31.6k]
  |  |  |  |  ------------------
  |  |  |  |   72|  31.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  31.6k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  63.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  31.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 31.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  31.6k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  31.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 35, False: 31.6k]
  |  |  |  |  ------------------
  |  |  |  |   74|     41|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     41|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     41|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     41|    }                                                                          \
  |  |  |  |   77|  31.6k|    ptr += n;                                                                  \
  |  |  |  |   78|  31.6k|    break;
  |  |  ------------------
  |  |   96|  31.6k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 2.61M]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 2.61M]
  ------------------
  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|  42.0k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 42.0k, False: 2.57M]
  ------------------
  777|  42.5k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 585, False: 2.61M]
  ------------------
  778|  44.4k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.86k, False: 2.61M]
  ------------------
  779|  44.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  44.4k|#  define MINBPC(enc) 1
  ------------------
  780|  45.7k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  45.7k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  45.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  45.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  36.4k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  41.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 45.7k]
  |  |  ------------------
  |  |  111|  41.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|  41.0k|    /* fall through */                                                         \
  |  |  116|  41.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 33.9k, False: 11.7k]
  |  |  ------------------
  |  |  117|  41.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 7.09k, False: 38.6k]
  |  |  ------------------
  |  |  118|  41.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  41.0k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  41.0k|    break;                                                                     \
  |  |  120|  41.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    394|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 410, False: 45.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    410|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 409]
  |  |  |  |  ------------------
  |  |  |  |  101|    394|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    409|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    818|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    409|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 398]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    398|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    398|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 394]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|    409|    ptr += n;                                                                  \
  |  |  |  |  107|    394|    break;
  |  |  ------------------
  |  |  121|    800|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    785|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 800, False: 44.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    800|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 798]
  |  |  |  |  ------------------
  |  |  |  |  101|    785|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    798|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.59k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    798|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 788]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    788|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    788|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 785]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|    798|    ptr += n;                                                                  \
  |  |  |  |  107|    785|    break;
  |  |  ------------------
  |  |  122|    785|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 45.7k]
  |  |  |  |  ------------------
  |  |  |  |  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: 10, 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|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.30k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.30k, False: 44.4k]
  ------------------
  784|  1.30k|          goto gt;
  785|    803|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 803, False: 44.9k]
  ------------------
  786|    803|          goto sol;
  787|    362|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 362, False: 45.3k]
  ------------------
  788|    796|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 434, False: 45.2k]
  ------------------
  789|  1.31k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 520, False: 45.2k]
  ------------------
  790|  1.31k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.31k|#  define MINBPC(enc) 1
  ------------------
  791|  1.31k|          continue;
  792|     18|        default:
  ------------------
  |  Branch (792:9): [True: 18, False: 45.7k]
  ------------------
  793|     18|          *nextTokPtr = ptr;
  794|     18|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  795|  45.7k|        }
  796|  42.2k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  42.2k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  45.7k|      }
  798|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  44.4k|    }
  800|  2.34M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.34M, False: 271k]
  ------------------
  801|  2.34M|    gt:
  802|  2.34M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.34M|#  define MINBPC(enc) 1
  ------------------
  803|  2.34M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.34M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  2.29k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 2.29k, False: 2.61M]
  ------------------
  805|  3.09k|    sol:
  806|  3.09k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.09k|#  define MINBPC(enc) 1
  ------------------
  807|  3.09k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.09k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.09k|    {                                                                          \
  |  |  |  |  135|  3.09k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.09k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.09k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  3.09k|    }
  |  |  ------------------
  ------------------
  808|  3.08k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.08k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 18, False: 3.07k]
  ------------------
  809|     18|        *nextTokPtr = ptr;
  810|     18|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  811|     18|      }
  812|  3.07k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.07k|#  define MINBPC(enc) 1
  ------------------
  813|  3.07k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  3.07k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     27|    default:
  ------------------
  |  Branch (814:5): [True: 27, False: 2.61M]
  ------------------
  815|     27|      *nextTokPtr = ptr;
  816|     27|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  817|  2.61M|    }
  818|  2.61M|  }
  819|     94|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     94|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.39M|}
xmltok.c:normal_scanCdataSection:
  337|  1.61k|                         const char **nextTokPtr) {
  338|  1.61k|  static const char CDATA_LSQB[]
  339|  1.61k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.61k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.61k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.61k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.61k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.61k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.61k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.61k|  int i;
  341|  1.61k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.61k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.61k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.61k|    {                                                                          \
  |  |  135|  1.61k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.61k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.61k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.61k|    }
  ------------------
  344|  11.2k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  9.64k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 9.65k, False: 1.60k]
  ------------------
  345|  9.65k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  9.65k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 9, False: 9.64k]
  ------------------
  346|      9|      *nextTokPtr = ptr;
  347|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  348|      9|    }
  349|  9.65k|  }
  350|  1.60k|  *nextTokPtr = ptr;
  351|  1.60k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.60k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.61k|}
xmltok.c:normal_scanEndTag:
  432|  11.3k|                   const char **nextTokPtr) {
  433|  11.3k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.3k|    {                                                                          \
  |  |  |  |  135|  11.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  11.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 11.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  11.3k|    }
  |  |  ------------------
  ------------------
  434|  11.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  10.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 11.3k]
  |  |  ------------------
  |  |  111|  10.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  10.3k|    /* fall through */                                                         \
  |  |  116|  10.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 8.82k, False: 2.51k]
  |  |  ------------------
  |  |  117|  10.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.50k, False: 9.83k]
  |  |  ------------------
  |  |  118|  10.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  10.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  10.3k|    break;                                                                     \
  |  |  120|  10.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    577|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 587, False: 10.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|    587|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 586]
  |  |  |  |  ------------------
  |  |  |  |  101|    577|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    586|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.17k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    586|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 578]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    578|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    578|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 577]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    586|    ptr += n;                                                                  \
  |  |  |  |  107|    577|    break;
  |  |  ------------------
  |  |  121|    577|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    405|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 411, False: 10.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    411|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 410]
  |  |  |  |  ------------------
  |  |  |  |  101|    405|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    410|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    820|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    410|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 408]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    408|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    408|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 405]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    410|    ptr += n;                                                                  \
  |  |  |  |  107|    405|    break;
  |  |  ------------------
  |  |  122|    405|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 11.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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: 5, 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: 6, 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;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 11.3k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  11.3k|  }
  440|   869k|  while (HAS_CHAR(enc, ptr, end)) {
  441|   869k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   869k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   869k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  1.72M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.79k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 869k]
  |  |  ------------------
  |  |   82|  3.79k|    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|  3.79k|    /* fall through */                                                         \
  |  |   87|  3.79k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.00k, False: 867k]
  |  |  ------------------
  |  |   88|  2.93k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 930, False: 868k]
  |  |  ------------------
  |  |   89|  3.28k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 345, False: 869k]
  |  |  ------------------
  |  |   90|  3.50k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 227, False: 869k]
  |  |  ------------------
  |  |   91|  3.79k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 285, False: 869k]
  |  |  ------------------
  |  |   92|  3.79k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.79k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.79k|    break;                                                                     \
  |  |   94|  3.79k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    281|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 293, False: 869k]
  |  |  |  |  ------------------
  |  |  |  |   71|    293|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 292]
  |  |  |  |  ------------------
  |  |  |  |   72|    281|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    292|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    584|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    292|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 290]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    290|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    290|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 281]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    292|    ptr += n;                                                                  \
  |  |  |  |   78|    281|    break;
  |  |  ------------------
  |  |   95|   854k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   854k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 854k, False: 15.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|   854k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 854k]
  |  |  |  |  ------------------
  |  |  |  |   72|   854k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   854k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.70M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   854k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 854k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   854k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   854k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 56, False: 854k]
  |  |  |  |  ------------------
  |  |  |  |   74|     58|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     58|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     58|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     58|    }                                                                          \
  |  |  |  |   77|   854k|    ptr += n;                                                                  \
  |  |  |  |   78|   854k|    break;
  |  |  ------------------
  |  |   96|   854k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 869k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     14|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      7|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, 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|      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;
  |  |  ------------------
  ------------------
  443|    786|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 786, False: 868k]
  ------------------
  444|  1.00k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 215, False: 869k]
  ------------------
  445|  1.53k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 537, False: 868k]
  ------------------
  446|  2.17k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.53k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|    678|#  define MINBPC(enc) 1
  ------------------
  447|  2.17k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.17k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    214|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 214, False: 1.96k]
  ------------------
  449|    463|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 249, False: 1.92k]
  ------------------
  450|    678|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 215, False: 1.96k]
  ------------------
  451|    678|          break;
  452|  1.49k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.49k, False: 683]
  ------------------
  453|  1.49k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.49k|#  define MINBPC(enc) 1
  ------------------
  454|  1.49k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.49k|#define XML_TOK_END_TAG 5
  ------------------
  455|      5|        default:
  ------------------
  |  Branch (455:9): [True: 5, False: 2.17k]
  ------------------
  456|      5|          *nextTokPtr = ptr;
  457|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  458|  2.17k|        }
  459|  2.17k|      }
  460|     41|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#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: 869k]
  ------------------
  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.60k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 9.60k, False: 859k]
  ------------------
  469|  9.60k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  9.60k|#  define MINBPC(enc) 1
  ------------------
  470|  9.60k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  9.60k|#define XML_TOK_END_TAG 5
  ------------------
  471|      9|    default:
  ------------------
  |  Branch (471:5): [True: 9, False: 869k]
  ------------------
  472|      9|      *nextTokPtr = ptr;
  473|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  474|   869k|    }
  475|   869k|  }
  476|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  11.3k|}
xmltok.c:normal_scanAtts:
  573|  42.2k|                 const char **nextTokPtr) {
  574|  42.2k|#  ifdef XML_NS
  575|  42.2k|  int hadColon = 0;
  576|  42.2k|#  endif
  577|  3.65M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  3.65M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.65M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.65M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  5.90M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.80M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.65M]
  |  |  ------------------
  |  |   82|  1.80M|    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.80M|    /* fall through */                                                         \
  |  |   87|  1.80M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.25M, False: 2.39M]
  |  |  ------------------
  |  |   88|  1.45M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 198k, False: 3.45M]
  |  |  ------------------
  |  |   89|  1.52M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 66.9k, False: 3.58M]
  |  |  ------------------
  |  |   90|  1.52M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 545, False: 3.65M]
  |  |  ------------------
  |  |   91|  1.80M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 286k, False: 3.36M]
  |  |  ------------------
  |  |   92|  1.80M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.80M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.80M|    break;                                                                     \
  |  |   94|  1.80M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  37.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 37.8k, False: 3.61M]
  |  |  |  |  ------------------
  |  |  |  |   71|  37.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 37.8k]
  |  |  |  |  ------------------
  |  |  |  |   72|  37.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  37.8k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  75.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  37.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 37.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  37.8k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  37.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 37.8k]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|  37.8k|    ptr += n;                                                                  \
  |  |  |  |   78|  37.8k|    break;
  |  |  ------------------
  |  |   95|  37.8k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  36.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 36.5k, False: 3.61M]
  |  |  |  |  ------------------
  |  |  |  |   71|  36.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 36.5k]
  |  |  |  |  ------------------
  |  |  |  |   72|  36.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  36.5k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  73.1k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  36.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 36.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  36.5k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  36.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 36.5k]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|  36.5k|    ptr += n;                                                                  \
  |  |  |  |   78|  36.5k|    break;
  |  |  ------------------
  |  |   96|  36.5k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 3.65M]
  |  |  |  |  ------------------
  |  |  |  |   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: 11, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, 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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 3.65M]
  ------------------
  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|  15.2k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 15.2k, False: 3.63M]
  ------------------
  598|  16.0k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 793, False: 3.65M]
  ------------------
  599|  16.3k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 323, False: 3.65M]
  ------------------
  600|  17.1k|      for (;;) {
  601|  17.1k|        int t;
  602|       |
  603|  17.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  17.1k|#  define MINBPC(enc) 1
  ------------------
  604|  17.1k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.1k|    {                                                                          \
  |  |  |  |  135|  17.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  17.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 17.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|  17.1k|    }
  |  |  ------------------
  ------------------
  605|  17.0k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  17.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  17.0k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 16.3k, False: 741]
  ------------------
  607|  16.3k|          break;
  608|    741|        switch (t) {
  609|    259|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 259, False: 482]
  ------------------
  610|    469|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 210, False: 531]
  ------------------
  611|    732|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 263, False: 478]
  ------------------
  612|    732|          break;
  613|      9|        default:
  ------------------
  |  Branch (613:9): [True: 9, False: 732]
  ------------------
  614|      9|          *nextTokPtr = ptr;
  615|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  616|    741|        }
  617|    741|      }
  618|       |      /* fall through */
  619|  1.76M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 1.75M, False: 1.90M]
  ------------------
  620|  1.76M|      int open;
  621|  1.76M|#  ifdef XML_NS
  622|  1.76M|      hadColon = 0;
  623|  1.76M|#  endif
  624|  1.76M|      for (;;) {
  625|  1.76M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.76M|#  define MINBPC(enc) 1
  ------------------
  626|  1.76M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.76M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.76M|    {                                                                          \
  |  |  |  |  135|  1.76M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.76M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.76M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 1.76M]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  1.76M|    }
  |  |  ------------------
  ------------------
  627|  1.76M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  1.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  1.76M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 201k, False: 1.56M]
  |  Branch (628:32): [True: 1.56M, False: 866]
  ------------------
  629|  1.76M|          break;
  630|    866|        switch (open) {
  631|    256|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 256, False: 610]
  ------------------
  632|    622|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 366, False: 500]
  ------------------
  633|    849|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 227, False: 639]
  ------------------
  634|    849|          break;
  635|     17|        default:
  ------------------
  |  Branch (635:9): [True: 17, False: 849]
  ------------------
  636|     17|          *nextTokPtr = ptr;
  637|     17|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  638|    866|        }
  639|    866|      }
  640|  1.76M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.76M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  17.4M|      for (;;) {
  643|  17.4M|        int t;
  644|  17.4M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.4M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.4M|    {                                                                          \
  |  |  |  |  135|  17.4M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.4M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  17.4M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 93, False: 17.4M]
  |  |  |  |  ------------------
  |  |  |  |  136|     93|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     93|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     93|      }                                                                        \
  |  |  |  |  138|  17.4M|    }
  |  |  ------------------
  ------------------
  645|  17.4M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  17.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.4M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  17.4M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 1.76M, False: 15.6M]
  ------------------
  647|  1.76M|          break;
  648|  15.6M|        switch (t) {
  649|  14.0M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  7.76k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.75k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.76k, False: 15.6M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.76k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 7.76k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.75k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.76k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.76k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.76k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 7.75k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|  7.76k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.75k|    break;
  |  |  ------------------
  |  |   61|  6.99M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.99M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.99M, False: 8.66M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.99M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.99M]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.99M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.99M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.99M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.99M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 6.99M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  6.99M|    ptr += n;                                                                  \
  |  |  |  |   57|  6.99M|    break;
  |  |  ------------------
  |  |   62|  6.99M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.92k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.93k, False: 15.6M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.93k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 7.92k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.92k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.92k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.92k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.92k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 7.92k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  7.92k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.92k|    break;
  |  |  ------------------
  |  |   63|  7.92k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 15.6M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 15.6M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 15.6M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  99.1k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 99.1k, False: 15.5M]
  ------------------
  651|  99.1k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  99.1k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  99.1k|#  define MINBPC(enc) 1
  ------------------
  652|  99.1k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 99.1k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 8, False: 3]
  ------------------
  654|      8|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  99.1k|          break;
  658|  99.1k|        }
  659|  99.1k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 31, False: 15.6M]
  ------------------
  660|     31|          *nextTokPtr = ptr;
  661|     31|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  662|  8.54M|        default:
  ------------------
  |  Branch (662:9): [True: 8.54M, False: 7.10M]
  ------------------
  663|  8.54M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.54M|#  define MINBPC(enc) 1
  ------------------
  664|  8.54M|          break;
  665|  15.6M|        }
  666|  15.6M|      }
  667|  1.76M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.76M|#  define MINBPC(enc) 1
  ------------------
  668|  1.76M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.76M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.76M|    {                                                                          \
  |  |  |  |  135|  1.76M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.76M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.76M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 1.76M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  1.76M|    }
  |  |  ------------------
  ------------------
  669|  1.76M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|   740k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 740k, False: 1.02M]
  ------------------
  671|  1.71M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 977k, False: 789k]
  ------------------
  672|  1.75M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 36.0k, False: 1.73M]
  ------------------
  673|  1.75M|        break;
  674|  1.63k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 1.63k, False: 1.76M]
  ------------------
  675|  1.63k|        goto sol;
  676|  11.0k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 11.0k, False: 1.75M]
  ------------------
  677|  11.0k|        goto gt;
  678|     32|      default:
  ------------------
  |  Branch (678:7): [True: 32, False: 1.76M]
  ------------------
  679|     32|        *nextTokPtr = ptr;
  680|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  681|  1.76M|      }
  682|       |      /* ptr points to closing quote */
  683|  2.11M|      for (;;) {
  684|  2.11M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.11M|#  define MINBPC(enc) 1
  ------------------
  685|  2.11M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.11M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.11M|    {                                                                          \
  |  |  |  |  135|  2.11M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.11M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.11M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 2.11M]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.11M|    }
  |  |  ------------------
  ------------------
  686|  2.11M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.11M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.11M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  1.70M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.68M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.11M]
  |  |  ------------------
  |  |  111|  1.68M|    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.68M|    /* fall through */                                                         \
  |  |  116|  1.68M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.62M, False: 489k]
  |  |  ------------------
  |  |  117|  1.68M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 59.3k, False: 2.05M]
  |  |  ------------------
  |  |  118|  1.68M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.68M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.68M|    break;                                                                     \
  |  |  120|  1.68M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  35.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 35.0k, False: 2.08M]
  |  |  |  |  ------------------
  |  |  |  |  100|  35.0k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  101|  35.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  35.0k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  70.1k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  35.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 35.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  35.0k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  35.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 35.0k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  35.0k|    ptr += n;                                                                  \
  |  |  |  |  107|  35.0k|    break;
  |  |  ------------------
  |  |  121|  35.0k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.47k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.48k, False: 2.11M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.48k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.48k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.47k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.48k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.96k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.48k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.47k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 1.47k]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|  1.48k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.47k|    break;
  |  |  ------------------
  |  |  122|  1.47k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 2.11M]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      5|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     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|   305k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 305k, False: 1.81M]
  ------------------
  689|   364k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 58.3k, False: 2.06M]
  ------------------
  690|   365k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 741, False: 2.11M]
  ------------------
  691|   365k|          continue;
  692|  1.07k|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 1.07k, False: 2.11M]
  ------------------
  693|  12.1k|        gt:
  694|  12.1k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  12.1k|#  define MINBPC(enc) 1
  ------------------
  695|  12.1k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  12.1k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  27.9k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 27.9k, False: 2.09M]
  ------------------
  697|  29.5k|        sol:
  698|  29.5k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  29.5k|#  define MINBPC(enc) 1
  ------------------
  699|  29.5k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  29.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  29.5k|    {                                                                          \
  |  |  |  |  135|  29.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  29.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  29.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 29.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  29.5k|    }
  |  |  ------------------
  ------------------
  700|  29.5k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  29.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 19, False: 29.5k]
  ------------------
  701|     19|            *nextTokPtr = ptr;
  702|     19|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  703|     19|          }
  704|  29.5k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  29.5k|#  define MINBPC(enc) 1
  ------------------
  705|  29.5k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  29.5k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      9|        default:
  ------------------
  |  Branch (706:9): [True: 9, False: 2.11M]
  ------------------
  707|      9|          *nextTokPtr = ptr;
  708|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  709|  2.11M|        }
  710|  1.72M|        break;
  711|  2.11M|      }
  712|  1.72M|      break;
  713|  1.75M|    }
  714|  1.72M|    default:
  ------------------
  |  Branch (714:5): [True: 10, False: 3.65M]
  ------------------
  715|     10|      *nextTokPtr = ptr;
  716|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  717|  3.65M|    }
  718|  3.65M|  }
  719|     92|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  42.2k|}
xmltok.c:normal_scanRef:
  545|  4.46M|                const char **nextTokPtr) {
  546|  4.46M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.46M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.46M|    {                                                                          \
  |  |  |  |  135|  4.46M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.46M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.46M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 4.46M]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  4.46M|    }
  |  |  ------------------
  ------------------
  547|  4.46M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.46M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.46M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  4.36M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.37M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.46M]
  |  |  ------------------
  |  |  111|  4.37M|    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|  4.37M|    /* fall through */                                                         \
  |  |  116|  4.37M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.36M, False: 99.8k]
  |  |  ------------------
  |  |  117|  4.37M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 7.68k, False: 4.45M]
  |  |  ------------------
  |  |  118|  4.37M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.37M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  4.37M|    break;                                                                     \
  |  |  120|  4.37M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    442|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 454, False: 4.46M]
  |  |  |  |  ------------------
  |  |  |  |  100|    454|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 452]
  |  |  |  |  ------------------
  |  |  |  |  101|    442|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    452|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    904|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    452|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 443]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    443|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    443|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 442]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|    452|    ptr += n;                                                                  \
  |  |  |  |  107|    442|    break;
  |  |  ------------------
  |  |  121|    442|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    268|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 273, False: 4.46M]
  |  |  |  |  ------------------
  |  |  |  |  100|    273|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 271]
  |  |  |  |  ------------------
  |  |  |  |  101|    268|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    271|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    542|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    271|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 269]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    269|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    269|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 268]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    271|    ptr += n;                                                                  \
  |  |  |  |  107|    268|    break;
  |  |  ------------------
  |  |  122|    268|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 4.46M]
  |  |  |  |  ------------------
  |  |  |  |  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: 10, 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|     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;
  |  |  ------------------
  ------------------
  549|  91.4k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 91.4k, False: 4.37M]
  ------------------
  550|  91.4k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  91.4k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  91.4k|#  define MINBPC(enc) 1
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 4.46M]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|  4.46M|  }
  555|  21.3M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  21.3M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  21.3M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  21.3M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  57.6M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.9M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 21.3M]
  |  |  ------------------
  |  |   82|  16.9M|    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|  16.9M|    /* fall through */                                                         \
  |  |   87|  16.9M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 10.0M, False: 11.2M]
  |  |  ------------------
  |  |   88|  13.6M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.58M, False: 17.7M]
  |  |  ------------------
  |  |   89|  16.9M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 3.32M, False: 18.0M]
  |  |  ------------------
  |  |   90|  16.9M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 21.3M]
  |  |  ------------------
  |  |   91|  16.9M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 273, False: 21.3M]
  |  |  ------------------
  |  |   92|  16.9M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  16.9M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  16.9M|    break;                                                                     \
  |  |   94|  16.9M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    531|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 544, False: 21.3M]
  |  |  |  |  ------------------
  |  |  |  |   71|    544|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 542]
  |  |  |  |  ------------------
  |  |  |  |   72|    531|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    542|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    542|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 533]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    533|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    533|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 531]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    542|    ptr += n;                                                                  \
  |  |  |  |   78|    531|    break;
  |  |  ------------------
  |  |   95|    640|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    630|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 640, False: 21.3M]
  |  |  |  |  ------------------
  |  |  |  |   71|    640|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 639]
  |  |  |  |  ------------------
  |  |  |  |   72|    630|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    639|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.27k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    639|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 634]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    634|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    634|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 630]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|    639|    ptr += n;                                                                  \
  |  |  |  |   78|    630|    break;
  |  |  ------------------
  |  |   96|    630|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 21.3M]
  |  |  |  |  ------------------
  |  |  |  |   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: 17, 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|     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|  4.37M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 4.37M, False: 16.9M]
  ------------------
  559|  4.37M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.37M|#  define MINBPC(enc) 1
  ------------------
  560|  4.37M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  4.37M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     13|    default:
  ------------------
  |  Branch (561:5): [True: 13, False: 21.3M]
  ------------------
  562|     13|      *nextTokPtr = ptr;
  563|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  564|  21.3M|    }
  565|  21.3M|  }
  566|     57|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     57|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  4.37M|}
xmltok.c:normal_scanCharRef:
  514|  91.4k|                    const char **nextTokPtr) {
  515|  91.4k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  91.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  91.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  91.4k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 91.4k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  91.4k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  91.4k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 57.7k, False: 33.6k]
  |  |  ------------------
  ------------------
  517|  57.7k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  57.7k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  57.7k|#  define MINBPC(enc) 1
  ------------------
  518|  33.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  33.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  33.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  33.6k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 33.6k, False: 19]
  ------------------
  520|  33.6k|      break;
  521|     19|    default:
  ------------------
  |  Branch (521:5): [True: 19, False: 33.6k]
  ------------------
  522|     19|      *nextTokPtr = ptr;
  523|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  524|  33.6k|    }
  525|  39.5k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  33.6k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  5.93k|#  define MINBPC(enc) 1
  ------------------
  526|  39.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  39.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  39.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  5.93k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 5.93k, False: 33.6k]
  ------------------
  528|  5.93k|        break;
  529|  33.6k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 33.6k, False: 5.93k]
  ------------------
  530|  33.6k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  33.6k|#  define MINBPC(enc) 1
  ------------------
  531|  33.6k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  33.6k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|      8|      default:
  ------------------
  |  Branch (532:7): [True: 8, False: 39.5k]
  ------------------
  533|      8|        *nextTokPtr = ptr;
  534|      8|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  535|  39.5k|      }
  536|  39.5k|    }
  537|  33.6k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  91.4k|}
xmltok.c:normal_scanHexCharRef:
  483|  57.7k|                       const char **nextTokPtr) {
  484|  57.7k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  57.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  57.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  57.7k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 57.7k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  57.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  57.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  57.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  55.0k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 55.0k, False: 2.68k]
  ------------------
  487|  57.7k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.67k, False: 55.1k]
  ------------------
  488|  57.7k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 57.7k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  57.7k|    }
  493|   194k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  57.7k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   137k|#  define MINBPC(enc) 1
  ------------------
  494|   194k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   194k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   194k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  2.89k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 2.89k, False: 191k]
  ------------------
  496|   137k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 134k, False: 60.6k]
  ------------------
  497|   137k|        break;
  498|  57.7k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 57.7k, False: 137k]
  ------------------
  499|  57.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  57.7k|#  define MINBPC(enc) 1
  ------------------
  500|  57.7k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  57.7k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|      9|      default:
  ------------------
  |  Branch (501:7): [True: 9, False: 194k]
  ------------------
  502|      9|        *nextTokPtr = ptr;
  503|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  504|   194k|      }
  505|   194k|    }
  506|  57.7k|  }
  507|     13|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  57.7k|}
xmltok.c:normal_cdataSectionTok:
  356|   650k|                        const char **nextTokPtr) {
  357|   650k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 144, False: 649k]
  ------------------
  358|    144|    return XML_TOK_NONE;
  ------------------
  |  |   51|    144|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   649k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   649k|#  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|   649k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   649k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   649k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  23.8k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 23.8k, False: 626k]
  ------------------
  370|  23.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.8k|#  define MINBPC(enc) 1
  ------------------
  371|  23.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  23.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  23.8k|    {                                                                          \
  |  |  |  |  135|  23.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  23.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  23.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 23.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  23.8k|    }
  |  |  ------------------
  ------------------
  372|  23.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  23.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 13.1k, False: 10.6k]
  ------------------
  373|  13.1k|      break;
  374|  10.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.6k|#  define MINBPC(enc) 1
  ------------------
  375|  10.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.6k|    {                                                                          \
  |  |  |  |  135|  10.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  10.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 10.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  10.6k|    }
  |  |  ------------------
  ------------------
  376|  10.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  10.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 9.30k, False: 1.38k]
  ------------------
  377|  9.30k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  9.30k|#  define MINBPC(enc) 1
  ------------------
  378|  9.30k|      break;
  379|  9.30k|    }
  380|  1.38k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.38k|#  define MINBPC(enc) 1
  ------------------
  381|  1.38k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.38k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|   302k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 302k, False: 347k]
  ------------------
  383|   302k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   302k|#  define MINBPC(enc) 1
  ------------------
  384|   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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   302k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 302k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|   302k|    }
  |  |  ------------------
  ------------------
  385|   302k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   302k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   302k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 4.12k, False: 298k]
  ------------------
  386|  4.12k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.12k|#  define MINBPC(enc) 1
  ------------------
  387|   302k|    *nextTokPtr = ptr;
  388|   302k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   302k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  22.3k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 22.3k, False: 627k]
  ------------------
  390|  22.3k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  22.3k|#  define MINBPC(enc) 1
  ------------------
  391|  22.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  22.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  22.3k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.31k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.29k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.31k, False: 648k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 7, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.29k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.30k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.30k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.30k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 1.29k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     16|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     16|    }                                                                          \
  |  |  |  |   56|  1.30k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.29k|    break;
  |  |  ------------------
  |  |   61|  3.71k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.70k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.71k, False: 646k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.71k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 3.70k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.70k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.70k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.70k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.70k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 3.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  3.70k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.70k|    break;
  |  |  ------------------
  |  |   62|  3.70k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.42k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.42k, False: 647k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.42k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 2.42k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.42k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.42k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.42k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.42k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 2.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  2.42k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.42k|    break;
  |  |  ------------------
  |  |   63|  2.42k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 649k]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 4, False: 649k]
  |  |  ------------------
  |  |   65|     23|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 649k]
  |  |  ------------------
  |  |   66|     23|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     23|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|   294k|  default:
  ------------------
  |  Branch (393:3): [True: 294k, False: 355k]
  ------------------
  394|   294k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   294k|#  define MINBPC(enc) 1
  ------------------
  395|   294k|    break;
  396|   649k|  }
  397|  3.54M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  3.54M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.54M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.54M|  (((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|  56.9k|      LEAD_CASE(2)
  ------------------
  |  |  400|  56.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 56.9k, False: 3.48M]
  |  |  ------------------
  |  |  401|  56.9k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  56.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  56.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 56.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 4, False: 56.9k]
  |  |  ------------------
  |  |  402|     13|      *nextTokPtr = ptr;                                                       \
  |  |  403|     13|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     13|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     13|    }                                                                          \
  |  |  405|  56.9k|    ptr += n;                                                                  \
  |  |  406|  56.9k|    break;
  ------------------
  408|  2.58M|      LEAD_CASE(3)
  ------------------
  |  |  400|  2.58M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 2.58M, False: 960k]
  |  |  ------------------
  |  |  401|  2.58M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  2.58M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.58M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 2.58M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 4, False: 2.58M]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|  2.58M|    ptr += n;                                                                  \
  |  |  406|  2.58M|    break;
  ------------------
  409|  45.0k|      LEAD_CASE(4)
  ------------------
  |  |  400|  45.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 45.0k, False: 3.49M]
  |  |  ------------------
  |  |  401|  45.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  45.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  45.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 45.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 45.0k]
  |  |  ------------------
  |  |  402|      3|      *nextTokPtr = ptr;                                                       \
  |  |  403|      3|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      3|    }                                                                          \
  |  |  405|  45.0k|    ptr += n;                                                                  \
  |  |  406|  45.0k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|      9|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 9, False: 3.54M]
  ------------------
  412|     11|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 2, False: 3.54M]
  ------------------
  413|     16|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 3.54M]
  ------------------
  414|   289k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 289k, False: 3.25M]
  ------------------
  415|   307k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 17.7k, False: 3.52M]
  ------------------
  416|   323k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 16.0k, False: 3.52M]
  ------------------
  417|   323k|      *nextTokPtr = ptr;
  418|   323k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   323k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   534k|    default:
  ------------------
  |  Branch (419:5): [True: 534k, False: 3.00M]
  ------------------
  420|   534k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   534k|#  define MINBPC(enc) 1
  ------------------
  421|   534k|      break;
  422|  3.54M|    }
  423|  3.54M|  }
  424|    117|  *nextTokPtr = ptr;
  425|    117|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    117|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|   323k|}
xmltok.c:normal_attributeValueTok:
 1262|   240M|                          const char **nextTokPtr) {
 1263|   240M|  const char *start;
 1264|   240M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 4.11M, False: 236M]
  ------------------
 1265|  4.11M|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.11M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   236M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   236M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   236M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   236M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 236M]
  ------------------
 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|   236M|  start = ptr;
 1275|  1.84G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.84G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.84G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.84G|  (((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|  2.21M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  2.21M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 2.21M, False: 1.84G]
  |  |  ------------------
  |  | 1279|  2.21M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  2.21M|    break;
  ------------------
 1282|   412M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   412M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 412M, False: 1.43G]
  |  |  ------------------
  |  | 1279|   412M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   412M|    break;
  ------------------
 1283|   973k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   973k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 973k, False: 1.84G]
  |  |  ------------------
  |  | 1279|   973k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   973k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  4.67M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 4.67M, False: 1.84G]
  ------------------
 1286|  4.67M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 4.14M, False: 537k]
  ------------------
 1287|  4.14M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.14M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.14M|#  define MINBPC(enc) 1
  ------------------
 1288|   537k|      *nextTokPtr = ptr;
 1289|   537k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   537k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      5|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 5, False: 1.84G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      5|      *nextTokPtr = ptr;
 1293|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
 1294|   219M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 219M, False: 1.62G]
  ------------------
 1295|   219M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 196M, False: 23.2M]
  ------------------
 1296|   196M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   196M|#  define MINBPC(enc) 1
  ------------------
 1297|   196M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   196M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|   196M|      }
 1299|  23.2M|      *nextTokPtr = ptr;
 1300|  23.2M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  2.28M|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 2.28M, False: 1.84G]
  ------------------
 1302|  2.28M|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 1.67M, False: 607k]
  ------------------
 1303|  1.67M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.67M|#  define MINBPC(enc) 1
  ------------------
 1304|  1.67M|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.67M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.67M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.67M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 1.18k, False: 1.67M]
  ------------------
 1305|  1.18k|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|  1.18k|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  1.67M|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.67M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.67M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 969k, False: 709k]
  ------------------
 1307|   969k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   969k|#  define MINBPC(enc) 1
  ------------------
 1308|  1.67M|        *nextTokPtr = ptr;
 1309|  1.67M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.67M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  1.67M|      }
 1311|   607k|      *nextTokPtr = ptr;
 1312|   607k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   607k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  7.09M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 7.09M, False: 1.84G]
  ------------------
 1314|  7.09M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.41M, False: 2.67M]
  ------------------
 1315|  4.41M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.41M|#  define MINBPC(enc) 1
  ------------------
 1316|  4.41M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.41M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.41M|      }
 1318|  2.67M|      *nextTokPtr = ptr;
 1319|  2.67M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.67M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.20G|    default:
  ------------------
  |  Branch (1320:5): [True: 1.20G, False: 649M]
  ------------------
 1321|  1.20G|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.20G|#  define MINBPC(enc) 1
  ------------------
 1322|  1.20G|      break;
 1323|  1.84G|    }
 1324|  1.84G|  }
 1325|  2.62M|  *nextTokPtr = ptr;
 1326|  2.62M|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.62M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   236M|}
xmltok.c:normal_entityValueTok:
 1331|   211k|                       const char **nextTokPtr) {
 1332|   211k|  const char *start;
 1333|   211k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 4.49k, False: 206k]
  ------------------
 1334|  4.49k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.49k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   206k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   206k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   206k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   206k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 206k]
  ------------------
 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|   206k|  start = ptr;
 1344|  10.4M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  10.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.4M|  (((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|    898|      LEAD_CASE(2)
  ------------------
  |  | 1347|    898|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 898, False: 10.4M]
  |  |  ------------------
  |  | 1348|    898|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    898|    break;
  ------------------
 1351|  1.08k|      LEAD_CASE(3)
  ------------------
  |  | 1347|  1.08k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 1.08k, False: 10.4M]
  |  |  ------------------
  |  | 1348|  1.08k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  1.08k|    break;
  ------------------
 1352|    331|      LEAD_CASE(4)
  ------------------
  |  | 1347|    331|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 331, False: 10.4M]
  |  |  ------------------
  |  | 1348|    331|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    331|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  23.3k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 23.3k, False: 10.4M]
  ------------------
 1355|  23.3k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 17.4k, False: 5.90k]
  ------------------
 1356|  17.4k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  17.4k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  17.4k|#  define MINBPC(enc) 1
  ------------------
 1357|  5.90k|      *nextTokPtr = ptr;
 1358|  5.90k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.90k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      5|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 5, False: 10.4M]
  ------------------
 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|  23.5k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 23.5k, False: 10.4M]
  ------------------
 1367|  23.5k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 15.9k, False: 7.54k]
  ------------------
 1368|  15.9k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  15.9k|#  define MINBPC(enc) 1
  ------------------
 1369|  15.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  15.9k|      }
 1371|  7.54k|      *nextTokPtr = ptr;
 1372|  7.54k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.54k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   158k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 158k, False: 10.3M]
  ------------------
 1374|   158k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 151k, False: 7.25k]
  ------------------
 1375|   151k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   151k|#  define MINBPC(enc) 1
  ------------------
 1376|   151k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   151k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   151k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   151k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 298, False: 151k]
  ------------------
 1377|    298|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    298|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   151k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   151k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   151k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 54.4k, False: 96.5k]
  ------------------
 1379|  54.4k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  54.4k|#  define MINBPC(enc) 1
  ------------------
 1380|   151k|        *nextTokPtr = ptr;
 1381|   151k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   151k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   151k|      }
 1383|  7.25k|      *nextTokPtr = ptr;
 1384|  7.25k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.25k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  10.2M|    default:
  ------------------
  |  Branch (1385:5): [True: 10.2M, False: 207k]
  ------------------
 1386|  10.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.2M|#  define MINBPC(enc) 1
  ------------------
 1387|  10.2M|      break;
 1388|  10.4M|    }
 1389|  10.4M|  }
 1390|  1.32k|  *nextTokPtr = ptr;
 1391|  1.32k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.32k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   206k|}
xmltok.c:normal_nameMatchesAscii:
 1715|   106k|                         const char *end1, const char *ptr2) {
 1716|   106k|  UNUSED_P(enc);
  ------------------
  |  |  135|   106k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   554k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   447k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 489k, False: 65.2k]
  ------------------
 1718|   489k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   489k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 40, False: 489k]
  ------------------
 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|     40|      return 0; /* LCOV_EXCL_LINE */
 1725|     40|    }
 1726|   489k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   489k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 41.4k, False: 447k]
  ------------------
 1727|  41.4k|      return 0;
 1728|   489k|  }
 1729|  65.2k|  return ptr1 == end1;
 1730|   106k|}
xmltok.c:normal_nameLength:
 1733|  2.47M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.47M|  const char *start = ptr;
 1735|  5.98M|  for (;;) {
 1736|  5.98M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.98M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.98M|  (((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|  18.6k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  18.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 18.6k, False: 5.96M]
  |  |  ------------------
  |  | 1739|  18.6k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  18.6k|    break;
  ------------------
 1742|   717k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   717k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 717k, False: 5.26M]
  |  |  ------------------
  |  | 1739|   717k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   717k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 5.98M]
  |  |  ------------------
  |  | 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: 5.98M]
  ------------------
 1746|  2.59M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 2.59M, False: 3.38M]
  ------------------
 1747|  2.59M|#  ifdef XML_NS
 1748|  2.59M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 5.98M]
  ------------------
 1749|  2.59M|#  endif
 1750|  2.76M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 166k, False: 5.81M]
  ------------------
 1751|  2.76M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 4.77k, False: 5.97M]
  ------------------
 1752|  2.76M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 1.27k, False: 5.98M]
  ------------------
 1753|  2.77M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 2.00k, False: 5.98M]
  ------------------
 1754|  2.77M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.77M|#  define MINBPC(enc) 1
  ------------------
 1755|  2.77M|      break;
 1756|  2.47M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.47M, False: 3.50M]
  ------------------
 1757|  2.47M|      return (int)(ptr - start);
 1758|  5.98M|    }
 1759|  5.98M|  }
 1760|  2.47M|}
xmltok.c:normal_getAtts:
 1510|  2.39M|                ATTRIBUTE *atts) {
 1511|  2.39M|  enum { other, inName, inValue } state = inName;
 1512|  2.39M|  int nAtts = 0;
 1513|  2.39M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  40.7M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.39M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  38.3M|#  define MINBPC(enc) 1
  ------------------
 1517|  40.7M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  40.7M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  40.7M|  (((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|   166k|      LEAD_CASE(2)
  ------------------
  |  | 1527|   166k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 166k, False: 40.5M]
  |  |  ------------------
  |  | 1528|   166k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   166k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 69.4k, False: 97.0k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  69.4k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 35.1k, False: 34.2k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  35.1k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  35.1k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  35.1k|      }                                                                        \
  |  |  |  | 1524|  69.4k|      state = inName;                                                          \
  |  |  |  | 1525|  69.4k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|   166k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|   166k|    break;
  ------------------
 1531|  4.92M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  4.92M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 4.92M, False: 35.7M]
  |  |  ------------------
  |  | 1528|  4.92M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  4.92M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 3.15k, False: 4.92M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  3.15k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 2.16k, False: 992]
  |  |  |  |  ------------------
  |  |  |  | 1521|  2.16k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  2.16k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  2.16k|      }                                                                        \
  |  |  |  | 1524|  3.15k|      state = inName;                                                          \
  |  |  |  | 1525|  3.15k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  4.92M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  4.92M|    break;
  ------------------
 1532|  4.70k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  4.70k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 4.70k, False: 40.7M]
  |  |  ------------------
  |  | 1528|  4.70k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  4.70k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 4.70k]
  |  |  |  |  ------------------
  |  |  |  | 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|  4.70k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  4.70k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 40.7M]
  ------------------
 1535|  9.26M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 9.26M, False: 31.4M]
  ------------------
 1536|  10.3M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 1.05M, False: 39.6M]
  ------------------
 1537|  10.3M|      START_NAME
  ------------------
  |  | 1519|  10.3M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 3.38M, False: 6.92M]
  |  |  ------------------
  |  | 1520|  3.38M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 1.72M, False: 1.65M]
  |  |  ------------------
  |  | 1521|  1.72M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  1.72M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  1.72M|      }                                                                        \
  |  | 1524|  3.38M|      state = inName;                                                          \
  |  | 1525|  3.38M|    }
  ------------------
 1538|  10.3M|      break;
 1539|      0|#  undef START_NAME
 1540|   696k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 696k, False: 40.0M]
  ------------------
 1541|   696k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 331k, False: 364k]
  ------------------
 1542|   331k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 202k, False: 129k]
  ------------------
 1543|   202k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   202k|#  define MINBPC(enc) 1
  ------------------
 1544|   331k|        state = inValue;
 1545|   331k|        open = BT_QUOT;
 1546|   364k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 331k, False: 32.3k]
  ------------------
 1547|   331k|        state = other;
 1548|   331k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 202k, False: 129k]
  ------------------
 1549|   202k|          atts[nAtts].valueEnd = ptr;
 1550|   331k|        nAtts++;
 1551|   331k|      }
 1552|   696k|      break;
 1553|  6.37M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 6.37M, False: 34.3M]
  ------------------
 1554|  6.37M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 3.12M, False: 3.25M]
  ------------------
 1555|  3.12M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 1.56M, False: 1.55M]
  ------------------
 1556|  1.56M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.56M|#  define MINBPC(enc) 1
  ------------------
 1557|  3.12M|        state = inValue;
 1558|  3.12M|        open = BT_APOS;
 1559|  3.25M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 3.12M, False: 129k]
  ------------------
 1560|  3.12M|        state = other;
 1561|  3.12M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 1.56M, False: 1.55M]
  ------------------
 1562|  1.56M|          atts[nAtts].valueEnd = ptr;
 1563|  3.12M|        nAtts++;
 1564|  3.12M|      }
 1565|  6.37M|      break;
 1566|   102k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 102k, False: 40.6M]
  ------------------
 1567|   102k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 99.0k, False: 3.38k]
  ------------------
 1568|  99.0k|        atts[nAtts].normalized = 0;
 1569|   102k|      break;
 1570|  2.16M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 2.16M, False: 38.5M]
  ------------------
 1571|  2.16M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 71.4k, False: 2.09M]
  ------------------
 1572|  71.4k|        state = other;
 1573|  2.09M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 57.6k, False: 2.03M]
  |  Branch (1573:36): [True: 39.7k, False: 17.9k]
  |  Branch (1573:55): [True: 19.1k, False: 20.5k]
  ------------------
 1574|  2.09M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 2.07k, False: 17.0k]
  ------------------
 1575|  19.1k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  17.0k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  36.2k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 15.1k, False: 1.92k]
  ------------------
 1576|  19.1k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  1.92k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  21.0k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 610, False: 1.31k]
  ------------------
 1577|  19.1k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|  1.31k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 796, False: 516]
  ------------------
 1578|  18.6k|        atts[nAtts].normalized = 0;
 1579|  2.16M|      break;
 1580|  3.75M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 3.75M, False: 36.9M]
  ------------------
 1581|  5.01M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 1.26M, False: 39.4M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  5.01M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 4.04k, False: 5.00M]
  ------------------
 1585|  4.04k|        state = other;
 1586|  5.00M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 2.87M, False: 2.13M]
  |  Branch (1586:36): [True: 2.87M, False: 666]
  ------------------
 1587|  2.87M|        atts[nAtts].normalized = 0;
 1588|  5.01M|      break;
 1589|  2.39M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.39M, False: 38.3M]
  ------------------
 1590|  2.48M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 88.7k, False: 40.6M]
  ------------------
 1591|  2.48M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.39M, False: 92.3k]
  ------------------
 1592|  2.39M|        return nAtts;
 1593|  92.3k|      break;
 1594|  8.45M|    default:
  ------------------
  |  Branch (1594:5): [True: 8.45M, False: 32.2M]
  ------------------
 1595|  8.45M|      break;
 1596|  40.7M|    }
 1597|  40.7M|  }
 1598|       |  /* not reached */
 1599|  2.39M|}
xmltok.c:normal_charRefNumber:
 1602|  47.9k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  47.9k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  47.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  47.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  47.9k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  47.9k|#  define MINBPC(enc) 1
  ------------------
 1607|  47.9k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  47.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 30.2k, False: 17.6k]
  |  |  ------------------
  ------------------
 1608|   134k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  30.2k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|   134k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 104k, False: 30.2k]
  ------------------
 1609|   104k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   104k|#  define MINBPC(enc) 1
  ------------------
 1610|   104k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|   104k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|   104k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 104k]
  ------------------
 1612|    432|      case ASCII_0:
  ------------------
  |  |   90|    432|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 432, False: 103k]
  ------------------
 1613|  7.77k|      case ASCII_1:
  ------------------
  |  |   91|  7.77k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 7.34k, False: 96.7k]
  ------------------
 1614|  8.36k|      case ASCII_2:
  ------------------
  |  |   92|  8.36k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 591, False: 103k]
  ------------------
 1615|  27.5k|      case ASCII_3:
  ------------------
  |  |   93|  27.5k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 19.1k, False: 84.9k]
  ------------------
 1616|  28.1k|      case ASCII_4:
  ------------------
  |  |   94|  28.1k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 607, False: 103k]
  ------------------
 1617|  28.5k|      case ASCII_5:
  ------------------
  |  |   95|  28.5k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 419, False: 103k]
  ------------------
 1618|  28.9k|      case ASCII_6:
  ------------------
  |  |   96|  28.9k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 376, False: 103k]
  ------------------
 1619|  29.2k|      case ASCII_7:
  ------------------
  |  |   97|  29.2k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 350, False: 103k]
  ------------------
 1620|  29.8k|      case ASCII_8:
  ------------------
  |  |   98|  29.8k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 548, False: 103k]
  ------------------
 1621|  30.2k|      case ASCII_9:
  ------------------
  |  |   99|  30.2k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 417, False: 103k]
  ------------------
 1622|  30.2k|        result <<= 4;
 1623|  30.2k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  30.2k|#define ASCII_0 0x30
  ------------------
 1624|  30.2k|        break;
 1625|    652|      case ASCII_A:
  ------------------
  |  |   36|    652|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 652, False: 103k]
  ------------------
 1626|  26.6k|      case ASCII_B:
  ------------------
  |  |   37|  26.6k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 25.9k, False: 78.1k]
  ------------------
 1627|  27.5k|      case ASCII_C:
  ------------------
  |  |   38|  27.5k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 963, False: 103k]
  ------------------
 1628|  42.6k|      case ASCII_D:
  ------------------
  |  |   39|  42.6k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 15.0k, False: 89.0k]
  ------------------
 1629|  43.3k|      case ASCII_E:
  ------------------
  |  |   40|  43.3k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 749, False: 103k]
  ------------------
 1630|  43.7k|      case ASCII_F:
  ------------------
  |  |   41|  43.7k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 419, False: 103k]
  ------------------
 1631|  43.7k|        result <<= 4;
 1632|  43.7k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  43.7k|#define ASCII_A 0x41
  ------------------
 1633|  43.7k|        break;
 1634|    496|      case ASCII_a:
  ------------------
  |  |   63|    496|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 496, False: 103k]
  ------------------
 1635|  26.2k|      case ASCII_b:
  ------------------
  |  |   64|  26.2k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 25.7k, False: 78.3k]
  ------------------
 1636|  26.7k|      case ASCII_c:
  ------------------
  |  |   65|  26.7k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 468, False: 103k]
  ------------------
 1637|  27.2k|      case ASCII_d:
  ------------------
  |  |   66|  27.2k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 591, False: 103k]
  ------------------
 1638|  27.7k|      case ASCII_e:
  ------------------
  |  |   67|  27.7k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 446, False: 103k]
  ------------------
 1639|  30.0k|      case ASCII_f:
  ------------------
  |  |   68|  30.0k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 2.32k, False: 101k]
  ------------------
 1640|  30.0k|        result <<= 4;
 1641|  30.0k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  30.0k|#define ASCII_a 0x61
  ------------------
 1642|  30.0k|        break;
 1643|   104k|      }
 1644|   104k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 30, False: 104k]
  ------------------
 1645|     30|        return -1;
 1646|   104k|    }
 1647|  30.2k|  } else {
 1648|  38.9k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  38.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 21.3k, False: 17.6k]
  ------------------
 1649|  21.3k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  21.3k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  21.3k|      result *= 10;
 1651|  21.3k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  21.3k|#define ASCII_0 0x30
  ------------------
 1652|  21.3k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 8, False: 21.3k]
  ------------------
 1653|      8|        return -1;
 1654|  21.3k|    }
 1655|  17.6k|  }
 1656|  47.9k|  return checkCharRefNumber(result);
 1657|  47.9k|}
xmltok.c:normal_predefinedEntityName:
 1661|  4.30M|                             const char *end) {
 1662|  4.30M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.30M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  4.30M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  4.30M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 4.22M, False: 85.9k]
  ------------------
 1664|  82.1k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 82.1k, False: 4.22M]
  ------------------
 1665|  82.1k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  82.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 59.4k, False: 22.6k]
  |  |  ------------------
  ------------------
 1666|  59.4k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  59.4k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 0, False: 59.4k]
  |  |  ------------------
  ------------------
 1667|  58.9k|      case ASCII_l:
  ------------------
  |  |   74|  58.9k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 58.9k, False: 599]
  ------------------
 1668|  58.9k|        return ASCII_LT;
  ------------------
  |  |  111|  58.9k|#define ASCII_LT 0x3C
  ------------------
 1669|    599|      case ASCII_g:
  ------------------
  |  |   69|    599|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 599, False: 58.9k]
  ------------------
 1670|    599|        return ASCII_GT;
  ------------------
  |  |  113|    599|#define ASCII_GT 0x3E
  ------------------
 1671|  59.4k|      }
 1672|  59.4k|    }
 1673|  22.6k|    break;
 1674|  22.6k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.23k, False: 4.30M]
  ------------------
 1675|  1.23k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.23k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 820, False: 410]
  |  |  ------------------
  ------------------
 1676|    820|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    820|#  define MINBPC(enc) 1
  ------------------
 1677|    820|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    820|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 406, False: 414]
  |  |  ------------------
  ------------------
 1678|    406|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    406|#  define MINBPC(enc) 1
  ------------------
 1679|    406|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    406|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 205, False: 201]
  |  |  ------------------
  ------------------
 1680|    205|          return ASCII_AMP;
  ------------------
  |  |  105|    205|#define ASCII_AMP 0x26
  ------------------
 1681|    406|      }
 1682|    820|    }
 1683|  1.02k|    break;
 1684|  2.49k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 2.49k, False: 4.30M]
  ------------------
 1685|  2.49k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.49k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 326, False: 2.16k]
  |  |  ------------------
  ------------------
 1686|  1.11k|    case ASCII_q:
  ------------------
  |  |   79|  1.11k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.11k, False: 1.37k]
  ------------------
 1687|  1.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.11k|#  define MINBPC(enc) 1
  ------------------
 1688|  1.11k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  1.11k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 909, False: 208]
  |  |  ------------------
  ------------------
 1689|    909|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    909|#  define MINBPC(enc) 1
  ------------------
 1690|    909|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    909|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 566, False: 343]
  |  |  ------------------
  ------------------
 1691|    566|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    566|#  define MINBPC(enc) 1
  ------------------
 1692|    566|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    566|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 288, False: 278]
  |  |  ------------------
  ------------------
 1693|    288|            return ASCII_QUOT;
  ------------------
  |  |  104|    288|#define ASCII_QUOT 0x22
  ------------------
 1694|    566|        }
 1695|    909|      }
 1696|    829|      break;
 1697|  1.04k|    case ASCII_a:
  ------------------
  |  |   63|  1.04k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.04k, False: 1.44k]
  ------------------
 1698|  1.04k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.04k|#  define MINBPC(enc) 1
  ------------------
 1699|  1.04k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  1.04k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 847, False: 201]
  |  |  ------------------
  ------------------
 1700|    847|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    847|#  define MINBPC(enc) 1
  ------------------
 1701|    847|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    847|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 515, False: 332]
  |  |  ------------------
  ------------------
 1702|    515|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    515|#  define MINBPC(enc) 1
  ------------------
 1703|    515|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    515|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 245, False: 270]
  |  |  ------------------
  ------------------
 1704|    245|            return ASCII_APOS;
  ------------------
  |  |  106|    245|#define ASCII_APOS 0x27
  ------------------
 1705|    515|        }
 1706|    847|      }
 1707|    803|      break;
 1708|  2.49k|    }
 1709|  4.30M|  }
 1710|  4.24M|  return 0;
 1711|  4.30M|}
xmltok.c:normal_updatePosition:
 1779|  4.63k|                       POSITION *pos) {
 1780|  5.14M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  5.14M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.14M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.14M|  (((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.42k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.42k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.42k, False: 5.14M]
  |  |  ------------------
  |  | 1784|  1.42k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.42k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.42k|    break;
  ------------------
 1788|  1.19k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  1.19k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.19k, False: 5.14M]
  |  |  ------------------
  |  | 1784|  1.19k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.19k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.19k|    break;
  ------------------
 1789|    763|      LEAD_CASE(4)
  ------------------
  |  | 1783|    763|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 763, False: 5.14M]
  |  |  ------------------
  |  | 1784|    763|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    763|    pos->columnNumber++;                                                       \
  |  | 1786|    763|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  50.3k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 50.3k, False: 5.09M]
  ------------------
 1792|  50.3k|      pos->columnNumber = 0;
 1793|  50.3k|      pos->lineNumber++;
 1794|  50.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  50.3k|#  define MINBPC(enc) 1
  ------------------
 1795|  50.3k|      break;
 1796|   515k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 515k, False: 4.62M]
  ------------------
 1797|   515k|      pos->lineNumber++;
 1798|   515k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   515k|#  define MINBPC(enc) 1
  ------------------
 1799|   515k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   515k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.03M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   515k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 515k, False: 58]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   515k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   515k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 31.0k, False: 484k]
  ------------------
 1800|  31.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  31.0k|#  define MINBPC(enc) 1
  ------------------
 1801|   515k|      pos->columnNumber = 0;
 1802|   515k|      break;
 1803|  4.57M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.57M, False: 569k]
  ------------------
 1804|  4.57M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.57M|#  define MINBPC(enc) 1
  ------------------
 1805|  4.57M|      pos->columnNumber++;
 1806|  4.57M|      break;
 1807|  5.14M|    }
 1808|  5.14M|  }
 1809|  4.63k|}
xmltok.c:normal_isPublicId:
 1450|  1.43k|                   const char **badPtr) {
 1451|  1.43k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
 1452|  1.43k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
 1453|   149k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   149k|#  define MINBPC(enc) 1
  ------------------
 1454|   149k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   149k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   149k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  2.86k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 2.86k, False: 147k]
  ------------------
 1456|  6.52k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 3.65k, False: 146k]
  ------------------
 1457|  7.38k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 861, False: 149k]
  ------------------
 1458|  7.65k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 270, False: 149k]
  ------------------
 1459|  7.99k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 339, False: 149k]
  ------------------
 1460|  8.23k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 238, False: 149k]
  ------------------
 1461|  18.6k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 10.4k, False: 139k]
  ------------------
 1462|  18.8k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 202, False: 149k]
  ------------------
 1463|  26.6k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 7.76k, False: 142k]
  ------------------
 1464|  26.8k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 197, False: 149k]
  ------------------
 1465|  27.1k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 296, False: 149k]
  ------------------
 1466|  27.9k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 852, False: 149k]
  ------------------
 1467|  32.6k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 4.62k, False: 145k]
  ------------------
 1468|  33.1k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 513, False: 149k]
  ------------------
 1469|  33.3k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 244, False: 149k]
  ------------------
 1470|  34.8k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 1.49k, False: 148k]
  ------------------
 1471|  35.0k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 215, False: 149k]
  ------------------
 1472|  35.3k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 224, False: 149k]
  ------------------
 1473|  35.3k|#  ifdef XML_NS
 1474|  35.3k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 149k]
  ------------------
 1475|  35.3k|#  endif
 1476|  35.3k|      break;
 1477|  1.23k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.23k, False: 148k]
  ------------------
 1478|  1.23k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|  1.23k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 1.23k]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.23k|      break;
 1483|  1.23k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 1.17k, False: 148k]
  ------------------
 1484|  87.9k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 86.8k, False: 63.1k]
  ------------------
 1485|  87.9k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  87.9k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 87.9k, False: 0]
  ------------------
 1486|  87.9k|        break;
 1487|       |      /* fall through */
 1488|  25.4k|    default:
  ------------------
  |  Branch (1488:5): [True: 25.4k, False: 124k]
  ------------------
 1489|  25.4k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  25.4k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|  24.5k|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 24.5k, False: 823]
  ------------------
 1491|  25.3k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 814, False: 24.5k]
  ------------------
 1492|  25.3k|        break;
 1493|      9|      default:
  ------------------
  |  Branch (1493:7): [True: 9, False: 25.3k]
  ------------------
 1494|      9|        *badPtr = ptr;
 1495|      9|        return 0;
 1496|  25.4k|      }
 1497|  25.3k|      break;
 1498|   149k|    }
 1499|   149k|  }
 1500|  1.42k|  return 1;
 1501|  1.43k|}
xmltok.c:little2_prologTok:
 1018|  91.9k|                  const char **nextTokPtr) {
 1019|  91.9k|  int tok;
 1020|  91.9k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 276, False: 91.7k]
  ------------------
 1021|    276|    return XML_TOK_NONE;
  ------------------
  |  |   51|    276|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  91.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  91.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  91.7k|    size_t n = end - ptr;
 1024|  91.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  91.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 29.6k, False: 62.0k]
  ------------------
 1025|  29.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  29.6k|#  define MINBPC(enc) 2
  ------------------
 1026|  29.6k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 36, False: 29.6k]
  ------------------
 1027|     36|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  29.6k|      end = ptr + n;
 1029|  29.6k|    }
 1030|  91.7k|  }
 1031|  91.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  91.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  91.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  89.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 89.0k, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.30k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.30k, False: 90.3k]
  ------------------
 1033|  1.30k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.30k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.30k|#  define MINBPC(enc) 2
  ------------------
 1034|  5.40k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 5.40k, False: 86.2k]
  ------------------
 1035|  5.40k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.40k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.40k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.9k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.9k, False: 78.7k]
  ------------------
 1037|  12.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.9k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.9k|    {                                                                          \
  |  |  |  |  135|  12.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 12.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  12.9k|    }
  |  |  ------------------
  ------------------
 1039|  12.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  12.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.9k|  ((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: 8, False: 12.8k]
  |  |  |  |  |  Branch (737:4): [True: 11.0k, False: 1.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.08k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.08k, False: 5.82k]
  ------------------
 1041|  7.08k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.08k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.08k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.41k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.41k, False: 10.4k]
  ------------------
 1043|  2.41k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.41k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.41k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.10k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.10k, False: 11.7k]
  ------------------
 1045|  1.55k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 451, False: 12.4k]
  ------------------
 1046|  3.37k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.82k, False: 11.0k]
  ------------------
 1047|  3.37k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.9k]
  ------------------
 1048|  3.37k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.9k]
  ------------------
 1049|  3.40k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 25, False: 12.8k]
  ------------------
 1050|  3.40k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.40k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.40k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.40k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.9k|    }
 1053|      8|    *nextTokPtr = ptr;
 1054|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.9k|  }
 1056|  4.11k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.11k, False: 87.5k]
  ------------------
 1057|  4.11k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.11k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 82, False: 4.03k]
  ------------------
 1058|     82|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     82|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     82|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     82|    }
 1062|       |    /* fall through */
 1063|  22.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 18.7k, False: 72.9k]
  ------------------
 1064|  27.9k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.17k, False: 86.5k]
  ------------------
 1065|  31.1k|    for (;;) {
 1066|  31.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  31.1k|#  define MINBPC(enc) 2
  ------------------
 1067|  31.1k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  31.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  31.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 158, False: 31.0k]
  ------------------
 1068|    158|        break;
 1069|  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|  29.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 29.6k, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  2.17k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 2.17k, False: 28.8k]
  ------------------
 1071|  2.78k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 608, False: 30.4k]
  ------------------
 1072|  2.78k|        break;
 1073|    456|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 456, False: 30.5k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    456|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    456|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 451, False: 5]
  ------------------
 1076|    451|          break;
 1077|       |        /* fall through */
 1078|  27.7k|      default:
  ------------------
  |  Branch (1078:7): [True: 27.7k, False: 3.23k]
  ------------------
 1079|  27.7k|        *nextTokPtr = ptr;
 1080|  27.7k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  27.7k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  31.0k|      }
 1082|  31.0k|    }
 1083|    158|    *nextTokPtr = ptr;
 1084|    158|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    158|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.24k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.24k, False: 89.4k]
  ------------------
 1086|  2.24k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.24k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.24k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.69k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.69k, False: 88.9k]
  ------------------
 1088|  2.69k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.69k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.69k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.69k|#define XML_TOK_COMMA 38
  ------------------
 1090|    920|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 920, False: 90.7k]
  ------------------
 1091|    920|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    920|#  define MINBPC(enc) 2
  ------------------
 1092|    920|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    920|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    415|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 415, False: 91.2k]
  ------------------
 1094|    415|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    415|#  define MINBPC(enc) 2
  ------------------
 1095|    415|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    415|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    415|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    415|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 412]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    412|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    412|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    412|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 403, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 42, False: 361]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
 1099|     41|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     41|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     41|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 25, False: 16]
  |  |  |  |  |  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|     41|    }
 1104|    410|    *nextTokPtr = ptr;
 1105|    410|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    410|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.26k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.26k, False: 87.4k]
  ------------------
 1107|  4.26k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.26k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.26k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.26k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.12k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.12k, False: 88.5k]
  ------------------
 1110|  3.12k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.12k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.12k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.12k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.12k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.12k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 3.11k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.11k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.11k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.11k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 35, False: 3.08k]
  |  |  |  |  |  Branch (737:4): [True: 3.08k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    316|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 316, False: 2.80k]
  ------------------
 1115|    316|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    316|#  define MINBPC(enc) 2
  ------------------
 1116|    316|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    316|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    195|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 195, False: 2.92k]
  ------------------
 1118|    195|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    195|#  define MINBPC(enc) 2
  ------------------
 1119|    195|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    195|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    206|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 206, False: 2.91k]
  ------------------
 1121|    206|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    206|#  define MINBPC(enc) 2
  ------------------
 1122|    206|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    206|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    251|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 251, False: 2.86k]
  ------------------
 1124|    445|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 194, False: 2.92k]
  ------------------
 1125|    708|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 263, False: 2.85k]
  ------------------
 1126|    846|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 138, False: 2.97k]
  ------------------
 1127|  1.19k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 352, False: 2.76k]
  ------------------
 1128|  1.67k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 476, False: 2.64k]
  ------------------
 1129|  2.36k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 690, False: 2.42k]
  ------------------
 1130|  2.36k|      *nextTokPtr = ptr;
 1131|  2.36k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.36k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.11k|    }
 1133|     35|    *nextTokPtr = ptr;
 1134|     35|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.14k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.14k, False: 89.5k]
  ------------------
 1136|  2.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.14k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.14k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.14k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.23k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.23k, False: 86.4k]
  ------------------
 1139|  5.23k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.23k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.23k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.23k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.51k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.51k, False: 89.1k]
  ------------------
 1142|  2.51k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.51k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.51k|#  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: 91.6k]
  |  |  ------------------
  |  | 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: 91.6k]
  |  |  ------------------
  |  | 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|     93|    LEAD_CASE(4)
  ------------------
  |  | 1144|     22|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 27, False: 91.6k]
  |  |  ------------------
  |  | 1145|     27|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 22]
  |  |  ------------------
  |  | 1146|     22|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     22|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     22|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     22|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     22|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     22|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     22|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     22|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  10.7k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 10.7k, False: 80.9k]
  ------------------
 1168|  17.1k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.32k, False: 85.3k]
  ------------------
 1169|  17.1k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  17.1k|#define XML_TOK_NAME 18
  ------------------
 1170|  17.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  17.1k|#  define MINBPC(enc) 2
  ------------------
 1171|  17.1k|    break;
 1172|    271|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 271, False: 91.4k]
  ------------------
 1173|    474|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 203, False: 91.4k]
  ------------------
 1174|    740|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 266, False: 91.4k]
  ------------------
 1175|    740|#  ifdef XML_NS
 1176|    740|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 91.6k]
  ------------------
 1177|    740|#  endif
 1178|    740|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    740|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    740|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    740|#  define MINBPC(enc) 2
  ------------------
 1180|    740|    break;
 1181|  2.60k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.60k, False: 89.0k]
  ------------------
 1182|  2.60k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  2.60k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  2.60k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.60k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.21k, False: 389]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.21k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.21k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.21k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.21k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.21k|      break;
 1186|  2.21k|    }
 1187|    389|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    389|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    389|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    389|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 344, False: 45]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    344|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    344|#  define MINBPC(enc) 2
  ------------------
 1189|    344|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    344|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    344|      break;
 1191|    344|    }
 1192|       |    /* fall through */
 1193|     63|  default:
  ------------------
  |  Branch (1193:3): [True: 18, False: 91.6k]
  ------------------
 1194|     63|    *nextTokPtr = ptr;
 1195|     63|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     63|#define XML_TOK_INVALID 0
  ------------------
 1196|  91.6k|  }
 1197|  49.4k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  49.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  49.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  49.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  47.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 47.9k, False: 1.45k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   102k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  29.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.42k, False: 47.9k]
  |  |  ------------------
  |  |   82|  29.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.42k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.42k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.42k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 25, False: 1.40k]
  |  |  ------------------
  |  |   83|     25|      *nextTokPtr = ptr;                                                       \
  |  |   84|     25|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     25|    }                                                                          \
  |  |   86|  29.1k|    /* fall through */                                                         \
  |  |   87|  29.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 14.2k, False: 35.1k]
  |  |  ------------------
  |  |   88|  28.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 12.3k, False: 37.0k]
  |  |  ------------------
  |  |   89|  28.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 579, False: 48.8k]
  |  |  ------------------
  |  |   90|  28.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 242, False: 49.1k]
  |  |  ------------------
  |  |   91|  29.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 290, False: 49.1k]
  |  |  ------------------
  |  |   92|  29.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  29.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  29.1k|    break;                                                                     \
  |  |   94|  29.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 49.4k]
  |  |  |  |  ------------------
  |  |  |  |   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: 49.4k]
  |  |  |  |  ------------------
  |  |  |  |   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: 49.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#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;
  |  |  ------------------
  ------------------
 1200|    853|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 853, False: 48.5k]
  ------------------
 1201|  2.14k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.29k, False: 48.1k]
  ------------------
 1202|  2.92k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 783, False: 48.6k]
  ------------------
 1203|  4.20k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.28k, False: 48.1k]
  ------------------
 1204|  4.98k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 779, False: 48.6k]
  ------------------
 1205|  4.98k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 1, False: 49.4k]
  ------------------
 1206|  14.5k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 9.59k, False: 39.8k]
  ------------------
 1207|  15.6k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.07k, False: 48.3k]
  ------------------
 1208|  18.6k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.95k, False: 46.4k]
  ------------------
 1209|  18.6k|      *nextTokPtr = ptr;
 1210|  18.6k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 49.4k]
  ------------------
 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|    390|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 390, False: 49.0k]
  ------------------
 1232|    390|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    390|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 389]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    389|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    389|#  define MINBPC(enc) 2
  ------------------
 1237|    389|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    389|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    793|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 793, False: 48.6k]
  ------------------
 1239|    793|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    793|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 792]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    792|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    792|#  define MINBPC(enc) 2
  ------------------
 1244|    792|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    792|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    418|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 418, False: 48.9k]
  ------------------
 1246|    418|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    418|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 417]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    417|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    417|#  define MINBPC(enc) 2
  ------------------
 1251|    417|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    417|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     11|    default:
  ------------------
  |  Branch (1252:5): [True: 11, False: 49.4k]
  ------------------
 1253|     11|      *nextTokPtr = ptr;
 1254|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1255|  49.4k|    }
 1256|  49.4k|  }
 1257|    127|  return -tok;
 1258|  20.4k|}
xmltok.c:little2_scanLit:
  984|  6.70k|                const char **nextTokPtr) {
  985|  10.1M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  10.1M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  10.1M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.1M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   322k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 322k, False: 9.82M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  10.1M|    switch (t) {
  988|   343k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   171k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   171k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 171k, False: 9.97M]
  |  |  |  |  ------------------
  |  |  |  |   50|   171k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 171k]
  |  |  |  |  ------------------
  |  |  |  |   51|   171k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   171k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   171k|#    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|   171k|    ptr += n;                                                                  \
  |  |  |  |   57|   171k|    break;
  |  |  ------------------
  |  |   63|   171k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 10.1M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 10.1M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 10.1M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  6.37k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 6.37k, False: 10.1M]
  ------------------
  990|  12.1k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.73k, False: 10.1M]
  ------------------
  991|  12.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.1k|#  define MINBPC(enc) 2
  ------------------
  992|  12.1k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 5.51k, False: 6.59k]
  ------------------
  993|  5.51k|        break;
  994|  6.59k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.59k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.59k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 1, False: 6.58k]
  ------------------
  995|      1|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      1|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.58k|      *nextTokPtr = ptr;
  997|  6.58k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.58k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.58k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.55k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  2.05k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.05k, False: 4.53k]
  ------------------
  999|  3.13k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.08k, False: 5.50k]
  ------------------
 1000|  3.76k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 625, False: 5.96k]
  ------------------
 1001|  6.53k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.77k, False: 3.81k]
  ------------------
 1002|  6.54k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 12, False: 6.57k]
  ------------------
 1003|  6.55k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 5, False: 6.58k]
  ------------------
 1004|  6.55k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  6.55k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     37|      default:
  ------------------
  |  Branch (1005:7): [True: 37, False: 6.55k]
  ------------------
 1006|     37|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.58k|      }
 1008|  9.96M|    default:
  ------------------
  |  Branch (1008:5): [True: 9.96M, False: 183k]
  ------------------
 1009|  9.96M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.96M|#  define MINBPC(enc) 2
  ------------------
 1010|  9.96M|      break;
 1011|  10.1M|    }
 1012|  10.1M|  }
 1013|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.70k|}
xmltok.c:little2_scanDecl:
  183|  7.08k|                 const char **nextTokPtr) {
  184|  7.08k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.08k|    {                                                                          \
  |  |  |  |  135|  7.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.08k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 7.07k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  7.08k|    }
  |  |  ------------------
  ------------------
  185|  7.07k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.07k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.07k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.05k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    502|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 502, False: 6.57k]
  ------------------
  187|    502|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    502|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    502|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.07k]
  ------------------
  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|    721|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 721, False: 6.35k]
  ------------------
  192|  6.55k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 5.82k, False: 1.24k]
  ------------------
  193|  6.55k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.55k|#  define MINBPC(enc) 2
  ------------------
  194|  6.55k|    break;
  195|     24|  default:
  ------------------
  |  Branch (195:3): [True: 24, False: 7.05k]
  ------------------
  196|     24|    *nextTokPtr = ptr;
  197|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  198|  7.07k|  }
  199|  43.7k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  43.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  43.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  43.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  43.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 43.6k, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     37|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 37, False: 43.6k]
  ------------------
  202|     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)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     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|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     36|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     36|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     36|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     11|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 29, False: 7]
  |  |  |  |  |  Branch (737:4): [True: 11, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 35]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 35]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 35]
  ------------------
  208|      7|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 4, False: 32]
  ------------------
  209|      7|        *nextTokPtr = ptr;
  210|      7|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  211|     36|      }
  212|       |      /* fall through */
  213|  4.81k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.78k, False: 38.9k]
  ------------------
  214|  5.68k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 877, False: 42.8k]
  ------------------
  215|  6.47k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 788, False: 42.9k]
  ------------------
  216|  6.47k|      *nextTokPtr = ptr;
  217|  6.47k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.47k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  33.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 33.1k, False: 10.5k]
  ------------------
  219|  37.1k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 3.99k, False: 39.7k]
  ------------------
  220|  37.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  37.1k|#  define MINBPC(enc) 2
  ------------------
  221|  37.1k|      break;
  222|     42|    default:
  ------------------
  |  Branch (222:5): [True: 42, False: 43.6k]
  ------------------
  223|     42|      *nextTokPtr = ptr;
  224|     42|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
  225|  43.7k|    }
  226|  43.7k|  }
  227|     23|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.55k|}
xmltok.c:little2_scanComment:
  146|    967|                    const char **nextTokPtr) {
  147|    967|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    967|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    967|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    967|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 956, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    956|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    956|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    956|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 949, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 936, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     20|      *nextTokPtr = ptr;
  150|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  151|     20|    }
  152|    936|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    936|#  define MINBPC(enc) 2
  ------------------
  153|  69.9k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  69.9k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  69.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  69.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.32k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.32k, False: 63.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  4.55k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 69.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 69.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.26k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.23k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.26k, False: 67.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.26k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 2.23k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.23k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.23k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.23k|#    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.23k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.23k|    break;
  |  |  ------------------
  |  |   63|  2.23k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 69.9k]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 69.9k]
  |  |  ------------------
  |  |   65|     37|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 69.9k]
  |  |  ------------------
  |  |   66|     37|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     37|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.51k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.51k, False: 68.4k]
  ------------------
  157|  1.51k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.51k|#  define MINBPC(enc) 2
  ------------------
  158|  1.51k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.51k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.51k|    {                                                                          \
  |  |  |  |  135|  1.51k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.51k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.51k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.51k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.51k|    }
  |  |  ------------------
  ------------------
  159|  1.51k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.13k, False: 375]
  |  |  |  |  |  Branch (739:52): [True: 803, False: 335]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    803|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    803|#  define MINBPC(enc) 2
  ------------------
  161|    803|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    803|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    803|    {                                                                          \
  |  |  |  |  135|    803|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    803|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    803|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 802]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    803|    }
  |  |  ------------------
  ------------------
  162|    802|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    802|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    802|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 794, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 785, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     17|            *nextTokPtr = ptr;
  164|     17|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  165|     17|          }
  166|    785|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    785|#  define MINBPC(enc) 2
  ------------------
  167|    785|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    785|#define XML_TOK_COMMENT 13
  ------------------
  168|    802|        }
  169|    710|        break;
  170|  66.1k|      default:
  ------------------
  |  Branch (170:7): [True: 66.1k, False: 3.82k]
  ------------------
  171|  66.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  66.1k|#  define MINBPC(enc) 2
  ------------------
  172|  66.1k|        break;
  173|  69.9k|      }
  174|  69.9k|    }
  175|    936|  }
  176|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    967|}
xmltok.c:little2_scanPi:
  277|  4.52k|               const char **nextTokPtr) {
  278|  4.52k|  int tok;
  279|  4.52k|  const char *target = ptr;
  280|  4.52k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.52k|    {                                                                          \
  |  |  |  |  135|  4.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 4.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  4.52k|    }
  |  |  ------------------
  ------------------
  281|  4.50k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.50k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.50k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.35k, False: 1.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  4.75k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.46k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.12k, False: 3.38k]
  |  |  ------------------
  |  |  111|  4.46k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.12k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.12k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.12k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.11k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  4.46k|    /* fall through */                                                         \
  |  |  116|  4.46k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.47k, False: 2.03k]
  |  |  ------------------
  |  |  117|  4.46k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 882, False: 3.62k]
  |  |  ------------------
  |  |  118|  4.46k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.46k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.46k|    break;                                                                     \
  |  |  120|  4.46k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.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: 4.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|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 4.48k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 4.50k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  4.50k|  }
  287|  38.7k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  38.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  38.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  38.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.1k, False: 27.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   161k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  34.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 27.5k, False: 11.2k]
  |  |  ------------------
  |  |   82|  34.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  27.5k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  27.5k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  27.5k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 27.4k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  34.3k|    /* fall through */                                                         \
  |  |   87|  34.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.95k, False: 33.7k]
  |  |  ------------------
  |  |   88|  33.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.18k, False: 37.5k]
  |  |  ------------------
  |  |   89|  33.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 254, False: 38.4k]
  |  |  ------------------
  |  |   90|  34.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 209, False: 38.5k]
  |  |  ------------------
  |  |   91|  34.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 217, False: 38.4k]
  |  |  ------------------
  |  |   92|  34.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  34.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  34.3k|    break;                                                                     \
  |  |   94|  34.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 38.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 38.6k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  290|    924|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 924, False: 37.7k]
  ------------------
  291|  1.69k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 767, False: 37.9k]
  ------------------
  292|  2.15k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 466, False: 38.2k]
  ------------------
  293|  2.15k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.15k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.15k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.15k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.15k|#  define MINBPC(enc) 2
  ------------------
  298|  61.0k|      while (HAS_CHAR(enc, ptr, end)) {
  299|  61.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  61.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  61.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.29k, False: 52.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  4.03k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 61.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: 61.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|  2.02k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.99k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.02k, False: 59.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.02k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 1.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.99k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.99k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.99k|    break;
  |  |  ------------------
  |  |   63|  1.99k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 61.0k]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 61.0k]
  |  |  ------------------
  |  |   65|     17|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 61.0k]
  |  |  ------------------
  |  |   66|     17|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  2.64k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 2.64k, False: 58.4k]
  ------------------
  302|  2.64k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.64k|#  define MINBPC(enc) 2
  ------------------
  303|  2.64k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.64k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.64k|    {                                                                          \
  |  |  |  |  135|  2.64k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.64k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  2.64k|    }
  |  |  ------------------
  ------------------
  304|  2.63k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.63k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.63k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.36k, False: 270]
  |  |  |  |  |  Branch (739:52): [True: 1.98k, False: 385]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  1.98k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.98k|#  define MINBPC(enc) 2
  ------------------
  306|  1.98k|            return tok;
  307|  1.98k|          }
  308|    655|          break;
  309|  56.3k|        default:
  ------------------
  |  Branch (309:9): [True: 56.3k, False: 4.68k]
  ------------------
  310|  56.3k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  56.3k|#  define MINBPC(enc) 2
  ------------------
  311|  56.3k|          break;
  312|  61.0k|        }
  313|  61.0k|      }
  314|    120|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    120|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.19k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.19k, False: 36.5k]
  ------------------
  316|  2.19k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.19k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 3, False: 2.18k]
  ------------------
  317|      3|        *nextTokPtr = ptr;
  318|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  319|      3|      }
  320|  2.18k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.18k|#  define MINBPC(enc) 2
  ------------------
  321|  2.18k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.18k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.18k|    {                                                                          \
  |  |  |  |  135|  2.18k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.18k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.18k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 2.15k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|  2.18k|    }
  |  |  ------------------
  ------------------
  322|  2.15k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.13k, False: 17]
  |  |  |  |  |  Branch (739:52): [True: 2.12k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.12k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.12k|#  define MINBPC(enc) 2
  ------------------
  324|  2.12k|        return tok;
  325|  2.12k|      }
  326|       |      /* fall through */
  327|     38|    default:
  ------------------
  |  Branch (327:5): [True: 9, False: 38.7k]
  ------------------
  328|     38|      *nextTokPtr = ptr;
  329|     38|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     38|#define XML_TOK_INVALID 0
  ------------------
  330|  38.7k|    }
  331|  38.7k|  }
  332|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.46k|}
xmltok.c:little2_checkPiTarget:
  232|  4.34k|                      int *tokPtr) {
  233|  4.34k|  int upper = 0;
  234|  4.34k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.34k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.34k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.34k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.34k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  4.34k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.78k, False: 2.56k]
  ------------------
  237|  1.78k|    return 1;
  238|  2.56k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.56k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.56k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.91k, False: 650]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    941|  case ASCII_x:
  ------------------
  |  |   86|    941|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 941, False: 1.62k]
  ------------------
  240|    941|    break;
  241|    848|  case ASCII_X:
  ------------------
  |  |   59|    848|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 848, False: 1.72k]
  ------------------
  242|    848|    upper = 1;
  243|    848|    break;
  244|    779|  default:
  ------------------
  |  Branch (244:3): [True: 779, False: 1.78k]
  ------------------
  245|    779|    return 1;
  246|  2.56k|  }
  247|  1.78k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.78k|#  define MINBPC(enc) 2
  ------------------
  248|  1.78k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.78k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.78k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.37k, False: 410]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    740|  case ASCII_m:
  ------------------
  |  |   75|    740|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 740, False: 1.04k]
  ------------------
  250|    740|    break;
  251|    618|  case ASCII_M:
  ------------------
  |  |   48|    618|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 618, False: 1.17k]
  ------------------
  252|    618|    upper = 1;
  253|    618|    break;
  254|    431|  default:
  ------------------
  |  Branch (254:3): [True: 431, False: 1.35k]
  ------------------
  255|    431|    return 1;
  256|  1.78k|  }
  257|  1.35k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
  258|  1.35k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.35k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.35k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 808, False: 550]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     39|  case ASCII_l:
  ------------------
  |  |   74|     39|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 39, False: 1.31k]
  ------------------
  260|     39|    break;
  261|      3|  case ASCII_L:
  ------------------
  |  |   47|      3|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 3, False: 1.35k]
  ------------------
  262|      3|    upper = 1;
  263|      3|    break;
  264|  1.31k|  default:
  ------------------
  |  Branch (264:3): [True: 1.31k, False: 42]
  ------------------
  265|  1.31k|    return 1;
  266|  1.35k|  }
  267|     42|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 38]
  ------------------
  268|      4|    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|     42|}
xmltok.c:little2_scanPercent:
  924|  2.24k|                    const char **nextTokPtr) {
  925|  2.24k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.24k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.24k|    {                                                                          \
  |  |  |  |  135|  2.24k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.24k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.24k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 19, False: 2.22k]
  |  |  |  |  ------------------
  |  |  |  |  136|     19|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     19|      }                                                                        \
  |  |  |  |  138|  2.24k|    }
  |  |  ------------------
  ------------------
  926|  2.22k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.22k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.22k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.92k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.92k, False: 302]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.00k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.30k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 280, False: 1.94k]
  |  |  ------------------
  |  |  111|  1.30k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    280|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    280|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    280|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 266]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.30k|    /* fall through */                                                         \
  |  |  116|  1.30k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 434, False: 1.79k]
  |  |  ------------------
  |  |  117|  1.30k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 604, False: 1.62k]
  |  |  ------------------
  |  |  118|  1.30k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.30k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.30k|    break;                                                                     \
  |  |  120|  1.30k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.22k]
  |  |  |  |  ------------------
  |  |  |  |  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.22k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 2.21k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    562|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 562, False: 1.66k]
  ------------------
  929|    674|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 112, False: 2.11k]
  ------------------
  930|    883|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 209, False: 2.01k]
  ------------------
  931|    886|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.22k]
  ------------------
  932|    886|    *nextTokPtr = ptr;
  933|    886|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    886|#define XML_TOK_PERCENT 22
  ------------------
  934|      8|  default:
  ------------------
  |  Branch (934:3): [True: 8, False: 2.22k]
  ------------------
  935|      8|    *nextTokPtr = ptr;
  936|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  937|  2.22k|  }
  938|  2.97k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.97k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.97k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.97k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.66k, False: 313]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.90k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.74k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 296, False: 2.68k]
  |  |  ------------------
  |  |   82|  1.74k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    296|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    296|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    296|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 27, False: 269]
  |  |  ------------------
  |  |   83|     27|      *nextTokPtr = ptr;                                                       \
  |  |   84|     27|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     27|    }                                                                          \
  |  |   86|  1.74k|    /* fall through */                                                         \
  |  |   87|  1.74k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 403, False: 2.57k]
  |  |  ------------------
  |  |   88|  1.05k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 386, False: 2.59k]
  |  |  ------------------
  |  |   89|  1.31k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 255, False: 2.72k]
  |  |  ------------------
  |  |   90|  1.54k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 236, False: 2.74k]
  |  |  ------------------
  |  |   91|  1.74k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 2.78k]
  |  |  ------------------
  |  |   92|  1.74k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.74k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.74k|    break;                                                                     \
  |  |   94|  1.74k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.97k]
  |  |  |  |  ------------------
  |  |  |  |   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.97k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 2.96k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    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|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.18k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.18k, False: 1.78k]
  ------------------
  942|  1.18k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.18k|#  define MINBPC(enc) 2
  ------------------
  943|  1.18k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.18k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|      8|    default:
  ------------------
  |  Branch (944:5): [True: 8, False: 2.96k]
  ------------------
  945|      8|      *nextTokPtr = ptr;
  946|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  947|  2.97k|    }
  948|  2.97k|  }
  949|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.30k|}
xmltok.c:little2_scanPoundName:
  954|  2.51k|                      const char **nextTokPtr) {
  955|  2.51k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.51k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.51k|    {                                                                          \
  |  |  |  |  135|  2.51k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.51k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.51k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.51k|    }
  |  |  ------------------
  ------------------
  956|  2.50k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.50k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.50k|  ((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: 114]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.87k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.47k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 90, False: 2.41k]
  |  |  ------------------
  |  |  111|  2.47k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     90|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     90|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     90|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 78]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.47k|    /* fall through */                                                         \
  |  |  116|  2.47k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.67k, False: 837]
  |  |  ------------------
  |  |  117|  2.47k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 721, False: 1.78k]
  |  |  ------------------
  |  |  118|  2.47k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.47k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.47k|    break;                                                                     \
  |  |  120|  2.47k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.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: 2.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|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 2.49k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 2.50k]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|  2.50k|  }
  962|  16.7k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  16.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  16.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 16.2k, False: 523]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  50.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  14.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 509, False: 16.2k]
  |  |  ------------------
  |  |   82|  14.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    509|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    509|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    509|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 30, False: 479]
  |  |  ------------------
  |  |   83|     30|      *nextTokPtr = ptr;                                                       \
  |  |   84|     30|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     30|    }                                                                          \
  |  |   86|  14.3k|    /* fall through */                                                         \
  |  |   87|  14.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.67k, False: 9.08k]
  |  |  ------------------
  |  |   88|  13.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 5.61k, False: 11.1k]
  |  |  ------------------
  |  |   89|  13.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 16.5k]
  |  |  ------------------
  |  |   90|  14.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 16.5k]
  |  |  ------------------
  |  |   91|  14.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 16.5k]
  |  |  ------------------
  |  |   92|  14.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  14.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  14.3k|    break;                                                                     \
  |  |   94|  14.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 16.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 16.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 16.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    551|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 551, False: 16.2k]
  ------------------
  966|    777|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 226, False: 16.5k]
  ------------------
  967|  1.81k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 1.03k, False: 15.7k]
  ------------------
  968|  1.91k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 98, False: 16.6k]
  ------------------
  969|  2.29k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 380, False: 16.3k]
  ------------------
  970|  2.29k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 16.7k]
  ------------------
  971|  2.36k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 67, False: 16.6k]
  ------------------
  972|  2.36k|      *nextTokPtr = ptr;
  973|  2.36k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.36k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     10|    default:
  ------------------
  |  Branch (974:5): [True: 10, False: 16.7k]
  ------------------
  975|     10|      *nextTokPtr = ptr;
  976|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  977|  16.7k|    }
  978|  16.7k|  }
  979|     60|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     60|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.47k|}
xmltok.c:little2_contentTok:
  824|  68.8k|                   const char **nextTokPtr) {
  825|  68.8k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.05k, False: 67.7k]
  ------------------
  826|  1.05k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.05k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  67.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  67.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  67.7k|    size_t n = end - ptr;
  829|  67.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  67.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 24.1k, False: 43.6k]
  ------------------
  830|  24.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  24.1k|#  define MINBPC(enc) 2
  ------------------
  831|  24.1k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 93, False: 24.0k]
  ------------------
  832|     93|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     93|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  24.0k|      end = ptr + n;
  834|  24.0k|    }
  835|  67.7k|  }
  836|  67.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  67.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  67.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  57.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 57.5k, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  16.6k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 16.6k, False: 51.0k]
  ------------------
  838|  16.6k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  16.6k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  16.6k|#  define MINBPC(enc) 2
  ------------------
  839|  11.4k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 11.4k, False: 56.2k]
  ------------------
  840|  11.4k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  11.4k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  11.4k|#  define MINBPC(enc) 2
  ------------------
  841|  9.27k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 9.27k, False: 58.4k]
  ------------------
  842|  9.27k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.27k|#  define MINBPC(enc) 2
  ------------------
  843|  9.27k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.27k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.27k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.27k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 15, False: 9.25k]
  ------------------
  844|     15|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     15|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  9.25k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  9.25k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.25k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.40k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.40k, False: 4.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 808, False: 8.44k]
  ------------------
  846|    808|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    808|#  define MINBPC(enc) 2
  ------------------
  847|  9.25k|    *nextTokPtr = ptr;
  848|  9.25k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.25k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  7.59k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 7.59k, False: 60.0k]
  ------------------
  850|  7.59k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.59k|#  define MINBPC(enc) 2
  ------------------
  851|  7.59k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.59k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  6.50k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 6.50k, False: 61.1k]
  ------------------
  853|  6.50k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.50k|#  define MINBPC(enc) 2
  ------------------
  854|  6.50k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.50k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.50k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 3, False: 6.50k]
  ------------------
  855|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  6.50k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  6.50k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.50k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.45k, False: 2.05k]
  |  |  |  |  |  Branch (739:52): [True: 3.59k, False: 856]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  2.90k|      break;
  858|  3.59k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.59k|#  define MINBPC(enc) 2
  ------------------
  859|  3.59k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.59k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.59k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 8, False: 3.58k]
  ------------------
  860|      8|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      8|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  3.58k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  3.58k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.58k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.22k, False: 2.36k]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  3.58k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  3.58k|#  define MINBPC(enc) 2
  ------------------
  863|  3.58k|      break;
  864|  3.58k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  4.94k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 67.6k]
  |  |  |  |  ------------------
  |  |  |  |   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: 67.6k]
  |  |  |  |  ------------------
  |  |  |  |   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.45k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.40k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.45k, False: 65.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.45k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 48, False: 2.40k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.40k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     48|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.40k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.40k|#    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.40k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.40k|    break;
  |  |  ------------------
  |  |   63|  2.40k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 44, False: 67.6k]
  |  |  ------------------
  |  |   64|     44|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 67.6k]
  |  |  ------------------
  |  |   65|     55|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 67.6k]
  |  |  ------------------
  |  |   66|     55|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     55|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     55|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  13.7k|  default:
  ------------------
  |  Branch (868:3): [True: 13.7k, False: 53.9k]
  ------------------
  869|  13.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.7k|#  define MINBPC(enc) 2
  ------------------
  870|  13.7k|    break;
  871|  67.6k|  }
  872|  1.65M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.65M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.65M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.65M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  83.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 83.4k, False: 1.57M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.65M]
  |  |  ------------------
  |  |  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.65M]
  |  |  ------------------
  |  |  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|  25.1k|      LEAD_CASE(4)
  ------------------
  |  |  875|  25.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 25.1k, False: 1.63M]
  |  |  ------------------
  |  |  876|  25.1k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  25.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 44, False: 25.0k]
  |  |  ------------------
  |  |  877|     44|      *nextTokPtr = ptr;                                                       \
  |  |  878|     44|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     44|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     44|    }                                                                          \
  |  |  880|  25.0k|    ptr += n;                                                                  \
  |  |  881|  25.0k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  13.2k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 13.2k, False: 1.64M]
  ------------------
  887|  13.2k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  13.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  13.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 13.2k, False: 1]
  |  |  ------------------
  ------------------
  888|  13.2k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  13.2k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  13.2k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.19k, False: 7.06k]
  |  |  |  |  |  Branch (739:52): [True: 3.14k, False: 3.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  10.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.1k|#  define MINBPC(enc) 2
  ------------------
  890|  10.1k|          break;
  891|  10.1k|        }
  892|  3.14k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.14k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  3.14k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.13k, False: 6]
  |  |  ------------------
  ------------------
  893|  3.13k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  3.13k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.13k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.16k, False: 1.96k]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.13k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.13k|#  define MINBPC(enc) 2
  ------------------
  895|  3.13k|            break;
  896|  3.13k|          }
  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|  3.13k|        }
  900|  3.14k|      }
  901|       |      /* fall through */
  902|  4.73k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 4.72k, False: 1.65M]
  ------------------
  903|  9.07k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 4.34k, False: 1.65M]
  ------------------
  904|  9.11k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 36, False: 1.65M]
  ------------------
  905|  9.11k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.65M]
  ------------------
  906|  9.12k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 7, False: 1.65M]
  ------------------
  907|  15.9k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 6.83k, False: 1.64M]
  ------------------
  908|  22.2k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 6.31k, False: 1.64M]
  ------------------
  909|  22.2k|      *nextTokPtr = ptr;
  910|  22.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  1.59M|    default:
  ------------------
  |  Branch (911:5): [True: 1.59M, False: 60.6k]
  ------------------
  912|  1.59M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.59M|#  define MINBPC(enc) 2
  ------------------
  913|  1.59M|      break;
  914|  1.65M|    }
  915|  1.65M|  }
  916|    328|  *nextTokPtr = ptr;
  917|    328|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    328|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  22.6k|}
xmltok.c:little2_scanLt:
  726|  16.6k|               const char **nextTokPtr) {
  727|  16.6k|#  ifdef XML_NS
  728|  16.6k|  int hadColon;
  729|  16.6k|#  endif
  730|  16.6k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.6k|    {                                                                          \
  |  |  |  |  135|  16.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  16.6k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 16.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  16.6k|    }
  |  |  ------------------
  ------------------
  731|  16.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  16.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.8k, False: 3.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  12.3k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.74k, False: 12.8k]
  |  |  ------------------
  |  |  111|  11.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.74k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.74k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.74k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 20, False: 3.72k]
  |  |  ------------------
  |  |  112|     20|      *nextTokPtr = ptr;                                                       \
  |  |  113|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     20|    }                                                                          \
  |  |  115|  11.3k|    /* fall through */                                                         \
  |  |  116|  11.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.83k, False: 11.7k]
  |  |  ------------------
  |  |  117|  11.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.79k, False: 13.8k]
  |  |  ------------------
  |  |  118|  11.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  11.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.3k|    break;                                                                     \
  |  |  120|  11.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 16.6k]
  |  |  |  |  ------------------
  |  |  |  |  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: 16.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     27|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 27, False: 16.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 22]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     22|    }                                                                          \
  |  |  |  |  106|     22|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.19k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.19k, False: 15.4k]
  ------------------
  734|  1.19k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.19k|#  define MINBPC(enc) 2
  ------------------
  735|  1.19k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.19k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.19k|    {                                                                          \
  |  |  |  |  135|  1.19k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.19k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.19k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.19k|    }
  |  |  ------------------
  ------------------
  736|  1.19k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.19k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.19k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 24, False: 1.16k]
  |  |  |  |  |  Branch (737:4): [True: 1.17k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    465|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 465, False: 727]
  ------------------
  738|    465|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    465|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    465|#  define MINBPC(enc) 2
  ------------------
  739|    703|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 703, False: 489]
  ------------------
  740|    703|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    703|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    703|#  define MINBPC(enc) 2
  ------------------
  741|  1.19k|    }
  742|     24|    *nextTokPtr = ptr;
  743|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  744|  2.10k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.10k, False: 14.5k]
  ------------------
  745|  2.10k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.10k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.10k|#  define MINBPC(enc) 2
  ------------------
  746|  1.89k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.89k, False: 14.7k]
  ------------------
  747|  1.89k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.89k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.89k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 16.6k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  16.6k|  }
  752|  11.3k|#  ifdef XML_NS
  753|  11.3k|  hadColon = 0;
  754|  11.3k|#  endif
  755|       |  /* we have a start-tag */
  756|  1.26M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  1.26M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.26M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.26M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.2k, False: 1.24M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  6.24M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.24M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.24M, False: 14.3k]
  |  |  ------------------
  |  |   82|  1.24M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.24M|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.24M|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.24M|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 1.24M]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.24M|    /* fall through */                                                         \
  |  |   87|  1.24M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.43k, False: 1.25M]
  |  |  ------------------
  |  |   88|  1.24M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 696, False: 1.26M]
  |  |  ------------------
  |  |   89|  1.24M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 309, False: 1.26M]
  |  |  ------------------
  |  |   90|  1.24M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 287, False: 1.26M]
  |  |  ------------------
  |  |   91|  1.24M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 308, False: 1.26M]
  |  |  ------------------
  |  |   92|  1.24M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.24M|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.24M|    break;                                                                     \
  |  |   94|  1.24M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.26M]
  |  |  |  |  ------------------
  |  |  |  |   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.26M]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 1.26M]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    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|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 1.26M]
  ------------------
  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.67k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.67k, False: 1.25M]
  ------------------
  777|  2.87k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.20k, False: 1.25M]
  ------------------
  778|  5.23k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.35k, False: 1.25M]
  ------------------
  779|  5.23k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.23k|#  define MINBPC(enc) 2
  ------------------
  780|  6.55k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  6.55k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.55k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.55k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.53k, False: 1.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.31k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.00k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 998, False: 5.56k]
  |  |  ------------------
  |  |  111|  3.00k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    998|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    998|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    998|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 987]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  3.00k|    /* fall through */                                                         \
  |  |  116|  3.00k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.29k, False: 5.26k]
  |  |  ------------------
  |  |  117|  3.00k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 727, False: 5.83k]
  |  |  ------------------
  |  |  118|  3.00k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  3.00k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.00k|    break;                                                                     \
  |  |  120|  3.00k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.55k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6.55k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6.53k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  783|  1.84k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.84k, False: 4.71k]
  ------------------
  784|  1.84k|          goto gt;
  785|    301|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 301, False: 6.25k]
  ------------------
  786|    301|          goto sol;
  787|    408|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 408, False: 6.15k]
  ------------------
  788|    796|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 388, False: 6.17k]
  ------------------
  789|  1.36k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 570, False: 5.98k]
  ------------------
  790|  1.36k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.36k|#  define MINBPC(enc) 2
  ------------------
  791|  1.36k|          continue;
  792|     10|        default:
  ------------------
  |  Branch (792:9): [True: 10, False: 6.54k]
  ------------------
  793|     10|          *nextTokPtr = ptr;
  794|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  795|  6.55k|        }
  796|  3.00k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  3.00k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  6.55k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  5.23k|    }
  800|  5.61k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.61k, False: 1.25M]
  ------------------
  801|  7.45k|    gt:
  802|  7.45k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.45k|#  define MINBPC(enc) 2
  ------------------
  803|  7.45k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  7.45k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    406|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 406, False: 1.26M]
  ------------------
  805|    707|    sol:
  806|    707|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    707|#  define MINBPC(enc) 2
  ------------------
  807|    707|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    707|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    707|    {                                                                          \
  |  |  |  |  135|    707|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    707|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    707|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 695]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    707|    }
  |  |  ------------------
  ------------------
  808|    695|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    695|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    695|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 685, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 671, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     24|        *nextTokPtr = ptr;
  810|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  811|     24|      }
  812|    671|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    671|#  define MINBPC(enc) 2
  ------------------
  813|    671|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    671|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      9|    default:
  ------------------
  |  Branch (814:5): [True: 9, False: 1.26M]
  ------------------
  815|      9|      *nextTokPtr = ptr;
  816|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  817|  1.26M|    }
  818|  1.26M|  }
  819|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.3k|}
xmltok.c:little2_scanCdataSection:
  337|    703|                         const char **nextTokPtr) {
  338|    703|  static const char CDATA_LSQB[]
  339|    703|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    703|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    703|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    703|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    703|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    703|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    703|#define ASCII_LSQB 0x5B
  ------------------
  340|    703|  int i;
  341|    703|  UNUSED_P(enc);
  ------------------
  |  |  135|    703|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    703|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    703|    {                                                                          \
  |  |  135|    703|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    703|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    703|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 6, False: 697]
  |  |  ------------------
  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      6|      }                                                                        \
  |  |  138|    703|    }
  ------------------
  344|  4.82k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.12k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 4.14k, False: 682]
  ------------------
  345|  4.14k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  4.14k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.14k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.13k, False: 12]
  |  |  |  |  |  Branch (739:52): [True: 4.12k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     15|      *nextTokPtr = ptr;
  347|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  348|     15|    }
  349|  4.14k|  }
  350|    682|  *nextTokPtr = ptr;
  351|    682|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    682|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    697|}
xmltok.c:little2_scanEndTag:
  432|  1.89k|                   const char **nextTokPtr) {
  433|  1.89k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.89k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.89k|    {                                                                          \
  |  |  |  |  135|  1.89k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.89k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.89k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.89k|    }
  |  |  ------------------
  ------------------
  434|  1.89k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.89k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.89k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.48k, False: 414]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.36k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.87k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 395, False: 1.50k]
  |  |  ------------------
  |  |  111|  1.87k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    395|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    395|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    395|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 394]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.87k|    /* fall through */                                                         \
  |  |  116|  1.87k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 554, False: 1.34k]
  |  |  ------------------
  |  |  117|  1.87k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 928, False: 968]
  |  |  ------------------
  |  |  118|  1.87k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.87k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.87k|    break;                                                                     \
  |  |  120|  1.87k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.89k]
  |  |  |  |  ------------------
  |  |  |  |  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.89k]
  |  |  |  |  ------------------
  |  |  |  |  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.88k]
  |  |  |  |  ------------------
  |  |  |  |  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.89k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.89k|  }
  440|  3.53k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.53k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.53k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.53k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.79k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.79k, False: 734]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.62k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.71k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 711, False: 2.82k]
  |  |  ------------------
  |  |   82|  1.71k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    711|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    711|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    711|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 691]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  1.71k|    /* fall through */                                                         \
  |  |   87|  1.71k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 205, False: 3.32k]
  |  |  ------------------
  |  |   88|  1.13k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 239, False: 3.29k]
  |  |  ------------------
  |  |   89|  1.32k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 194, False: 3.33k]
  |  |  ------------------
  |  |   90|  1.52k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 3.33k]
  |  |  ------------------
  |  |   91|  1.71k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 3.33k]
  |  |  ------------------
  |  |   92|  1.71k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.71k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.71k|    break;                                                                     \
  |  |   94|  1.71k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.53k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.53k]
  |  |  |  |  ------------------
  |  |  |  |   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|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 3.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    362|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 362, False: 3.17k]
  ------------------
  444|    857|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 495, False: 3.03k]
  ------------------
  445|  1.47k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 616, False: 2.91k]
  ------------------
  446|  2.33k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.47k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    905|#  define MINBPC(enc) 2
  ------------------
  447|  2.33k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.33k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.33k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.31k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    334|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 334, False: 1.99k]
  ------------------
  449|    703|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 369, False: 1.96k]
  ------------------
  450|    905|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 202, False: 2.13k]
  ------------------
  451|    905|          break;
  452|  1.40k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.40k, False: 927]
  ------------------
  453|  1.40k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.40k|#  define MINBPC(enc) 2
  ------------------
  454|  1.40k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.40k|#define XML_TOK_END_TAG 5
  ------------------
  455|     22|        default:
  ------------------
  |  Branch (455:9): [True: 22, False: 2.31k]
  ------------------
  456|     22|          *nextTokPtr = ptr;
  457|     22|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  458|  2.33k|        }
  459|  2.33k|      }
  460|     46|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     46|#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.53k]
  ------------------
  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|    297|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 297, False: 3.23k]
  ------------------
  469|    297|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    297|#  define MINBPC(enc) 2
  ------------------
  470|    297|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    297|#define XML_TOK_END_TAG 5
  ------------------
  471|      7|    default:
  ------------------
  |  Branch (471:5): [True: 7, False: 3.52k]
  ------------------
  472|      7|      *nextTokPtr = ptr;
  473|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  474|  3.53k|    }
  475|  3.53k|  }
  476|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.87k|}
xmltok.c:little2_scanAtts:
  573|  3.00k|                 const char **nextTokPtr) {
  574|  3.00k|#  ifdef XML_NS
  575|  3.00k|  int hadColon = 0;
  576|  3.00k|#  endif
  577|   370k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   370k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   370k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   370k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   367k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 367k, False: 2.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  22.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  5.65k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 2.38k, False: 367k]
  |  |  ------------------
  |  |   82|  5.65k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  2.38k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  2.38k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.38k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 2.36k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  5.65k|    /* fall through */                                                         \
  |  |   87|  5.65k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.20k, False: 367k]
  |  |  ------------------
  |  |   88|  5.04k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 472, False: 369k]
  |  |  ------------------
  |  |   89|  5.26k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 219, False: 369k]
  |  |  ------------------
  |  |   90|  5.45k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 369k]
  |  |  ------------------
  |  |   91|  5.65k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 369k]
  |  |  ------------------
  |  |   92|  5.65k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  5.65k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  5.65k|    break;                                                                     \
  |  |   94|  5.65k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 370k]
  |  |  |  |  ------------------
  |  |  |  |   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: 370k]
  |  |  |  |  ------------------
  |  |  |  |   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: 370k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 370k]
  ------------------
  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|    353|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 353, False: 369k]
  ------------------
  598|    962|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 609, False: 369k]
  ------------------
  599|  1.84k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 881, False: 369k]
  ------------------
  600|  3.39k|      for (;;) {
  601|  3.39k|        int t;
  602|       |
  603|  3.39k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.39k|#  define MINBPC(enc) 2
  ------------------
  604|  3.39k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.39k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.39k|    {                                                                          \
  |  |  |  |  135|  3.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.39k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 3.35k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|  3.39k|    }
  |  |  ------------------
  ------------------
  605|  3.35k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  3.35k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.35k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.34k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.34k, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  3.35k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.78k, False: 1.57k]
  ------------------
  607|  1.78k|          break;
  608|  1.57k|        switch (t) {
  609|    457|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 457, False: 1.11k]
  ------------------
  610|  1.32k|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 872, False: 700]
  ------------------
  611|  1.55k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 227, False: 1.34k]
  ------------------
  612|  1.55k|          break;
  613|     16|        default:
  ------------------
  |  Branch (613:9): [True: 16, False: 1.55k]
  ------------------
  614|     16|          *nextTokPtr = ptr;
  615|     16|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  616|  1.57k|        }
  617|  1.57k|      }
  618|       |      /* fall through */
  619|   364k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 362k, False: 7.52k]
  ------------------
  620|   364k|      int open;
  621|   364k|#  ifdef XML_NS
  622|   364k|      hadColon = 0;
  623|   364k|#  endif
  624|   365k|      for (;;) {
  625|   365k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   365k|#  define MINBPC(enc) 2
  ------------------
  626|   365k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   365k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   365k|    {                                                                          \
  |  |  |  |  135|   365k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   365k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   365k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 365k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   365k|    }
  |  |  ------------------
  ------------------
  627|   365k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   365k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   365k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   365k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 365k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   365k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 8.40k, False: 356k]
  |  Branch (628:32): [True: 355k, False: 907]
  ------------------
  629|   364k|          break;
  630|    907|        switch (open) {
  631|    232|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 232, False: 675]
  ------------------
  632|    658|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 426, False: 481]
  ------------------
  633|    880|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 222, False: 685]
  ------------------
  634|    880|          break;
  635|     27|        default:
  ------------------
  |  Branch (635:9): [True: 27, False: 880]
  ------------------
  636|     27|          *nextTokPtr = ptr;
  637|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  638|    907|        }
  639|    907|      }
  640|   364k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   364k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  6.47M|      for (;;) {
  643|  6.47M|        int t;
  644|  6.47M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.47M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.47M|    {                                                                          \
  |  |  |  |  135|  6.47M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.47M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.47M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 58, False: 6.47M]
  |  |  |  |  ------------------
  |  |  |  |  136|     58|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     58|      }                                                                        \
  |  |  |  |  138|  6.47M|    }
  |  |  ------------------
  ------------------
  645|  6.47M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  6.47M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.47M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.75M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.75M, False: 4.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  6.47M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 364k, False: 6.11M]
  ------------------
  647|   364k|          break;
  648|  6.11M|        switch (t) {
  649|   165k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.11M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 6.11M]
  |  |  |  |  ------------------
  |  |  |  |   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|  82.7k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  82.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 82.7k, False: 6.03M]
  |  |  |  |  ------------------
  |  |  |  |   50|  82.7k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 25, False: 82.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  82.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     25|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  82.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  82.7k|#    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|  82.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  82.7k|    break;
  |  |  ------------------
  |  |   63|  82.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 18, False: 6.11M]
  |  |  ------------------
  |  |   64|     18|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 6.11M]
  |  |  ------------------
  |  |   65|     24|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 6.11M]
  |  |  ------------------
  |  |   66|     24|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     24|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  57.0k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 57.0k, False: 6.05M]
  ------------------
  651|  57.0k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  57.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  57.0k|#  define MINBPC(enc) 2
  ------------------
  652|  57.0k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 14, False: 57.0k]
  ------------------
  653|     14|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 7, False: 7]
  ------------------
  654|      7|              *nextTokPtr = ptr;
  655|     14|            return tok;
  656|     14|          }
  657|  57.0k|          break;
  658|  57.0k|        }
  659|  57.0k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 2, False: 6.11M]
  ------------------
  660|      2|          *nextTokPtr = ptr;
  661|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  662|  5.97M|        default:
  ------------------
  |  Branch (662:9): [True: 5.97M, False: 139k]
  ------------------
  663|  5.97M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.97M|#  define MINBPC(enc) 2
  ------------------
  664|  5.97M|          break;
  665|  6.11M|        }
  666|  6.11M|      }
  667|   364k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   364k|#  define MINBPC(enc) 2
  ------------------
  668|   364k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   364k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   364k|    {                                                                          \
  |  |  |  |  135|   364k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   364k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   364k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 364k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   364k|    }
  |  |  ------------------
  ------------------
  669|   364k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   364k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   364k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   364k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 364k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   356k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 356k, False: 7.52k]
  ------------------
  671|   360k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 3.51k, False: 360k]
  ------------------
  672|   362k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 2.05k, False: 362k]
  ------------------
  673|   362k|        break;
  674|    432|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 432, False: 363k]
  ------------------
  675|    432|        goto sol;
  676|  1.49k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.49k, False: 362k]
  ------------------
  677|  1.49k|        goto gt;
  678|     30|      default:
  ------------------
  |  Branch (678:7): [True: 30, False: 364k]
  ------------------
  679|     30|        *nextTokPtr = ptr;
  680|     30|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  681|   364k|      }
  682|       |      /* ptr points to closing quote */
  683|   365k|      for (;;) {
  684|   365k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   365k|#  define MINBPC(enc) 2
  ------------------
  685|   365k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   365k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   365k|    {                                                                          \
  |  |  |  |  135|   365k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   365k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   365k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 365k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   365k|    }
  |  |  ------------------
  ------------------
  686|   365k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   365k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   365k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   363k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 363k, False: 2.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   290k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   361k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.24k, False: 363k]
  |  |  ------------------
  |  |  111|   361k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.24k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.24k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.24k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 2.24k]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|   361k|    /* fall through */                                                         \
  |  |  116|   361k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 286k, False: 79.1k]
  |  |  ------------------
  |  |  117|   361k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 73.0k, False: 292k]
  |  |  ------------------
  |  |  118|   361k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   361k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   361k|    break;                                                                     \
  |  |  120|   361k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 365k]
  |  |  |  |  ------------------
  |  |  |  |  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: 365k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 365k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  1.43k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 1.43k, False: 363k]
  ------------------
  689|  2.91k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 1.47k, False: 363k]
  ------------------
  690|  3.22k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 309, False: 365k]
  ------------------
  691|  3.22k|          continue;
  692|    263|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 263, False: 365k]
  ------------------
  693|  1.76k|        gt:
  694|  1.76k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.76k|#  define MINBPC(enc) 2
  ------------------
  695|  1.76k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.76k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    343|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 343, False: 365k]
  ------------------
  697|    775|        sol:
  698|    775|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    775|#  define MINBPC(enc) 2
  ------------------
  699|    775|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    775|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    775|    {                                                                          \
  |  |  |  |  135|    775|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    775|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    775|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 766]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|    775|    }
  |  |  ------------------
  ------------------
  700|    766|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    766|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    766|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 762, False: 4]
  |  |  |  |  |  Branch (739:52): [True: 760, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|      6|            *nextTokPtr = ptr;
  702|      6|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  703|      6|          }
  704|    760|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    760|#  define MINBPC(enc) 2
  ------------------
  705|    760|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    760|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 365k]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|   365k|        }
  710|   361k|        break;
  711|   365k|      }
  712|   361k|      break;
  713|   362k|    }
  714|   361k|    default:
  ------------------
  |  Branch (714:5): [True: 6, False: 370k]
  ------------------
  715|      6|      *nextTokPtr = ptr;
  716|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  717|   370k|    }
  718|   370k|  }
  719|     84|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     84|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.00k|}
xmltok.c:little2_scanRef:
  545|   133k|                const char **nextTokPtr) {
  546|   133k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   133k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   133k|    {                                                                          \
  |  |  |  |  135|   133k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   133k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   133k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 22, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  136|     22|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     22|      }                                                                        \
  |  |  |  |  138|   133k|    }
  |  |  ------------------
  ------------------
  547|   133k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   133k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   133k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   132k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 132k, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  8.08k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   120k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.28k, False: 132k]
  |  |  ------------------
  |  |  111|   120k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.28k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.28k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.27k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|   120k|    /* fall through */                                                         \
  |  |  116|   120k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.50k, False: 128k]
  |  |  ------------------
  |  |  117|   120k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 113k, False: 20.1k]
  |  |  ------------------
  |  |  118|   120k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   120k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   120k|    break;                                                                     \
  |  |  120|   120k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  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: 133k]
  |  |  |  |  ------------------
  |  |  |  |  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|     11|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 133k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    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|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  13.3k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 13.3k, False: 120k]
  ------------------
  550|  13.3k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  13.3k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  13.3k|#  define MINBPC(enc) 2
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 133k]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|   133k|  }
  555|   143k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   143k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   143k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   143k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   138k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 138k, False: 4.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  90.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  22.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.85k, False: 138k]
  |  |  ------------------
  |  |   82|  22.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  4.85k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.85k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.85k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 40, False: 4.81k]
  |  |  ------------------
  |  |   83|     40|      *nextTokPtr = ptr;                                                       \
  |  |   84|     40|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     40|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     40|    }                                                                          \
  |  |   86|  22.9k|    /* fall through */                                                         \
  |  |   87|  22.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 15.3k, False: 127k]
  |  |  ------------------
  |  |   88|  21.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 945, False: 142k]
  |  |  ------------------
  |  |   89|  21.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 238, False: 142k]
  |  |  ------------------
  |  |   90|  22.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.38k, False: 141k]
  |  |  ------------------
  |  |   91|  22.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 266, False: 142k]
  |  |  ------------------
  |  |   92|  22.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  22.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  22.9k|    break;                                                                     \
  |  |   94|  22.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 143k]
  |  |  |  |  ------------------
  |  |  |  |   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: 143k]
  |  |  |  |  ------------------
  |  |  |  |   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: 143k]
  |  |  |  |  ------------------
  |  |  |  |   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|   120k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 120k, False: 23.0k]
  ------------------
  559|   120k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   120k|#  define MINBPC(enc) 2
  ------------------
  560|   120k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   120k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      9|    default:
  ------------------
  |  Branch (561:5): [True: 9, False: 143k]
  ------------------
  562|      9|      *nextTokPtr = ptr;
  563|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  564|   143k|    }
  565|   143k|  }
  566|     57|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     57|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   120k|}
xmltok.c:little2_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)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  13.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 13.3k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  13.3k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  13.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  13.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 13.2k, False: 4]
  |  |  |  |  |  Branch (739:52): [True: 8.65k, False: 4.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  8.65k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.65k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.65k|#  define MINBPC(enc) 2
  ------------------
  518|  4.64k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.64k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.64k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.64k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.64k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  4.64k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 4.64k, False: 6]
  ------------------
  520|  4.64k|      break;
  521|      6|    default:
  ------------------
  |  Branch (521:5): [True: 6, False: 4.64k]
  ------------------
  522|      6|      *nextTokPtr = ptr;
  523|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  524|  4.64k|    }
  525|  10.3k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.64k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  5.71k|#  define MINBPC(enc) 2
  ------------------
  526|  10.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.3k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  5.71k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 5.71k, False: 4.63k]
  ------------------
  528|  5.71k|        break;
  529|  4.61k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 4.61k, False: 5.73k]
  ------------------
  530|  4.61k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.61k|#  define MINBPC(enc) 2
  ------------------
  531|  4.61k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.61k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     20|      default:
  ------------------
  |  Branch (532:7): [True: 20, False: 10.3k]
  ------------------
  533|     20|        *nextTokPtr = ptr;
  534|     20|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  535|  10.3k|      }
  536|  10.3k|    }
  537|  4.64k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  13.3k|}
xmltok.c:little2_scanHexCharRef:
  483|  8.65k|                       const char **nextTokPtr) {
  484|  8.65k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.65k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  8.65k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.65k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  8.65k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.65k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.65k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.64k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.64k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.66k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.66k, False: 3.99k]
  ------------------
  487|  8.64k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.98k, False: 4.67k]
  ------------------
  488|  8.64k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 8.64k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  8.65k|    }
  493|  30.4k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.64k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  21.8k|#  define MINBPC(enc) 2
  ------------------
  494|  30.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  30.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  30.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 30.4k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  15.2k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 15.2k, False: 15.2k]
  ------------------
  496|  21.8k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 6.57k, False: 23.8k]
  ------------------
  497|  21.8k|        break;
  498|  8.59k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 8.59k, False: 21.8k]
  ------------------
  499|  8.59k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  8.59k|#  define MINBPC(enc) 2
  ------------------
  500|  8.59k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  8.59k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     32|      default:
  ------------------
  |  Branch (501:7): [True: 32, False: 30.4k]
  ------------------
  502|     32|        *nextTokPtr = ptr;
  503|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  504|  30.4k|      }
  505|  30.4k|    }
  506|  8.64k|  }
  507|     16|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  8.65k|}
xmltok.c:little2_cdataSectionTok:
  356|  26.5k|                        const char **nextTokPtr) {
  357|  26.5k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 149, False: 26.4k]
  ------------------
  358|    149|    return XML_TOK_NONE;
  ------------------
  |  |   51|    149|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  26.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  26.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  26.4k|    size_t n = end - ptr;
  361|  26.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  26.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.0k, False: 16.3k]
  ------------------
  362|  10.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  10.0k|#  define MINBPC(enc) 2
  ------------------
  363|  10.0k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 16, False: 10.0k]
  ------------------
  364|     16|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.0k|      end = ptr + n;
  366|  10.0k|    }
  367|  26.4k|  }
  368|  26.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  26.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  26.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 22.0k, False: 4.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  10.7k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 10.7k, False: 15.6k]
  ------------------
  370|  10.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
  371|  10.7k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.7k|    {                                                                          \
  |  |  |  |  135|  10.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  10.7k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 10.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  10.7k|    }
  |  |  ------------------
  ------------------
  372|  10.7k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  10.7k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  10.7k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 7.39k, False: 3.31k]
  |  |  |  |  |  Branch (739:52): [True: 4.52k, False: 2.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  6.18k|      break;
  374|  4.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.52k|#  define MINBPC(enc) 2
  ------------------
  375|  4.52k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.52k|    {                                                                          \
  |  |  |  |  135|  4.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  4.52k|    }
  |  |  ------------------
  ------------------
  376|  4.51k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  4.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.98k, False: 1.53k]
  |  |  |  |  |  Branch (739:52): [True: 385, False: 2.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  4.13k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  4.13k|#  define MINBPC(enc) 2
  ------------------
  378|  4.13k|      break;
  379|  4.13k|    }
  380|    385|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    385|#  define MINBPC(enc) 2
  ------------------
  381|    385|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    385|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  7.93k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 7.93k, False: 18.4k]
  ------------------
  383|  7.93k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.93k|#  define MINBPC(enc) 2
  ------------------
  384|  7.93k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.93k|    {                                                                          \
  |  |  |  |  135|  7.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.93k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 7.92k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  7.93k|    }
  |  |  ------------------
  ------------------
  385|  7.92k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  7.92k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.92k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.11k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.11k, False: 3.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 297, False: 7.62k]
  ------------------
  386|    297|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    297|#  define MINBPC(enc) 2
  ------------------
  387|  7.92k|    *nextTokPtr = ptr;
  388|  7.92k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.92k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.16k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.16k, False: 24.2k]
  ------------------
  390|  2.16k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.16k|#  define MINBPC(enc) 2
  ------------------
  391|  2.16k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.16k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  4.07k|    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.3k]
  |  |  |  |  ------------------
  |  |  |  |   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.3k]
  |  |  |  |  ------------------
  |  |  |  |   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.02k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.96k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.02k, False: 24.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.02k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 58, False: 1.96k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.96k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     58|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.96k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.96k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.96k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.96k|    break;
  |  |  ------------------
  |  |   63|  1.96k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 46, False: 26.3k]
  |  |  ------------------
  |  |   64|     46|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 26.3k]
  |  |  ------------------
  |  |   65|     55|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 26.3k]
  |  |  ------------------
  |  |   66|     55|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     55|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     55|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  3.50k|  default:
  ------------------
  |  Branch (393:3): [True: 3.50k, False: 22.8k]
  ------------------
  394|  3.50k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.50k|#  define MINBPC(enc) 2
  ------------------
  395|  3.50k|    break;
  396|  26.3k|  }
  397|  1.25M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.25M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.25M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.25M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  39.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 39.3k, False: 1.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.25M]
  |  |  ------------------
  |  |  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.25M]
  |  |  ------------------
  |  |  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|  13.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  13.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 13.6k, False: 1.23M]
  |  |  ------------------
  |  |  401|  13.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  13.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 51, False: 13.5k]
  |  |  ------------------
  |  |  402|     51|      *nextTokPtr = ptr;                                                       \
  |  |  403|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     51|    }                                                                          \
  |  |  405|  13.5k|    ptr += n;                                                                  \
  |  |  406|  13.5k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     42|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 42, False: 1.25M]
  ------------------
  412|     42|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.25M]
  ------------------
  413|     50|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 8, False: 1.25M]
  ------------------
  414|  6.69k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 6.64k, False: 1.24M]
  ------------------
  415|  8.30k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.61k, False: 1.25M]
  ------------------
  416|  15.6k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 7.30k, False: 1.24M]
  ------------------
  417|  15.6k|      *nextTokPtr = ptr;
  418|  15.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  15.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.22M|    default:
  ------------------
  |  Branch (419:5): [True: 1.22M, False: 29.2k]
  ------------------
  420|  1.22M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.22M|#  define MINBPC(enc) 2
  ------------------
  421|  1.22M|      break;
  422|  1.25M|    }
  423|  1.25M|  }
  424|    134|  *nextTokPtr = ptr;
  425|    134|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    134|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  15.7k|}
xmltok.c:little2_attributeValueTok:
 1262|   144k|                          const char **nextTokPtr) {
 1263|   144k|  const char *start;
 1264|   144k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.90k, False: 141k]
  ------------------
 1265|  2.90k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.90k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   141k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   141k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   141k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   141k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 141k]
  ------------------
 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|   141k|  start = ptr;
 1275|  2.71M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  2.71M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.71M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.71M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   188k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 188k, False: 2.52M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 2.71M]
  |  |  ------------------
  |  | 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: 2.71M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  74.9k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  74.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 74.9k, False: 2.64M]
  |  |  ------------------
  |  | 1279|  74.9k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  74.9k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   108k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 108k, False: 2.60M]
  ------------------
 1286|   108k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 56.4k, False: 52.2k]
  ------------------
 1287|  56.4k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  56.4k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  56.4k|#  define MINBPC(enc) 2
  ------------------
 1288|  52.2k|      *nextTokPtr = ptr;
 1289|  52.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  52.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 2.71M]
  ------------------
 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|  16.9k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 16.9k, False: 2.70M]
  ------------------
 1295|  16.9k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 8.92k, False: 8.06k]
  ------------------
 1296|  8.92k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  8.92k|#  define MINBPC(enc) 2
  ------------------
 1297|  8.92k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.92k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  8.92k|      }
 1299|  8.06k|      *nextTokPtr = ptr;
 1300|  8.06k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  8.06k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  8.24k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 8.24k, False: 2.70M]
  ------------------
 1302|  8.24k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 5.01k, False: 3.23k]
  ------------------
 1303|  5.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.01k|#  define MINBPC(enc) 2
  ------------------
 1304|  5.01k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.01k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.01k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 299, False: 4.71k]
  ------------------
 1305|    299|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    299|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  4.71k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  4.71k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.71k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.53k, False: 2.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 500, False: 4.21k]
  ------------------
 1307|    500|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    500|#  define MINBPC(enc) 2
  ------------------
 1308|  4.71k|        *nextTokPtr = ptr;
 1309|  4.71k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.71k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  5.01k|      }
 1311|  3.23k|      *nextTokPtr = ptr;
 1312|  3.23k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.23k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  6.00k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 6.00k, False: 2.71M]
  ------------------
 1314|  6.00k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 3.36k, False: 2.63k]
  ------------------
 1315|  3.36k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.36k|#  define MINBPC(enc) 2
  ------------------
 1316|  3.36k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  3.36k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  3.36k|      }
 1318|  2.63k|      *nextTokPtr = ptr;
 1319|  2.63k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.63k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  2.50M|    default:
  ------------------
  |  Branch (1320:5): [True: 2.50M, False: 214k]
  ------------------
 1321|  2.50M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.50M|#  define MINBPC(enc) 2
  ------------------
 1322|  2.50M|      break;
 1323|  2.71M|    }
 1324|  2.71M|  }
 1325|  1.53k|  *nextTokPtr = ptr;
 1326|  1.53k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.53k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   141k|}
xmltok.c:little2_entityValueTok:
 1331|   110k|                       const char **nextTokPtr) {
 1332|   110k|  const char *start;
 1333|   110k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.68k, False: 108k]
  ------------------
 1334|  1.68k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.68k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   108k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   108k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   108k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   108k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 108k]
  ------------------
 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|   108k|  start = ptr;
 1344|  9.10M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  9.10M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.10M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.10M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   258k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 258k, False: 8.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 9.10M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 9.10M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   125k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   125k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 125k, False: 8.98M]
  |  |  ------------------
  |  | 1348|   125k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   125k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  17.1k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 17.1k, False: 9.08M]
  ------------------
 1355|  17.1k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 8.67k, False: 8.44k]
  ------------------
 1356|  8.67k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.67k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.67k|#  define MINBPC(enc) 2
  ------------------
 1357|  8.44k|      *nextTokPtr = ptr;
 1358|  8.44k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  8.44k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 9.10M]
  ------------------
 1360|      7|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 2]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      5|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  21.1k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 21.1k, False: 9.08M]
  ------------------
 1367|  21.1k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 11.7k, False: 9.36k]
  ------------------
 1368|  11.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  11.7k|#  define MINBPC(enc) 2
  ------------------
 1369|  11.7k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  11.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  11.7k|      }
 1371|  9.36k|      *nextTokPtr = ptr;
 1372|  9.36k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.36k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  69.3k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 69.3k, False: 9.03M]
  ------------------
 1374|  69.3k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 41.2k, False: 28.1k]
  ------------------
 1375|  41.2k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  41.2k|#  define MINBPC(enc) 2
  ------------------
 1376|  41.2k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  41.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  41.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  41.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 327, False: 40.9k]
  ------------------
 1377|    327|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    327|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  40.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  40.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  40.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.3k, False: 19.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.39k, False: 39.5k]
  ------------------
 1379|  1.39k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.39k|#  define MINBPC(enc) 2
  ------------------
 1380|  40.9k|        *nextTokPtr = ptr;
 1381|  40.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  40.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  41.2k|      }
 1383|  28.1k|      *nextTokPtr = ptr;
 1384|  28.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  28.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  8.87M|    default:
  ------------------
  |  Branch (1385:5): [True: 8.87M, False: 232k]
  ------------------
 1386|  8.87M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  8.87M|#  define MINBPC(enc) 2
  ------------------
 1387|  8.87M|      break;
 1388|  9.10M|    }
 1389|  9.10M|  }
 1390|    840|  *nextTokPtr = ptr;
 1391|    840|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    840|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   108k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  28.3k|                         const char *end1, const char *ptr2) {
 1716|  28.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  28.3k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   115k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  86.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 99.9k, False: 15.1k]
  ------------------
 1718|  99.9k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  99.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 41, False: 99.9k]
  ------------------
 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|     41|      return 0; /* LCOV_EXCL_LINE */
 1725|     41|    }
 1726|  99.9k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  99.9k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  99.9k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 99.8k, False: 21]
  |  |  |  |  |  Branch (739:52): [True: 86.7k, False: 13.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  13.1k|      return 0;
 1728|  99.9k|  }
 1729|  15.1k|  return ptr1 == end1;
 1730|  28.3k|}
xmltok.c:little2_nameLength:
 1733|  15.5k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  15.5k|  const char *start = ptr;
 1735|  1.28M|  for (;;) {
 1736|  1.28M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.28M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.28M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 29.1k, False: 1.25M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.28M]
  |  |  ------------------
  |  | 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.28M]
  |  |  ------------------
  |  | 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.28M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  1.25M|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 1.25M, False: 29.1k]
  ------------------
 1746|  1.26M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 8.39k, False: 1.27M]
  ------------------
 1747|  1.26M|#  ifdef XML_NS
 1748|  1.26M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 1.28M]
  ------------------
 1749|  1.26M|#  endif
 1750|  1.26M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.88k, False: 1.27M]
  ------------------
 1751|  1.26M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 114, False: 1.28M]
  ------------------
 1752|  1.26M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 93, False: 1.28M]
  ------------------
 1753|  1.26M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 104, False: 1.28M]
  ------------------
 1754|  1.26M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.26M|#  define MINBPC(enc) 2
  ------------------
 1755|  1.26M|      break;
 1756|  15.5k|    default:
  ------------------
  |  Branch (1756:5): [True: 15.5k, False: 1.26M]
  ------------------
 1757|  15.5k|      return (int)(ptr - start);
 1758|  1.28M|    }
 1759|  1.28M|  }
 1760|  15.5k|}
xmltok.c:little2_getAtts:
 1510|  10.7k|                ATTRIBUTE *atts) {
 1511|  10.7k|  enum { other, inName, inValue } state = inName;
 1512|  10.7k|  int nAtts = 0;
 1513|  10.7k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  14.4M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.7k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  14.4M|#  define MINBPC(enc) 2
  ------------------
 1517|  14.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.4M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.4M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.40M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.40M, False: 8.06M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 14.4M]
  |  |  ------------------
  |  | 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: 14.4M]
  |  |  ------------------
  |  | 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|   114k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   114k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 114k, False: 14.3M]
  |  |  ------------------
  |  | 1528|   114k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   114k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 114k]
  |  |  |  |  ------------------
  |  |  |  | 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|   114k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   114k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  7.95M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 7.95M, False: 6.52M]
  ------------------
 1535|  8.70M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 748k, False: 13.7M]
  ------------------
 1536|  8.93M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 232k, False: 14.2M]
  ------------------
 1537|  8.93M|      START_NAME
  ------------------
  |  | 1519|  8.93M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 719k, False: 8.21M]
  |  |  ------------------
  |  | 1520|   719k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 363k, False: 356k]
  |  |  ------------------
  |  | 1521|   363k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   363k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   363k|      }                                                                        \
  |  | 1524|   719k|      state = inName;                                                          \
  |  | 1525|   719k|    }
  ------------------
 1538|  8.93M|      break;
 1539|      0|#  undef START_NAME
 1540|  22.8k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 22.8k, False: 14.4M]
  ------------------
 1541|  22.8k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 10.3k, False: 12.5k]
  ------------------
 1542|  10.3k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 6.99k, False: 3.30k]
  ------------------
 1543|  6.99k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.99k|#  define MINBPC(enc) 2
  ------------------
 1544|  10.3k|        state = inValue;
 1545|  10.3k|        open = BT_QUOT;
 1546|  12.5k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 10.3k, False: 2.21k]
  ------------------
 1547|  10.3k|        state = other;
 1548|  10.3k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 6.99k, False: 3.30k]
  ------------------
 1549|  6.99k|          atts[nAtts].valueEnd = ptr;
 1550|  10.3k|        nAtts++;
 1551|  10.3k|      }
 1552|  22.8k|      break;
 1553|  1.41M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.41M, False: 13.0M]
  ------------------
 1554|  1.41M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 709k, False: 709k]
  ------------------
 1555|   709k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 356k, False: 353k]
  ------------------
 1556|   356k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   356k|#  define MINBPC(enc) 2
  ------------------
 1557|   709k|        state = inValue;
 1558|   709k|        open = BT_APOS;
 1559|   709k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 709k, False: 314]
  ------------------
 1560|   709k|        state = other;
 1561|   709k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 356k, False: 353k]
  ------------------
 1562|   356k|          atts[nAtts].valueEnd = ptr;
 1563|   709k|        nAtts++;
 1564|   709k|      }
 1565|  1.41M|      break;
 1566|  57.0k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 57.0k, False: 14.4M]
  ------------------
 1567|  57.0k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 56.7k, False: 240]
  ------------------
 1568|  56.7k|        atts[nAtts].normalized = 0;
 1569|  57.0k|      break;
 1570|  1.96M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.96M, False: 12.5M]
  ------------------
 1571|  1.96M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.66k, False: 1.95M]
  ------------------
 1572|  1.66k|        state = other;
 1573|  1.95M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 1.24M, False: 713k]
  |  Branch (1573:36): [True: 625k, False: 619k]
  |  Branch (1573:55): [True: 310k, False: 315k]
  ------------------
 1574|  1.95M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 57.5k, False: 252k]
  ------------------
 1575|   310k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   252k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   252k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 252k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   563k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 11.9k, False: 240k]
  ------------------
 1576|   310k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   240k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   240k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 232k, False: 7.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   551k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 128k, False: 112k]
  ------------------
 1577|   310k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|   112k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   112k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   104k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 104k, False: 7.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 103k, False: 8.45k]
  ------------------
 1578|   301k|        atts[nAtts].normalized = 0;
 1579|  1.96M|      break;
 1580|   270k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 270k, False: 14.2M]
  ------------------
 1581|   284k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 13.7k, False: 14.4M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   284k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 3.86k, False: 280k]
  ------------------
 1585|  3.86k|        state = other;
 1586|   280k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 271k, False: 8.76k]
  |  Branch (1586:36): [True: 142k, False: 128k]
  ------------------
 1587|   142k|        atts[nAtts].normalized = 0;
 1588|   284k|      break;
 1589|   316k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 316k, False: 14.1M]
  ------------------
 1590|   385k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 68.9k, False: 14.4M]
  ------------------
 1591|   385k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.7k, False: 374k]
  ------------------
 1592|  10.7k|        return nAtts;
 1593|   374k|      break;
 1594|  1.29M|    default:
  ------------------
  |  Branch (1594:5): [True: 1.29M, False: 13.1M]
  ------------------
 1595|  1.29M|      break;
 1596|  14.4M|    }
 1597|  14.4M|  }
 1598|       |  /* not reached */
 1599|  10.7k|}
xmltok.c:little2_charRefNumber:
 1602|  11.1k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  11.1k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  11.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  11.1k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  11.1k|#  define MINBPC(enc) 2
  ------------------
 1607|  11.1k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  11.1k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  11.1k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 11.1k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 7.29k, False: 3.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  32.8k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  7.29k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  32.8k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  32.8k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 32.8k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 7.28k, False: 25.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  25.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  25.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  25.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  25.5k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  25.5k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 25.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  25.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 25.5k]
  ------------------
 1612|    466|      case ASCII_0:
  ------------------
  |  |   90|    466|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 466, False: 25.0k]
  ------------------
 1613|  2.56k|      case ASCII_1:
  ------------------
  |  |   91|  2.56k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 2.10k, False: 23.4k]
  ------------------
 1614|  6.30k|      case ASCII_2:
  ------------------
  |  |   92|  6.30k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 3.73k, False: 21.8k]
  ------------------
 1615|  10.6k|      case ASCII_3:
  ------------------
  |  |   93|  10.6k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 4.31k, False: 21.2k]
  ------------------
 1616|  11.3k|      case ASCII_4:
  ------------------
  |  |   94|  11.3k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 737, False: 24.8k]
  ------------------
 1617|  13.1k|      case ASCII_5:
  ------------------
  |  |   95|  13.1k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.76k, False: 23.7k]
  ------------------
 1618|  14.0k|      case ASCII_6:
  ------------------
  |  |   96|  14.0k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 979, False: 24.5k]
  ------------------
 1619|  15.2k|      case ASCII_7:
  ------------------
  |  |   97|  15.2k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 1.12k, False: 24.4k]
  ------------------
 1620|  15.7k|      case ASCII_8:
  ------------------
  |  |   98|  15.7k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 550, False: 25.0k]
  ------------------
 1621|  17.2k|      case ASCII_9:
  ------------------
  |  |   99|  17.2k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.51k, False: 24.0k]
  ------------------
 1622|  17.2k|        result <<= 4;
 1623|  17.2k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  17.2k|#define ASCII_0 0x30
  ------------------
 1624|  17.2k|        break;
 1625|    374|      case ASCII_A:
  ------------------
  |  |   36|    374|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 374, False: 25.1k]
  ------------------
 1626|    573|      case ASCII_B:
  ------------------
  |  |   37|    573|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 199, False: 25.3k]
  ------------------
 1627|    880|      case ASCII_C:
  ------------------
  |  |   38|    880|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 307, False: 25.2k]
  ------------------
 1628|  1.75k|      case ASCII_D:
  ------------------
  |  |   39|  1.75k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 877, False: 24.6k]
  ------------------
 1629|  2.19k|      case ASCII_E:
  ------------------
  |  |   40|  2.19k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 433, False: 25.1k]
  ------------------
 1630|  4.13k|      case ASCII_F:
  ------------------
  |  |   41|  4.13k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.94k, False: 23.6k]
  ------------------
 1631|  4.13k|        result <<= 4;
 1632|  4.13k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.13k|#define ASCII_A 0x41
  ------------------
 1633|  4.13k|        break;
 1634|  1.22k|      case ASCII_a:
  ------------------
  |  |   63|  1.22k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.22k, False: 24.3k]
  ------------------
 1635|  1.65k|      case ASCII_b:
  ------------------
  |  |   64|  1.65k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 435, False: 25.1k]
  ------------------
 1636|  1.90k|      case ASCII_c:
  ------------------
  |  |   65|  1.90k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 253, False: 25.3k]
  ------------------
 1637|  2.28k|      case ASCII_d:
  ------------------
  |  |   66|  2.28k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 373, False: 25.1k]
  ------------------
 1638|  3.07k|      case ASCII_e:
  ------------------
  |  |   67|  3.07k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 789, False: 24.7k]
  ------------------
 1639|  4.13k|      case ASCII_f:
  ------------------
  |  |   68|  4.13k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.06k, False: 24.4k]
  ------------------
 1640|  4.13k|        result <<= 4;
 1641|  4.13k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.13k|#define ASCII_a 0x61
  ------------------
 1642|  4.13k|        break;
 1643|  25.5k|      }
 1644|  25.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 17, False: 25.5k]
  ------------------
 1645|     17|        return -1;
 1646|  25.5k|    }
 1647|  7.29k|  } else {
 1648|  12.1k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  12.1k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  12.1k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 12.1k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.79k, False: 8.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.30k|#  define MINBPC(enc) 2
  ------------------
 1649|  8.30k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  8.30k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  8.30k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 8.30k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  8.30k|      result *= 10;
 1651|  8.30k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  8.30k|#define ASCII_0 0x30
  ------------------
 1652|  8.30k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 8.30k]
  ------------------
 1653|      5|        return -1;
 1654|  8.30k|    }
 1655|  3.80k|  }
 1656|  11.0k|  return checkCharRefNumber(result);
 1657|  11.1k|}
xmltok.c:little2_predefinedEntityName:
 1661|  64.3k|                             const char *end) {
 1662|  64.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  64.3k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  64.3k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  64.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 56.2k, False: 8.04k]
  ------------------
 1664|  2.71k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.71k, False: 61.5k]
  ------------------
 1665|  2.71k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  2.71k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.71k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.44k, False: 277]
  |  |  |  |  |  Branch (739:52): [True: 817, False: 1.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    817|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    817|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    817|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 279, False: 538]
  |  |  |  |  |  Branch (738:35): [True: 553, False: 264]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    130|      case ASCII_l:
  ------------------
  |  |   74|    130|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 130, False: 687]
  ------------------
 1668|    130|        return ASCII_LT;
  ------------------
  |  |  111|    130|#define ASCII_LT 0x3C
  ------------------
 1669|    408|      case ASCII_g:
  ------------------
  |  |   69|    408|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 408, False: 409]
  ------------------
 1670|    408|        return ASCII_GT;
  ------------------
  |  |  113|    408|#define ASCII_GT 0x3E
  ------------------
 1671|    817|      }
 1672|    817|    }
 1673|  2.18k|    break;
 1674|  2.18k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.84k, False: 62.4k]
  ------------------
 1675|  1.84k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.84k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.84k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.62k, False: 217]
  |  |  |  |  |  Branch (739:52): [True: 1.37k, False: 256]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.37k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.37k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.37k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  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.17k, False: 198]
  |  |  |  |  |  Branch (739:52): [True: 703, False: 469]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    703|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    703|#  define MINBPC(enc) 2
  ------------------
 1679|    703|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    703|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    703|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 406, False: 297]
  |  |  |  |  |  Branch (739:52): [True: 205, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    205|          return ASCII_AMP;
  ------------------
  |  |  105|    205|#define ASCII_AMP 0x26
  ------------------
 1681|    703|      }
 1682|  1.37k|    }
 1683|  1.63k|    break;
 1684|  3.47k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.47k, False: 60.8k]
  ------------------
 1685|  3.47k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.47k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.47k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 370, False: 3.10k]
  |  |  |  |  |  Branch (738:35): [True: 3.26k, False: 216]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.52k|    case ASCII_q:
  ------------------
  |  |   79|  1.52k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.52k, False: 1.95k]
  ------------------
 1687|  1.52k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.52k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.52k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.52k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.52k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.33k, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 1.13k, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.13k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.13k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.13k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.13k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.13k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 936, False: 196]
  |  |  |  |  |  Branch (739:52): [True: 738, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    738|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    738|#  define MINBPC(enc) 2
  ------------------
 1692|    738|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    738|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    738|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 539, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 336, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    336|            return ASCII_QUOT;
  ------------------
  |  |  104|    336|#define ASCII_QUOT 0x22
  ------------------
 1694|    738|        }
 1695|  1.13k|      }
 1696|  1.19k|      break;
 1697|  1.58k|    case ASCII_a:
  ------------------
  |  |   63|  1.58k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.58k, False: 1.89k]
  ------------------
 1698|  1.58k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.58k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.58k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.58k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.58k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.37k, False: 203]
  |  |  |  |  |  Branch (739:52): [True: 1.14k, False: 230]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.14k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.14k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.14k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.14k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.14k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 924, False: 224]
  |  |  |  |  |  Branch (739:52): [True: 714, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    714|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    714|#  define MINBPC(enc) 2
  ------------------
 1703|    714|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    714|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    714|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 482, False: 232]
  |  |  |  |  |  Branch (739:52): [True: 270, False: 212]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    270|            return ASCII_APOS;
  ------------------
  |  |  106|    270|#define ASCII_APOS 0x27
  ------------------
 1705|    714|        }
 1706|  1.14k|      }
 1707|  1.31k|      break;
 1708|  3.47k|    }
 1709|  64.3k|  }
 1710|  62.9k|  return 0;
 1711|  64.3k|}
xmltok.c:little2_updatePosition:
 1779|  3.39k|                       POSITION *pos) {
 1780|  4.36M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.36M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.36M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.36M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   281k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 281k, False: 4.08M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.36M]
  |  |  ------------------
  |  | 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.36M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  66.6k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  66.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 66.6k, False: 4.30M]
  |  |  ------------------
  |  | 1784|  66.6k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  66.6k|    pos->columnNumber++;                                                       \
  |  | 1786|  66.6k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  13.9k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 13.9k, False: 4.35M]
  ------------------
 1792|  13.9k|      pos->columnNumber = 0;
 1793|  13.9k|      pos->lineNumber++;
 1794|  13.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.9k|#  define MINBPC(enc) 2
  ------------------
 1795|  13.9k|      break;
 1796|  19.3k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 19.3k, False: 4.34M]
  ------------------
 1797|  19.3k|      pos->lineNumber++;
 1798|  19.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  19.3k|#  define MINBPC(enc) 2
  ------------------
 1799|  19.3k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  19.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  38.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  19.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 19.3k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  19.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.3k|  ((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:4): [True: 11.0k, False: 8.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.71k, False: 17.6k]
  ------------------
 1800|  1.71k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.71k|#  define MINBPC(enc) 2
  ------------------
 1801|  19.3k|      pos->columnNumber = 0;
 1802|  19.3k|      break;
 1803|  4.26M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.26M, False: 99.9k]
  ------------------
 1804|  4.26M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.26M|#  define MINBPC(enc) 2
  ------------------
 1805|  4.26M|      pos->columnNumber++;
 1806|  4.26M|      break;
 1807|  4.36M|    }
 1808|  4.36M|  }
 1809|  3.39k|}
xmltok.c:little2_isPublicId:
 1450|  1.78k|                   const char **badPtr) {
 1451|  1.78k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.78k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1453|  10.6k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.6k|#  define MINBPC(enc) 2
  ------------------
 1454|  10.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.6k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    571|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 571, False: 10.0k]
  ------------------
 1456|  1.42k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 857, False: 9.80k]
  ------------------
 1457|  1.74k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 318, False: 10.3k]
  ------------------
 1458|  1.95k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 204, False: 10.4k]
  ------------------
 1459|  2.34k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 391, False: 10.2k]
  ------------------
 1460|  2.79k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 455, False: 10.2k]
  ------------------
 1461|  3.03k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 242, False: 10.4k]
  ------------------
 1462|  3.37k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 336, False: 10.3k]
  ------------------
 1463|  3.87k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 499, False: 10.1k]
  ------------------
 1464|  4.07k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 202, False: 10.4k]
  ------------------
 1465|  4.30k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 231, False: 10.4k]
  ------------------
 1466|  4.61k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 310, False: 10.3k]
  ------------------
 1467|  4.96k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 353, False: 10.3k]
  ------------------
 1468|  5.41k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 448, False: 10.2k]
  ------------------
 1469|  5.82k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 405, False: 10.2k]
  ------------------
 1470|  6.05k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 237, False: 10.4k]
  ------------------
 1471|  6.65k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 593, False: 10.0k]
  ------------------
 1472|  7.01k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 362, False: 10.2k]
  ------------------
 1473|  7.01k|#  ifdef XML_NS
 1474|  7.01k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 10.6k]
  ------------------
 1475|  7.01k|#  endif
 1476|  7.01k|      break;
 1477|    716|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 716, False: 9.94k]
  ------------------
 1478|    716|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    716|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    716|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 716, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 715]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    715|      break;
 1483|    715|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 231, False: 10.4k]
  ------------------
 1484|  1.39k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.16k, False: 9.49k]
  ------------------
 1485|  1.39k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  1.39k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.39k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.39k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.38k, False: 9]
  ------------------
 1486|  1.38k|        break;
 1487|       |      /* fall through */
 1488|  1.54k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.53k, False: 9.12k]
  ------------------
 1489|  1.54k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.54k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.54k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.50k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    672|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 672, False: 870]
  ------------------
 1491|  1.49k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 827, False: 715]
  ------------------
 1492|  1.49k|        break;
 1493|     43|      default:
  ------------------
  |  Branch (1493:7): [True: 43, False: 1.49k]
  ------------------
 1494|     43|        *badPtr = ptr;
 1495|     43|        return 0;
 1496|  1.54k|      }
 1497|  1.49k|      break;
 1498|  10.6k|    }
 1499|  10.6k|  }
 1500|  1.74k|  return 1;
 1501|  1.78k|}
xmltok.c:big2_prologTok:
 1018|   104k|                  const char **nextTokPtr) {
 1019|   104k|  int tok;
 1020|   104k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 302, False: 104k]
  ------------------
 1021|    302|    return XML_TOK_NONE;
  ------------------
  |  |   51|    302|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|   104k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|   104k|    size_t n = end - ptr;
 1024|   104k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|   104k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 36.6k, False: 67.5k]
  ------------------
 1025|  36.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  36.6k|#  define MINBPC(enc) 2
  ------------------
 1026|  36.6k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 27, False: 36.6k]
  ------------------
 1027|     27|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     27|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  36.6k|      end = ptr + n;
 1029|  36.6k|    }
 1030|   104k|  }
 1031|   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|   102k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 102k, False: 1.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  3.00k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 3.00k, False: 101k]
  ------------------
 1033|  3.00k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.00k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.00k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.57k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.57k, False: 99.5k]
  ------------------
 1035|  4.57k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.57k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.57k|#  define MINBPC(enc) 2
  ------------------
 1036|  14.9k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 14.9k, False: 89.2k]
  ------------------
 1037|  14.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.9k|#  define MINBPC(enc) 2
  ------------------
 1038|  14.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.9k|    {                                                                          \
  |  |  |  |  135|  14.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 14.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  14.9k|    }
  |  |  ------------------
  ------------------
 1039|  14.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 11, False: 14.9k]
  |  |  |  |  |  Branch (870:4): [True: 12.8k, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  8.45k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 8.45k, False: 6.47k]
  ------------------
 1041|  8.45k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  8.45k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  8.45k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.51k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.51k, False: 12.4k]
  ------------------
 1043|  2.51k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.51k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.51k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.13k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.13k, False: 13.7k]
  ------------------
 1045|  1.89k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 761, False: 14.1k]
  ------------------
 1046|  3.93k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 2.04k, False: 12.8k]
  ------------------
 1047|  3.93k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 14.9k]
  ------------------
 1048|  3.93k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 14.9k]
  ------------------
 1049|  3.95k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 18, False: 14.9k]
  ------------------
 1050|  3.95k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.95k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.95k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.95k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  14.9k|    }
 1053|     11|    *nextTokPtr = ptr;
 1054|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1055|  14.9k|  }
 1056|  7.29k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 7.29k, False: 96.8k]
  ------------------
 1057|  7.29k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  7.29k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 56, False: 7.23k]
  ------------------
 1058|     56|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     56|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     56|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     56|    }
 1062|       |    /* fall through */
 1063|  24.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 17.4k, False: 86.6k]
  ------------------
 1064|  31.2k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 6.56k, False: 97.5k]
  ------------------
 1065|  33.5k|    for (;;) {
 1066|  33.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  33.5k|#  define MINBPC(enc) 2
  ------------------
 1067|  33.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  33.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  33.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  33.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 179, False: 33.3k]
  ------------------
 1068|    179|        break;
 1069|  33.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  33.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 31.9k, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    940|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 940, False: 32.4k]
  ------------------
 1071|  1.56k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 620, False: 32.7k]
  ------------------
 1072|  1.56k|        break;
 1073|    691|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 691, False: 32.6k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    691|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    691|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 689, False: 2]
  ------------------
 1076|    689|          break;
 1077|       |        /* fall through */
 1078|  31.1k|      default:
  ------------------
  |  Branch (1078:7): [True: 31.1k, False: 2.25k]
  ------------------
 1079|  31.1k|        *nextTokPtr = ptr;
 1080|  31.1k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  31.1k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  33.3k|      }
 1082|  33.3k|    }
 1083|    179|    *nextTokPtr = ptr;
 1084|    179|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    179|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.30k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.30k, False: 101k]
  ------------------
 1086|  2.30k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.30k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.30k|#  define MINBPC(enc) 2
  ------------------
 1087|  3.20k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 3.20k, False: 100k]
  ------------------
 1088|  3.20k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.20k|#  define MINBPC(enc) 2
  ------------------
 1089|  3.20k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  3.20k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.34k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.34k, False: 102k]
  ------------------
 1091|  1.34k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.34k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.34k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.34k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    808|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 808, False: 103k]
  ------------------
 1094|    808|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    808|#  define MINBPC(enc) 2
  ------------------
 1095|    808|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    808|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    808|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    808|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 806]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    806|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    806|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    806|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 802, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 33, False: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     33|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     33|    {                                                                          \
  |  |  135|     33|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     33|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     33|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 32]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     33|    }
  ------------------
 1099|     32|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     32|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     32|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 18, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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|     32|    }
 1104|    804|    *nextTokPtr = ptr;
 1105|    804|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    804|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.70k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.70k, False: 98.4k]
  ------------------
 1107|  5.70k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.70k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.70k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.70k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.62k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.62k, False: 99.5k]
  ------------------
 1110|  4.62k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.62k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.62k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.62k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.62k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.62k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 3, False: 4.62k]
  ------------------
 1112|      3|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      3|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.62k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.62k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.62k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 27, False: 4.59k]
  |  |  |  |  |  Branch (870:4): [True: 4.59k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    383|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 383, False: 4.23k]
  ------------------
 1115|    383|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    383|#  define MINBPC(enc) 2
  ------------------
 1116|    383|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    383|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     74|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 74, False: 4.54k]
  ------------------
 1118|     74|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     74|#  define MINBPC(enc) 2
  ------------------
 1119|     74|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     74|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    353|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 353, False: 4.26k]
  ------------------
 1121|    353|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    353|#  define MINBPC(enc) 2
  ------------------
 1122|    353|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    353|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    463|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 463, False: 4.15k]
  ------------------
 1124|    674|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 211, False: 4.41k]
  ------------------
 1125|  1.52k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 850, False: 3.77k]
  ------------------
 1126|  2.00k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 482, False: 4.13k]
  ------------------
 1127|  2.56k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 556, False: 4.06k]
  ------------------
 1128|  2.98k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 426, False: 4.19k]
  ------------------
 1129|  3.78k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 796, False: 3.82k]
  ------------------
 1130|  3.78k|      *nextTokPtr = ptr;
 1131|  3.78k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.78k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.62k|    }
 1133|     27|    *nextTokPtr = ptr;
 1134|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1135|  1.66k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 1.66k, False: 102k]
  ------------------
 1136|  1.66k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.66k|#  define MINBPC(enc) 2
  ------------------
 1137|  1.66k|    return XML_TOK_OR;
  ------------------
  |  |   88|  1.66k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  6.64k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 6.64k, False: 97.4k]
  ------------------
 1139|  6.64k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.64k|#  define MINBPC(enc) 2
  ------------------
 1140|  6.64k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  6.64k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.32k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.32k, False: 101k]
  ------------------
 1142|  2.32k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.32k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.32k|#  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: 104k]
  |  |  ------------------
  |  | 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: 104k]
  |  |  ------------------
  |  | 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|     55|    LEAD_CASE(4)
  ------------------
  |  | 1144|     12|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 19, False: 104k]
  |  |  ------------------
  |  | 1145|     19|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 7, False: 12]
  |  |  ------------------
  |  | 1146|     12|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     12|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     12|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     12|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     12|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     12|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     12|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  13.2k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 13.2k, False: 90.8k]
  ------------------
 1168|  18.4k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 5.19k, False: 98.9k]
  ------------------
 1169|  18.4k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  18.4k|#define XML_TOK_NAME 18
  ------------------
 1170|  18.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  18.4k|#  define MINBPC(enc) 2
  ------------------
 1171|  18.4k|    break;
 1172|    243|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 243, False: 103k]
  ------------------
 1173|    653|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 410, False: 103k]
  ------------------
 1174|  1.32k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 670, False: 103k]
  ------------------
 1175|  1.32k|#  ifdef XML_NS
 1176|  1.32k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 104k]
  ------------------
 1177|  1.32k|#  endif
 1178|  1.32k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.32k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.32k|#  define MINBPC(enc) 2
  ------------------
 1180|  1.32k|    break;
 1181|  1.82k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 1.82k, False: 102k]
  ------------------
 1182|  1.82k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  1.82k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  1.82k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  1.82k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.73k, False: 90]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.73k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.73k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.73k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.73k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.73k|      break;
 1186|  1.73k|    }
 1187|     90|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|     90|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|     90|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|     90|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 51, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|     51|      ptr += MINBPC(enc);
  ------------------
  |  |  916|     51|#  define MINBPC(enc) 2
  ------------------
 1189|     51|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|     51|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|     51|      break;
 1191|     51|    }
 1192|       |    /* fall through */
 1193|     77|  default:
  ------------------
  |  Branch (1193:3): [True: 38, False: 104k]
  ------------------
 1194|     77|    *nextTokPtr = ptr;
 1195|     77|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     77|#define XML_TOK_INVALID 0
  ------------------
 1196|   104k|  }
 1197|  49.7k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  49.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  49.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  49.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  40.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 40.1k, False: 9.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   111k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  28.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 9.59k, False: 40.1k]
  |  |  ------------------
  |  |   82|  28.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  9.59k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  9.59k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  9.59k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 36, False: 9.56k]
  |  |  ------------------
  |  |   83|     36|      *nextTokPtr = ptr;                                                       \
  |  |   84|     36|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     36|    }                                                                          \
  |  |   86|  28.2k|    /* fall through */                                                         \
  |  |   87|  28.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 9.48k, False: 40.2k]
  |  |  ------------------
  |  |   88|  27.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.19k, False: 41.5k]
  |  |  ------------------
  |  |   89|  27.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 473, False: 49.2k]
  |  |  ------------------
  |  |   90|  28.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 370, False: 49.3k]
  |  |  ------------------
  |  |   91|  28.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 200, False: 49.5k]
  |  |  ------------------
  |  |   92|  28.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  28.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  28.2k|    break;                                                                     \
  |  |   94|  28.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 49.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: 49.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|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 49.7k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
 1200|    547|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 547, False: 49.1k]
  ------------------
 1201|  3.20k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.66k, False: 47.0k]
  ------------------
 1202|  4.56k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 1.35k, False: 48.3k]
  ------------------
 1203|  5.40k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 846, False: 48.8k]
  ------------------
 1204|  6.41k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.01k, False: 48.7k]
  ------------------
 1205|  6.42k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 1, False: 49.7k]
  ------------------
 1206|  14.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.35k, False: 41.3k]
  ------------------
 1207|  16.4k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.72k, False: 48.0k]
  ------------------
 1208|  20.0k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 3.56k, False: 46.1k]
  ------------------
 1209|  20.0k|      *nextTokPtr = ptr;
 1210|  20.0k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 49.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|    241|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 241, False: 49.4k]
  ------------------
 1232|    241|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    241|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 240]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    240|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    240|#  define MINBPC(enc) 2
  ------------------
 1237|    240|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    240|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    764|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 764, False: 48.9k]
  ------------------
 1239|    764|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    764|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 763]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    763|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    763|#  define MINBPC(enc) 2
  ------------------
 1244|    763|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    763|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    302|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 302, False: 49.4k]
  ------------------
 1246|    302|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    302|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 301]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    301|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    301|#  define MINBPC(enc) 2
  ------------------
 1251|    301|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    301|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     23|    default:
  ------------------
  |  Branch (1252:5): [True: 23, False: 49.7k]
  ------------------
 1253|     23|      *nextTokPtr = ptr;
 1254|     23|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
 1255|  49.7k|    }
 1256|  49.7k|  }
 1257|    122|  return -tok;
 1258|  21.5k|}
xmltok.c:big2_scanLit:
  984|  7.57k|                const char **nextTokPtr) {
  985|  35.4M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  35.4M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  35.4M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  35.4M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   295k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 295k, False: 35.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  35.4M|    switch (t) {
  988|   207k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.4M]
  |  |  |  |  ------------------
  |  |  |  |   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|   103k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   103k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 103k, False: 35.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|   103k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 27, False: 103k]
  |  |  |  |  ------------------
  |  |  |  |   51|   103k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     27|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   103k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   103k|#    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|   103k|    ptr += n;                                                                  \
  |  |  |  |   57|   103k|    break;
  |  |  ------------------
  |  |   63|   103k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 35.4M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 35.4M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 35.4M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  7.33k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 7.33k, False: 35.4M]
  ------------------
  990|  12.1k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.85k, False: 35.4M]
  ------------------
  991|  12.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.1k|#  define MINBPC(enc) 2
  ------------------
  992|  12.1k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 4.71k, False: 7.46k]
  ------------------
  993|  4.71k|        break;
  994|  7.46k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.46k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.46k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.46k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 7.46k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  7.46k|      *nextTokPtr = ptr;
  997|  7.46k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.46k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.46k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.44k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.44k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.46k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.46k, False: 6.00k]
  ------------------
  999|  3.60k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 2.14k, False: 5.32k]
  ------------------
 1000|  4.64k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.04k, False: 6.42k]
  ------------------
 1001|  7.41k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.77k, False: 4.69k]
  ------------------
 1002|  7.43k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 13, False: 7.45k]
  ------------------
 1003|  7.44k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 10, False: 7.45k]
  ------------------
 1004|  7.44k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  7.44k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     25|      default:
  ------------------
  |  Branch (1005:7): [True: 25, False: 7.44k]
  ------------------
 1006|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1007|  7.46k|      }
 1008|  35.3M|    default:
  ------------------
  |  Branch (1008:5): [True: 35.3M, False: 115k]
  ------------------
 1009|  35.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  35.3M|#  define MINBPC(enc) 2
  ------------------
 1010|  35.3M|      break;
 1011|  35.4M|    }
 1012|  35.4M|  }
 1013|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  7.57k|}
xmltok.c:big2_scanDecl:
  183|  8.45k|                 const char **nextTokPtr) {
  184|  8.45k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.45k|    {                                                                          \
  |  |  |  |  135|  8.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.45k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 8.44k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  8.45k|    }
  |  |  ------------------
  ------------------
  185|  8.44k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.44k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.44k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.42k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    432|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 432, False: 8.01k]
  ------------------
  187|    432|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    432|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    432|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 8.44k]
  ------------------
  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|    512|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 512, False: 7.93k]
  ------------------
  192|  7.99k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 7.48k, False: 966]
  ------------------
  193|  7.99k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.99k|#  define MINBPC(enc) 2
  ------------------
  194|  7.99k|    break;
  195|     21|  default:
  ------------------
  |  Branch (195:3): [True: 21, False: 8.42k]
  ------------------
  196|     21|    *nextTokPtr = ptr;
  197|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  198|  8.44k|  }
  199|  52.5k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  52.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  52.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  52.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  52.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 52.5k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     38|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 38, False: 52.5k]
  ------------------
  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: 2, False: 36]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     38|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     36|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     36|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     36|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      7|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 32, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 35]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 35]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 35]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 35]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     36|      }
  212|       |      /* fall through */
  213|  5.66k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 5.63k, False: 46.9k]
  ------------------
  214|  7.32k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.65k, False: 50.9k]
  ------------------
  215|  7.92k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 602, False: 51.9k]
  ------------------
  216|  7.92k|      *nextTokPtr = ptr;
  217|  7.92k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  7.92k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  39.0k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 39.0k, False: 13.5k]
  ------------------
  219|  44.6k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.59k, False: 46.9k]
  ------------------
  220|  44.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  44.6k|#  define MINBPC(enc) 2
  ------------------
  221|  44.6k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 52.5k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  52.5k|    }
  226|  52.5k|  }
  227|     28|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  7.99k|}
xmltok.c:big2_scanComment:
  146|    809|                    const char **nextTokPtr) {
  147|    809|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    809|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    809|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    809|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 799, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    799|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    799|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    799|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 788, False: 11]
  |  |  |  |  |  Branch (872:49): [True: 785, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     14|      *nextTokPtr = ptr;
  150|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  151|     14|    }
  152|    785|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    785|#  define MINBPC(enc) 2
  ------------------
  153|   389k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   389k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   389k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   389k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.76k, False: 380k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  7.73k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 389k]
  |  |  |  |  ------------------
  |  |  |  |   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: 389k]
  |  |  |  |  ------------------
  |  |  |  |   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.84k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.81k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.84k, False: 385k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.84k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 3.81k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.81k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.81k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.81k|#    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.81k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.81k|    break;
  |  |  ------------------
  |  |   63|  3.81k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 33, False: 389k]
  |  |  ------------------
  |  |   64|     33|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 389k]
  |  |  ------------------
  |  |   65|     43|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 389k]
  |  |  ------------------
  |  |   66|     43|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     43|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     43|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.23k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.23k, False: 388k]
  ------------------
  157|  1.23k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.23k|#  define MINBPC(enc) 2
  ------------------
  158|  1.23k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.23k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.23k|    {                                                                          \
  |  |  |  |  135|  1.23k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.23k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.23k|    }
  |  |  ------------------
  ------------------
  159|  1.23k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.23k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.23k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 971, False: 260]
  |  |  |  |  |  Branch (872:49): [True: 642, False: 329]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    642|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    642|#  define MINBPC(enc) 2
  ------------------
  161|    642|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    642|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    642|    {                                                                          \
  |  |  |  |  135|    642|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    642|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    642|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 641]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    642|    }
  |  |  ------------------
  ------------------
  162|    641|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    641|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    641|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 631, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 621, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     20|            *nextTokPtr = ptr;
  164|     20|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  165|     20|          }
  166|    621|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    621|#  define MINBPC(enc) 2
  ------------------
  167|    621|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    621|#define XML_TOK_COMMENT 13
  ------------------
  168|    641|        }
  169|    589|        break;
  170|   384k|      default:
  ------------------
  |  Branch (170:7): [True: 384k, False: 5.12k]
  ------------------
  171|   384k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   384k|#  define MINBPC(enc) 2
  ------------------
  172|   384k|        break;
  173|   389k|      }
  174|   389k|    }
  175|    785|  }
  176|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    809|}
xmltok.c:big2_scanPi:
  277|  5.48k|               const char **nextTokPtr) {
  278|  5.48k|  int tok;
  279|  5.48k|  const char *target = ptr;
  280|  5.48k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.48k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.48k|    {                                                                          \
  |  |  |  |  135|  5.48k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.48k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.48k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  5.48k|    }
  |  |  ------------------
  ------------------
  281|  5.47k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.47k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.47k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.55k, False: 914]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.48k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.44k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 891, False: 4.58k]
  |  |  ------------------
  |  |  111|  5.44k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    891|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    891|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    891|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 889]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  5.44k|    /* fall through */                                                         \
  |  |  116|  5.44k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.67k, False: 1.79k]
  |  |  ------------------
  |  |  117|  5.44k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 878, False: 4.59k]
  |  |  ------------------
  |  |  118|  5.44k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  5.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.44k|    break;                                                                     \
  |  |  120|  5.44k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |  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|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 5.45k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 5.46k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  5.47k|  }
  287|   281k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   281k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   281k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   281k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 13.1k, False: 268k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.36M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   275k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 268k, False: 13.1k]
  |  |  ------------------
  |  |   82|   275k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   268k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   268k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   268k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 267k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|   275k|    /* fall through */                                                         \
  |  |   87|   275k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.29k, False: 275k]
  |  |  ------------------
  |  |   88|   274k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.25k, False: 279k]
  |  |  ------------------
  |  |   89|   274k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 304, False: 280k]
  |  |  ------------------
  |  |   90|   275k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 204, False: 280k]
  |  |  ------------------
  |  |   91|   275k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 772, False: 280k]
  |  |  ------------------
  |  |   92|   275k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   275k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   275k|    break;                                                                     \
  |  |   94|   275k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 281k]
  |  |  |  |  ------------------
  |  |  |  |   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: 281k]
  |  |  |  |  ------------------
  |  |  |  |   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: 281k]
  |  |  |  |  ------------------
  |  |  |  |   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|    730|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 730, False: 280k]
  ------------------
  291|  1.93k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.20k, False: 279k]
  ------------------
  292|  2.26k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 327, False: 280k]
  ------------------
  293|  2.26k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.26k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.25k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.25k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.25k|#  define MINBPC(enc) 2
  ------------------
  298|   146k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   146k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   146k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   146k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 36.4k, False: 110k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  20.9k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |   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: 146k]
  |  |  |  |  ------------------
  |  |  |  |   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.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.4k, False: 136k]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 10.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  10.4k|#    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.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.4k|    break;
  |  |  ------------------
  |  |   63|  10.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 25, False: 146k]
  |  |  ------------------
  |  |   64|     25|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 146k]
  |  |  ------------------
  |  |   65|     29|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 146k]
  |  |  ------------------
  |  |   66|     29|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     29|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.81k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.81k, False: 142k]
  ------------------
  302|  3.81k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.81k|#  define MINBPC(enc) 2
  ------------------
  303|  3.81k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.81k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.81k|    {                                                                          \
  |  |  |  |  135|  3.81k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.81k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.81k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 3.80k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  3.81k|    }
  |  |  ------------------
  ------------------
  304|  3.80k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.80k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.80k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.36k, False: 447]
  |  |  |  |  |  Branch (872:49): [True: 2.08k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.08k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.08k|#  define MINBPC(enc) 2
  ------------------
  306|  2.08k|            return tok;
  307|  2.08k|          }
  308|  1.72k|          break;
  309|   132k|        default:
  ------------------
  |  Branch (309:9): [True: 132k, False: 14.2k]
  ------------------
  310|   132k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   132k|#  define MINBPC(enc) 2
  ------------------
  311|   132k|          break;
  312|   146k|        }
  313|   146k|      }
  314|    112|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    112|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.06k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.06k, False: 278k]
  ------------------
  316|  3.06k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  3.06k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.06k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.06k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.06k|#  define MINBPC(enc) 2
  ------------------
  321|  3.06k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.06k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.06k|    {                                                                          \
  |  |  |  |  135|  3.06k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.06k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 47, False: 3.01k]
  |  |  |  |  ------------------
  |  |  |  |  136|     47|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     47|      }                                                                        \
  |  |  |  |  138|  3.06k|    }
  |  |  ------------------
  ------------------
  322|  3.01k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.01k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.01k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.00k, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 2.99k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.99k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.99k|#  define MINBPC(enc) 2
  ------------------
  324|  2.99k|        return tok;
  325|  2.99k|      }
  326|       |      /* fall through */
  327|     36|    default:
  ------------------
  |  Branch (327:5): [True: 15, False: 281k]
  ------------------
  328|     36|      *nextTokPtr = ptr;
  329|     36|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     36|#define XML_TOK_INVALID 0
  ------------------
  330|   281k|    }
  331|   281k|  }
  332|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.44k|}
xmltok.c:big2_checkPiTarget:
  232|  5.32k|                      int *tokPtr) {
  233|  5.32k|  int upper = 0;
  234|  5.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.32k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.32k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.32k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.32k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  5.32k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.11k, False: 3.20k]
  ------------------
  237|  2.11k|    return 1;
  238|  3.20k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.20k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.20k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.64k, False: 560]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.52k|  case ASCII_x:
  ------------------
  |  |   86|  1.52k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.52k, False: 1.67k]
  ------------------
  240|  1.52k|    break;
  241|  1.00k|  case ASCII_X:
  ------------------
  |  |   59|  1.00k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.00k, False: 2.20k]
  ------------------
  242|  1.00k|    upper = 1;
  243|  1.00k|    break;
  244|    675|  default:
  ------------------
  |  Branch (244:3): [True: 675, False: 2.53k]
  ------------------
  245|    675|    return 1;
  246|  3.20k|  }
  247|  2.53k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.53k|#  define MINBPC(enc) 2
  ------------------
  248|  2.53k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.53k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.53k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.91k, False: 612]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    914|  case ASCII_m:
  ------------------
  |  |   75|    914|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 914, False: 1.61k]
  ------------------
  250|    914|    break;
  251|    688|  case ASCII_M:
  ------------------
  |  |   48|    688|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 688, False: 1.84k]
  ------------------
  252|    688|    upper = 1;
  253|    688|    break;
  254|    929|  default:
  ------------------
  |  Branch (254:3): [True: 929, False: 1.60k]
  ------------------
  255|    929|    return 1;
  256|  2.53k|  }
  257|  1.60k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.60k|#  define MINBPC(enc) 2
  ------------------
  258|  1.60k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.60k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.60k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.05k, False: 544]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     33|  case ASCII_l:
  ------------------
  |  |   74|     33|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 33, False: 1.56k]
  ------------------
  260|     33|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.60k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.56k|  default:
  ------------------
  |  Branch (264:3): [True: 1.56k, False: 35]
  ------------------
  265|  1.56k|    return 1;
  266|  1.60k|  }
  267|     35|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 32]
  ------------------
  268|      3|    return 0;
  269|     32|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     32|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     32|  return 1;
  271|     35|}
xmltok.c:big2_scanPercent:
  924|  2.30k|                    const char **nextTokPtr) {
  925|  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: 19, False: 2.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|     19|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     19|      }                                                                        \
  |  |  |  |  138|  2.30k|    }
  |  |  ------------------
  ------------------
  926|  2.28k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.28k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.28k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.09k, False: 188]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    732|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.08k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 175, False: 2.11k]
  |  |  ------------------
  |  |  111|  1.08k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    175|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    175|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    175|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 161]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.08k|    /* fall through */                                                         \
  |  |  116|  1.08k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 386, False: 1.90k]
  |  |  ------------------
  |  |  117|  1.08k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 537, False: 1.75k]
  |  |  ------------------
  |  |  118|  1.08k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.08k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.08k|    break;                                                                     \
  |  |  120|  1.08k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.28k]
  |  |  |  |  ------------------
  |  |  |  |  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.28k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.28k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    685|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 685, False: 1.60k]
  ------------------
  929|    978|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 293, False: 1.99k]
  ------------------
  930|  1.17k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 195, False: 2.09k]
  ------------------
  931|  1.17k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.28k]
  ------------------
  932|  1.17k|    *nextTokPtr = ptr;
  933|  1.17k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.17k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 2.28k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  2.28k|  }
  938|  2.99k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.99k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.99k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.99k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.36k, False: 624]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.91k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.97k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 602, False: 2.39k]
  |  |  ------------------
  |  |   82|  1.97k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    602|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    602|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    602|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 30, False: 572]
  |  |  ------------------
  |  |   83|     30|      *nextTokPtr = ptr;                                                       \
  |  |   84|     30|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     30|    }                                                                          \
  |  |   86|  1.97k|    /* fall through */                                                         \
  |  |   87|  1.97k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 207, False: 2.78k]
  |  |  ------------------
  |  |   88|  1.13k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 360, False: 2.63k]
  |  |  ------------------
  |  |   89|  1.58k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 448, False: 2.54k]
  |  |  ------------------
  |  |   90|  1.78k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.79k]
  |  |  ------------------
  |  |   91|  1.97k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 197, False: 2.79k]
  |  |  ------------------
  |  |   92|  1.97k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.97k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.97k|    break;                                                                     \
  |  |   94|  1.97k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.99k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.99k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.97k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  941|    960|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 960, False: 2.03k]
  ------------------
  942|    960|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    960|#  define MINBPC(enc) 2
  ------------------
  943|    960|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    960|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     11|    default:
  ------------------
  |  Branch (944:5): [True: 11, False: 2.98k]
  ------------------
  945|     11|      *nextTokPtr = ptr;
  946|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  947|  2.99k|    }
  948|  2.99k|  }
  949|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.08k|}
xmltok.c:big2_scanPoundName:
  954|  2.32k|                      const char **nextTokPtr) {
  955|  2.32k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.32k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.32k|    {                                                                          \
  |  |  |  |  135|  2.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.32k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.32k|    }
  |  |  ------------------
  ------------------
  956|  2.32k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.32k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.32k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.22k, False: 101]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  2.16k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.28k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 68, False: 2.25k]
  |  |  ------------------
  |  |  111|  2.28k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     68|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     68|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     68|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 56]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  2.28k|    /* fall through */                                                         \
  |  |  116|  2.28k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.99k, False: 335]
  |  |  ------------------
  |  |  117|  2.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 233, False: 2.09k]
  |  |  ------------------
  |  |  118|  2.28k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.28k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.28k|    break;                                                                     \
  |  |  120|  2.28k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |  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.32k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     28|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 28, False: 2.29k]
  |  |  |  |  ------------------
  |  |  |  |  100|     28|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     24|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     48|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     24|    }                                                                          \
  |  |  |  |  106|     24|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 2.32k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  2.32k|  }
  962|  16.2k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  16.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  16.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  16.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.9k, False: 282]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  48.1k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  13.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 268, False: 15.9k]
  |  |  ------------------
  |  |   82|  13.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    268|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    268|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    268|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 9, False: 259]
  |  |  ------------------
  |  |   83|      9|      *nextTokPtr = ptr;                                                       \
  |  |   84|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      9|    }                                                                          \
  |  |   86|  13.9k|    /* fall through */                                                         \
  |  |   87|  13.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 7.08k, False: 9.11k]
  |  |  ------------------
  |  |   88|  13.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 5.90k, False: 10.3k]
  |  |  ------------------
  |  |   89|  13.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 215, False: 15.9k]
  |  |  ------------------
  |  |   90|  13.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 317, False: 15.8k]
  |  |  ------------------
  |  |   91|  13.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 203, False: 16.0k]
  |  |  ------------------
  |  |   92|  13.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  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: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 16.1k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  1.07k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 1.07k, False: 15.1k]
  ------------------
  966|  1.27k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 198, False: 16.0k]
  ------------------
  967|  1.40k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 130, False: 16.0k]
  ------------------
  968|  1.70k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 301, False: 15.9k]
  ------------------
  969|  1.99k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 293, False: 15.9k]
  ------------------
  970|  2.00k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 16.2k]
  ------------------
  971|  2.19k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 197, False: 16.0k]
  ------------------
  972|  2.19k|      *nextTokPtr = ptr;
  973|  2.19k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.19k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     10|    default:
  ------------------
  |  Branch (974:5): [True: 10, False: 16.1k]
  ------------------
  975|     10|      *nextTokPtr = ptr;
  976|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  977|  16.2k|    }
  978|  16.2k|  }
  979|     57|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     57|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.28k|}
xmltok.c:big2_contentTok:
  824|  54.2k|                   const char **nextTokPtr) {
  825|  54.2k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.05k, False: 53.2k]
  ------------------
  826|  1.05k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.05k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  53.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  53.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  53.2k|    size_t n = end - ptr;
  829|  53.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  53.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 18.2k, False: 34.9k]
  ------------------
  830|  18.2k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  18.2k|#  define MINBPC(enc) 2
  ------------------
  831|  18.2k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 114, False: 18.1k]
  ------------------
  832|    114|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    114|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  18.1k|      end = ptr + n;
  834|  18.1k|    }
  835|  53.2k|  }
  836|  53.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  53.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  53.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 44.6k, False: 8.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  15.9k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 15.9k, False: 37.1k]
  ------------------
  838|  15.9k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  15.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  15.9k|#  define MINBPC(enc) 2
  ------------------
  839|  9.85k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.85k, False: 43.2k]
  ------------------
  840|  9.85k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  9.85k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  9.85k|#  define MINBPC(enc) 2
  ------------------
  841|  8.33k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 8.33k, False: 44.7k]
  ------------------
  842|  8.33k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.33k|#  define MINBPC(enc) 2
  ------------------
  843|  8.33k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.33k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.33k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 20, False: 8.31k]
  ------------------
  844|     20|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     20|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  8.31k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  8.31k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.31k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.55k, False: 3.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 806, False: 7.51k]
  ------------------
  846|    806|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    806|#  define MINBPC(enc) 2
  ------------------
  847|  8.31k|    *nextTokPtr = ptr;
  848|  8.31k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.31k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.28k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.28k, False: 50.8k]
  ------------------
  850|  2.28k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.28k|#  define MINBPC(enc) 2
  ------------------
  851|  2.28k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.28k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  3.77k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 3.77k, False: 49.3k]
  ------------------
  853|  3.77k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.77k|#  define MINBPC(enc) 2
  ------------------
  854|  3.77k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.77k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.77k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.77k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 4, False: 3.77k]
  ------------------
  855|      4|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      4|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  3.77k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  3.77k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.77k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.87k, False: 900]
  |  |  |  |  |  Branch (872:49): [True: 2.16k, False: 706]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.60k|      break;
  858|  2.16k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.16k|#  define MINBPC(enc) 2
  ------------------
  859|  2.16k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  2.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 5, False: 2.16k]
  ------------------
  860|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  2.16k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.16k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.16k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.39k, False: 765]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  2.15k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  2.15k|#  define MINBPC(enc) 2
  ------------------
  863|  2.15k|      break;
  864|  2.15k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  5.97k|    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|  2.95k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.89k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.95k, False: 50.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.95k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 59, False: 2.89k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.89k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     59|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.89k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.89k|#    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.89k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.89k|    break;
  |  |  ------------------
  |  |   63|  2.89k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 64, False: 53.0k]
  |  |  ------------------
  |  |   64|     64|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 53.1k]
  |  |  ------------------
  |  |   65|     77|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 13, False: 53.1k]
  |  |  ------------------
  |  |   66|     77|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     77|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     77|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  9.85k|  default:
  ------------------
  |  Branch (868:3): [True: 9.85k, False: 43.2k]
  ------------------
  869|  9.85k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.85k|#  define MINBPC(enc) 2
  ------------------
  870|  9.85k|    break;
  871|  53.1k|  }
  872|   528k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   528k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   528k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   528k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  51.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 51.6k, False: 476k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 528k]
  |  |  ------------------
  |  |  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: 528k]
  |  |  ------------------
  |  |  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|  24.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  24.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 24.5k, False: 503k]
  |  |  ------------------
  |  |  876|  24.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  24.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 24.4k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|  24.4k|    ptr += n;                                                                  \
  |  |  881|  24.4k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  8.62k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 8.62k, False: 519k]
  ------------------
  887|  8.62k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  8.62k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  8.62k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 8.62k, False: 1]
  |  |  ------------------
  ------------------
  888|  8.62k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  8.62k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  8.62k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.43k, False: 2.19k]
  |  |  |  |  |  Branch (872:49): [True: 3.28k, False: 3.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  5.34k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.34k|#  define MINBPC(enc) 2
  ------------------
  890|  5.34k|          break;
  891|  5.34k|        }
  892|  3.28k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  3.28k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.28k, False: 4]
  |  |  ------------------
  ------------------
  893|  3.28k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  3.28k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.28k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.34k, False: 935]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 2.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.27k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.27k|#  define MINBPC(enc) 2
  ------------------
  895|  3.27k|            break;
  896|  3.27k|          }
  897|      3|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      3|#  define MINBPC(enc) 2
  ------------------
  898|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  899|  3.28k|        }
  900|  3.28k|      }
  901|       |      /* fall through */
  902|  4.29k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 4.28k, False: 524k]
  ------------------
  903|  7.69k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.40k, False: 524k]
  ------------------
  904|  7.75k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 54, False: 528k]
  ------------------
  905|  7.75k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 528k]
  ------------------
  906|  7.76k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 528k]
  ------------------
  907|  14.4k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 6.64k, False: 521k]
  ------------------
  908|  16.0k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.69k, False: 526k]
  ------------------
  909|  16.0k|      *nextTokPtr = ptr;
  910|  16.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   479k|    default:
  ------------------
  |  Branch (911:5): [True: 479k, False: 49.2k]
  ------------------
  912|   479k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   479k|#  define MINBPC(enc) 2
  ------------------
  913|   479k|      break;
  914|   528k|    }
  915|   528k|  }
  916|    365|  *nextTokPtr = ptr;
  917|    365|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    365|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  16.5k|}
xmltok.c:big2_scanLt:
  726|  15.9k|               const char **nextTokPtr) {
  727|  15.9k|#  ifdef XML_NS
  728|  15.9k|  int hadColon;
  729|  15.9k|#  endif
  730|  15.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.9k|    {                                                                          \
  |  |  |  |  135|  15.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  15.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 16, False: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     16|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     16|      }                                                                        \
  |  |  |  |  138|  15.9k|    }
  |  |  ------------------
  ------------------
  731|  15.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  15.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.9k|  ((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:4): [True: 12.0k, False: 3.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  12.2k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.88k, False: 12.0k]
  |  |  ------------------
  |  |  111|  10.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.88k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.88k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.88k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 3.86k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  10.2k|    /* fall through */                                                         \
  |  |  116|  10.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.46k, False: 11.4k]
  |  |  ------------------
  |  |  117|  10.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.93k, False: 14.0k]
  |  |  ------------------
  |  |  118|  10.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  10.2k|    break;                                                                     \
  |  |  120|  10.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  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: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  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: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  733|    964|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 964, False: 15.0k]
  ------------------
  734|    964|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    964|#  define MINBPC(enc) 2
  ------------------
  735|    964|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    964|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    964|    {                                                                          \
  |  |  |  |  135|    964|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    964|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    964|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 963]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    964|    }
  |  |  ------------------
  ------------------
  736|    963|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    963|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    963|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    950|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 19, False: 944]
  |  |  |  |  |  Branch (870:4): [True: 950, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    377|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 377, False: 586]
  ------------------
  738|    377|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    377|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    377|#  define MINBPC(enc) 2
  ------------------
  739|    567|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 567, False: 396]
  ------------------
  740|    567|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    567|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    567|#  define MINBPC(enc) 2
  ------------------
  741|    963|    }
  742|     19|    *nextTokPtr = ptr;
  743|     19|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  744|  2.97k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.97k, False: 12.9k]
  ------------------
  745|  2.97k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.97k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.97k|#  define MINBPC(enc) 2
  ------------------
  746|  1.71k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.71k, False: 14.2k]
  ------------------
  747|  1.71k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.71k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.71k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 15.9k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  15.9k|  }
  752|  10.2k|#  ifdef XML_NS
  753|  10.2k|  hadColon = 0;
  754|  10.2k|#  endif
  755|       |  /* we have a start-tag */
  756|  74.5k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  74.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  74.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  74.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.6k, False: 61.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   315k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  64.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 61.8k, False: 12.7k]
  |  |  ------------------
  |  |   82|  64.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  61.8k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  61.8k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  61.8k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 61.8k]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  64.3k|    /* fall through */                                                         \
  |  |   87|  64.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.20k, False: 73.3k]
  |  |  ------------------
  |  |   88|  63.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 411, False: 74.1k]
  |  |  ------------------
  |  |   89|  63.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 201, False: 74.3k]
  |  |  ------------------
  |  |   90|  63.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 286, False: 74.2k]
  |  |  ------------------
  |  |   91|  64.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 413, False: 74.1k]
  |  |  ------------------
  |  |   92|  64.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  64.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  64.3k|    break;                                                                     \
  |  |   94|  64.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 74.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 74.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 74.5k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 74.5k]
  ------------------
  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|  1.80k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.80k, False: 72.7k]
  ------------------
  777|  2.65k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 849, False: 73.6k]
  ------------------
  778|  4.12k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.46k, False: 73.0k]
  ------------------
  779|  4.12k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.12k|#  define MINBPC(enc) 2
  ------------------
  780|  5.49k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.49k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.49k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.49k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.75k, False: 741]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  2.73k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.85k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 719, False: 4.77k]
  |  |  ------------------
  |  |  111|  2.85k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    719|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    719|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    719|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 705]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  2.85k|    /* fall through */                                                         \
  |  |  116|  2.85k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.28k, False: 4.21k]
  |  |  ------------------
  |  |  117|  2.85k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 869, False: 4.62k]
  |  |  ------------------
  |  |  118|  2.85k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.85k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.85k|    break;                                                                     \
  |  |  120|  2.85k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.49k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.49k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |  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|    819|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 819, False: 4.67k]
  ------------------
  784|    819|          goto gt;
  785|    363|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 363, False: 5.13k]
  ------------------
  786|    363|          goto sol;
  787|    509|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 509, False: 4.98k]
  ------------------
  788|    896|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 387, False: 5.10k]
  ------------------
  789|  1.41k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 521, False: 4.97k]
  ------------------
  790|  1.41k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.41k|#  define MINBPC(enc) 2
  ------------------
  791|  1.41k|          continue;
  792|      7|        default:
  ------------------
  |  Branch (792:9): [True: 7, False: 5.48k]
  ------------------
  793|      7|          *nextTokPtr = ptr;
  794|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  795|  5.49k|        }
  796|  2.85k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  2.85k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  5.49k|      }
  798|     43|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.12k|    }
  800|  5.75k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.75k, False: 68.7k]
  ------------------
  801|  6.57k|    gt:
  802|  6.57k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.57k|#  define MINBPC(enc) 2
  ------------------
  803|  6.57k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.57k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    276|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 276, False: 74.2k]
  ------------------
  805|    639|    sol:
  806|    639|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    639|#  define MINBPC(enc) 2
  ------------------
  807|    639|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    639|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    639|    {                                                                          \
  |  |  |  |  135|    639|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    639|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    639|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 628]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    639|    }
  |  |  ------------------
  ------------------
  808|    628|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    628|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    628|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 614, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 603, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     25|        *nextTokPtr = ptr;
  810|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  811|     25|      }
  812|    603|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    603|#  define MINBPC(enc) 2
  ------------------
  813|    603|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    603|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     16|    default:
  ------------------
  |  Branch (814:5): [True: 16, False: 74.5k]
  ------------------
  815|     16|      *nextTokPtr = ptr;
  816|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  817|  74.5k|    }
  818|  74.5k|  }
  819|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  10.2k|}
xmltok.c:big2_scanCdataSection:
  337|    567|                         const char **nextTokPtr) {
  338|    567|  static const char CDATA_LSQB[]
  339|    567|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    567|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    567|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    567|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    567|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    567|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    567|#define ASCII_LSQB 0x5B
  ------------------
  340|    567|  int i;
  341|    567|  UNUSED_P(enc);
  ------------------
  |  |  135|    567|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    567|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    567|    {                                                                          \
  |  |  135|    567|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    567|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    567|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 562]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    567|    }
  ------------------
  344|  3.87k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.31k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.32k, False: 547]
  ------------------
  345|  3.32k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.32k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 3.31k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     15|      *nextTokPtr = ptr;
  347|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  348|     15|    }
  349|  3.32k|  }
  350|    547|  *nextTokPtr = ptr;
  351|    547|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    547|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    562|}
xmltok.c:big2_scanEndTag:
  432|  1.71k|                   const char **nextTokPtr) {
  433|  1.71k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.71k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.71k|    {                                                                          \
  |  |  |  |  135|  1.71k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.71k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.71k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.71k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.71k|    }
  |  |  ------------------
  ------------------
  434|  1.71k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.71k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.71k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.26k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.26k, False: 453]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.64k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.68k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 424, False: 1.29k]
  |  |  ------------------
  |  |  111|  1.68k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    424|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    424|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    424|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 423]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.68k|    /* fall through */                                                         \
  |  |  116|  1.68k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 750, False: 965]
  |  |  ------------------
  |  |  117|  1.68k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 512, False: 1.20k]
  |  |  ------------------
  |  |  118|  1.68k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.68k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.68k|    break;                                                                     \
  |  |  120|  1.68k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.71k]
  |  |  |  |  ------------------
  |  |  |  |  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.71k]
  |  |  |  |  ------------------
  |  |  |  |  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: 1.69k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|     20|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.71k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.71k|  }
  440|  2.99k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.99k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.99k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.99k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.59k, False: 401]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  3.89k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 376, False: 2.62k]
  |  |  ------------------
  |  |   82|  1.37k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    376|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    376|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    376|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 360]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  1.37k|    /* fall through */                                                         \
  |  |   87|  1.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 209, False: 2.78k]
  |  |  ------------------
  |  |   88|    770|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 201, False: 2.79k]
  |  |  ------------------
  |  |   89|    967|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 197, False: 2.80k]
  |  |  ------------------
  |  |   90|  1.17k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 212, False: 2.78k]
  |  |  ------------------
  |  |   91|  1.37k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 2.80k]
  |  |  ------------------
  |  |   92|  1.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.37k|    break;                                                                     \
  |  |   94|  1.37k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.99k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.99k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.97k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  443|    571|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 571, False: 2.42k]
  ------------------
  444|    902|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 331, False: 2.66k]
  ------------------
  445|  1.11k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 213, False: 2.78k]
  ------------------
  446|  1.92k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.11k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    842|#  define MINBPC(enc) 2
  ------------------
  447|  1.92k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.92k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.92k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.88k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.88k, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    271|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 271, False: 1.64k]
  ------------------
  449|    599|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 328, False: 1.59k]
  ------------------
  450|    842|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 243, False: 1.67k]
  ------------------
  451|    842|          break;
  452|  1.03k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.03k, False: 885]
  ------------------
  453|  1.03k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.03k|#  define MINBPC(enc) 2
  ------------------
  454|  1.03k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.03k|#define XML_TOK_END_TAG 5
  ------------------
  455|     43|        default:
  ------------------
  |  Branch (455:9): [True: 43, False: 1.87k]
  ------------------
  456|     43|          *nextTokPtr = ptr;
  457|     43|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     43|#define XML_TOK_INVALID 0
  ------------------
  458|  1.92k|        }
  459|  1.92k|      }
  460|     37|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     37|#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.99k]
  ------------------
  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|    463|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 463, False: 2.53k]
  ------------------
  469|    463|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    463|#  define MINBPC(enc) 2
  ------------------
  470|    463|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    463|#define XML_TOK_END_TAG 5
  ------------------
  471|     10|    default:
  ------------------
  |  Branch (471:5): [True: 10, False: 2.98k]
  ------------------
  472|     10|      *nextTokPtr = ptr;
  473|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  474|  2.99k|    }
  475|  2.99k|  }
  476|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.68k|}
xmltok.c:big2_scanAtts:
  573|  2.85k|                 const char **nextTokPtr) {
  574|  2.85k|#  ifdef XML_NS
  575|  2.85k|  int hadColon = 0;
  576|  2.85k|#  endif
  577|   295k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   295k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   295k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   295k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   294k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 294k, False: 1.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|   115k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  29.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 982, False: 294k]
  |  |  ------------------
  |  |   82|  29.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    982|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    982|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    982|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 961]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  29.9k|    /* fall through */                                                         \
  |  |   87|  29.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 24.5k, False: 271k]
  |  |  ------------------
  |  |   88|  29.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.79k, False: 292k]
  |  |  ------------------
  |  |   89|  29.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 210, False: 295k]
  |  |  ------------------
  |  |   90|  29.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 295k]
  |  |  ------------------
  |  |   91|  29.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 251, False: 295k]
  |  |  ------------------
  |  |   92|  29.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  29.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  29.9k|    break;                                                                     \
  |  |   94|  29.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 295k]
  |  |  |  |  ------------------
  |  |  |  |   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: 295k]
  |  |  |  |  ------------------
  |  |  |  |   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|     24|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 295k]
  |  |  |  |  ------------------
  |  |  |  |   71|     24|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 295k]
  ------------------
  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|    659|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 659, False: 295k]
  ------------------
  598|    885|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 226, False: 295k]
  ------------------
  599|  1.52k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 640, False: 295k]
  ------------------
  600|  2.57k|      for (;;) {
  601|  2.57k|        int t;
  602|       |
  603|  2.57k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.57k|#  define MINBPC(enc) 2
  ------------------
  604|  2.57k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.57k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.57k|    {                                                                          \
  |  |  |  |  135|  2.57k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.57k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 2.53k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  2.57k|    }
  |  |  ------------------
  ------------------
  605|  2.53k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.53k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.53k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.50k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.50k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.53k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.44k, False: 1.08k]
  ------------------
  607|  1.44k|          break;
  608|  1.08k|        switch (t) {
  609|    515|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 515, False: 571]
  ------------------
  610|    855|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 340, False: 746]
  ------------------
  611|  1.05k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 196, False: 890]
  ------------------
  612|  1.05k|          break;
  613|     35|        default:
  ------------------
  |  Branch (613:9): [True: 35, False: 1.05k]
  ------------------
  614|     35|          *nextTokPtr = ptr;
  615|     35|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  616|  1.08k|        }
  617|  1.08k|      }
  618|       |      /* fall through */
  619|   265k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 264k, False: 31.5k]
  ------------------
  620|   265k|      int open;
  621|   265k|#  ifdef XML_NS
  622|   265k|      hadColon = 0;
  623|   265k|#  endif
  624|   266k|      for (;;) {
  625|   266k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   266k|#  define MINBPC(enc) 2
  ------------------
  626|   266k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   266k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   266k|    {                                                                          \
  |  |  |  |  135|   266k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   266k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   266k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 266k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   266k|    }
  |  |  ------------------
  ------------------
  627|   266k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   266k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   266k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   266k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 266k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   266k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 74.6k, False: 191k]
  |  Branch (628:32): [True: 190k, False: 1.04k]
  ------------------
  629|   265k|          break;
  630|  1.04k|        switch (open) {
  631|    605|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 605, False: 443]
  ------------------
  632|    823|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 218, False: 830]
  ------------------
  633|  1.02k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 198, False: 850]
  ------------------
  634|  1.02k|          break;
  635|     27|        default:
  ------------------
  |  Branch (635:9): [True: 27, False: 1.02k]
  ------------------
  636|     27|          *nextTokPtr = ptr;
  637|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  638|  1.04k|        }
  639|  1.04k|      }
  640|   265k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   265k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  4.33M|      for (;;) {
  643|  4.33M|        int t;
  644|  4.33M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.33M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.33M|    {                                                                          \
  |  |  |  |  135|  4.33M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.33M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.33M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 68, False: 4.33M]
  |  |  |  |  ------------------
  |  |  |  |  136|     68|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     68|      }                                                                        \
  |  |  |  |  138|  4.33M|    }
  |  |  ------------------
  ------------------
  645|  4.33M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  4.33M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.33M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.09M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.09M, False: 3.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  4.33M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 265k, False: 4.06M]
  ------------------
  647|   265k|          break;
  648|  4.06M|        switch (t) {
  649|   110k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 4.06M]
  |  |  |  |  ------------------
  |  |  |  |   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: 4.06M]
  |  |  |  |  ------------------
  |  |  |  |   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|  55.2k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  55.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 55.2k, False: 4.01M]
  |  |  |  |  ------------------
  |  |  |  |   50|  55.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 27, False: 55.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  55.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     27|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  55.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  55.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|  55.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  55.1k|    break;
  |  |  ------------------
  |  |   63|  55.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 4.06M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 4.06M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 4.06M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  12.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 12.9k, False: 4.05M]
  ------------------
  651|  12.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  12.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  12.9k|#  define MINBPC(enc) 2
  ------------------
  652|  12.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 17, False: 12.9k]
  ------------------
  653|     17|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 11, False: 6]
  ------------------
  654|     11|              *nextTokPtr = ptr;
  655|     17|            return tok;
  656|     17|          }
  657|  12.9k|          break;
  658|  12.9k|        }
  659|  12.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 5, False: 4.06M]
  ------------------
  660|      5|          *nextTokPtr = ptr;
  661|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  662|  3.99M|        default:
  ------------------
  |  Branch (662:9): [True: 3.99M, False: 68.1k]
  ------------------
  663|  3.99M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.99M|#  define MINBPC(enc) 2
  ------------------
  664|  3.99M|          break;
  665|  4.06M|        }
  666|  4.06M|      }
  667|   265k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   265k|#  define MINBPC(enc) 2
  ------------------
  668|   265k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   265k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   265k|    {                                                                          \
  |  |  |  |  135|   265k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   265k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   265k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 265k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|   265k|    }
  |  |  ------------------
  ------------------
  669|   265k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   265k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   265k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   265k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 265k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   260k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 260k, False: 4.88k]
  ------------------
  671|   263k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.56k, False: 262k]
  ------------------
  672|   263k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 736, False: 264k]
  ------------------
  673|   263k|        break;
  674|    480|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 480, False: 265k]
  ------------------
  675|    480|        goto sol;
  676|  1.08k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.08k, False: 264k]
  ------------------
  677|  1.08k|        goto gt;
  678|     25|      default:
  ------------------
  |  Branch (678:7): [True: 25, False: 265k]
  ------------------
  679|     25|        *nextTokPtr = ptr;
  680|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  681|   265k|      }
  682|       |      /* ptr points to closing quote */
  683|   284k|      for (;;) {
  684|   284k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   284k|#  define MINBPC(enc) 2
  ------------------
  685|   284k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   284k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   284k|    {                                                                          \
  |  |  |  |  135|   284k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   284k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   284k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 284k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|   284k|    }
  |  |  ------------------
  ------------------
  686|   284k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   284k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   284k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   281k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 281k, False: 2.82k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   127k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   263k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.79k, False: 281k]
  |  |  ------------------
  |  |  111|   263k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.79k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.79k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.79k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 2.78k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|   263k|    /* fall through */                                                         \
  |  |  116|   263k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 121k, False: 162k]
  |  |  ------------------
  |  |  117|   263k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 138k, False: 146k]
  |  |  ------------------
  |  |  118|   263k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   263k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   263k|    break;                                                                     \
  |  |  120|   263k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 284k]
  |  |  |  |  ------------------
  |  |  |  |  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: 284k]
  |  |  |  |  ------------------
  |  |  |  |  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|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 284k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|  19.9k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 19.9k, False: 264k]
  ------------------
  689|  20.2k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 237, False: 284k]
  ------------------
  690|  20.4k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 248, False: 284k]
  ------------------
  691|  20.4k|          continue;
  692|    552|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 552, False: 283k]
  ------------------
  693|  1.63k|        gt:
  694|  1.63k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.63k|#  define MINBPC(enc) 2
  ------------------
  695|  1.63k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.63k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    221|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 221, False: 284k]
  ------------------
  697|    701|        sol:
  698|    701|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    701|#  define MINBPC(enc) 2
  ------------------
  699|    701|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    701|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    701|    {                                                                          \
  |  |  |  |  135|    701|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    701|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    701|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 693]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|    701|    }
  |  |  ------------------
  ------------------
  700|    693|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    693|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    693|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 684, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 678, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     15|            *nextTokPtr = ptr;
  702|     15|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  703|     15|          }
  704|    678|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    678|#  define MINBPC(enc) 2
  ------------------
  705|    678|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    678|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      5|        default:
  ------------------
  |  Branch (706:9): [True: 5, False: 284k]
  ------------------
  707|      5|          *nextTokPtr = ptr;
  708|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  709|   284k|        }
  710|   263k|        break;
  711|   284k|      }
  712|   263k|      break;
  713|   263k|    }
  714|   263k|    default:
  ------------------
  |  Branch (714:5): [True: 14, False: 295k]
  ------------------
  715|     14|      *nextTokPtr = ptr;
  716|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  717|   295k|    }
  718|   295k|  }
  719|     82|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     82|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.85k|}
xmltok.c:big2_scanRef:
  545|  38.9k|                const char **nextTokPtr) {
  546|  38.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  38.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  38.9k|    {                                                                          \
  |  |  |  |  135|  38.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  38.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  38.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 49, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     49|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     49|      }                                                                        \
  |  |  |  |  138|  38.9k|    }
  |  |  ------------------
  ------------------
  547|  38.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  38.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  38.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  37.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 37.8k, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.14k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  32.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.04k, False: 37.8k]
  |  |  ------------------
  |  |  111|  32.7k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.04k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.04k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.04k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 8, False: 1.04k]
  |  |  ------------------
  |  |  112|      8|      *nextTokPtr = ptr;                                                       \
  |  |  113|      8|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      8|    }                                                                          \
  |  |  115|  32.7k|    /* fall through */                                                         \
  |  |  116|  32.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.03k, False: 34.8k]
  |  |  ------------------
  |  |  117|  32.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 27.6k, False: 11.2k]
  |  |  ------------------
  |  |  118|  32.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  32.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  32.7k|    break;                                                                     \
  |  |  120|  32.7k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  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: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  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|     10|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 38.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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;
  |  |  ------------------
  ------------------
  549|  6.15k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 6.15k, False: 32.7k]
  ------------------
  550|  6.15k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.15k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.15k|#  define MINBPC(enc) 2
  ------------------
  551|     12|  default:
  ------------------
  |  Branch (551:3): [True: 12, False: 38.9k]
  ------------------
  552|     12|    *nextTokPtr = ptr;
  553|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  554|  38.9k|  }
  555|  52.3k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  52.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  52.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  52.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  45.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 45.8k, False: 6.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  79.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.49k, False: 45.9k]
  |  |  ------------------
  |  |   82|  19.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  6.49k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  6.49k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.49k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 6.46k]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  19.7k|    /* fall through */                                                         \
  |  |   87|  19.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 10.8k, False: 41.5k]
  |  |  ------------------
  |  |   88|  18.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 786, False: 51.6k]
  |  |  ------------------
  |  |   89|  18.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 517, False: 51.8k]
  |  |  ------------------
  |  |   90|  19.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 835, False: 51.5k]
  |  |  ------------------
  |  |   91|  19.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 284, False: 52.1k]
  |  |  ------------------
  |  |   92|  19.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  19.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.7k|    break;                                                                     \
  |  |   94|  19.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 52.3k]
  |  |  |  |  ------------------
  |  |  |  |   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: 52.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 52.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  32.6k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 32.6k, False: 19.7k]
  ------------------
  559|  32.6k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  32.6k|#  define MINBPC(enc) 2
  ------------------
  560|  32.6k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  32.6k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     11|    default:
  ------------------
  |  Branch (561:5): [True: 11, False: 52.3k]
  ------------------
  562|     11|      *nextTokPtr = ptr;
  563|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  564|  52.3k|    }
  565|  52.3k|  }
  566|     52|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     52|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  32.7k|}
xmltok.c:big2_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)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.15k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.14k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  6.14k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  6.14k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.14k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.13k, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 4.56k, False: 1.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.56k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.56k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.56k|#  define MINBPC(enc) 2
  ------------------
  518|  1.58k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.58k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.58k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.57k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.56k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.56k, False: 26]
  ------------------
  520|  1.56k|      break;
  521|     26|    default:
  ------------------
  |  Branch (521:5): [True: 26, False: 1.56k]
  ------------------
  522|     26|      *nextTokPtr = ptr;
  523|     26|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  524|  1.58k|    }
  525|  3.52k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.56k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.97k|#  define MINBPC(enc) 2
  ------------------
  526|  3.52k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.52k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.52k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.50k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.50k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.97k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.97k, False: 1.55k]
  ------------------
  528|  1.97k|        break;
  529|  1.52k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.52k, False: 2.00k]
  ------------------
  530|  1.52k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.52k|#  define MINBPC(enc) 2
  ------------------
  531|  1.52k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.52k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     29|      default:
  ------------------
  |  Branch (532:7): [True: 29, False: 3.49k]
  ------------------
  533|     29|        *nextTokPtr = ptr;
  534|     29|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  535|  3.52k|      }
  536|  3.52k|    }
  537|  1.56k|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  6.15k|}
xmltok.c:big2_scanHexCharRef:
  483|  4.56k|                       const char **nextTokPtr) {
  484|  4.56k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.56k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.56k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.56k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.55k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.55k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.55k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.55k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.55k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  2.16k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.16k, False: 2.39k]
  ------------------
  487|  4.54k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.38k, False: 2.17k]
  ------------------
  488|  4.54k|      break;
  489|     16|    default:
  ------------------
  |  Branch (489:5): [True: 16, False: 4.54k]
  ------------------
  490|     16|      *nextTokPtr = ptr;
  491|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  492|  4.55k|    }
  493|  15.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.54k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.2k|#  define MINBPC(enc) 2
  ------------------
  494|  15.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  15.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.7k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  6.69k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 6.69k, False: 9.05k]
  ------------------
  496|  11.2k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 4.52k, False: 11.2k]
  ------------------
  497|  11.2k|        break;
  498|  4.50k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.50k, False: 11.2k]
  ------------------
  499|  4.50k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.50k|#  define MINBPC(enc) 2
  ------------------
  500|  4.50k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.50k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     29|      default:
  ------------------
  |  Branch (501:7): [True: 29, False: 15.7k]
  ------------------
  502|     29|        *nextTokPtr = ptr;
  503|     29|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  504|  15.7k|      }
  505|  15.7k|    }
  506|  4.54k|  }
  507|     13|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.56k|}
xmltok.c:big2_cdataSectionTok:
  356|  39.5k|                        const char **nextTokPtr) {
  357|  39.5k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 151, False: 39.3k]
  ------------------
  358|    151|    return XML_TOK_NONE;
  ------------------
  |  |   51|    151|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  39.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  39.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  39.3k|    size_t n = end - ptr;
  361|  39.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  39.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.1k, False: 29.2k]
  ------------------
  362|  10.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  10.1k|#  define MINBPC(enc) 2
  ------------------
  363|  10.1k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 21, False: 10.0k]
  ------------------
  364|     21|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.0k|      end = ptr + n;
  366|  10.0k|    }
  367|  39.3k|  }
  368|  39.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  39.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 34.0k, False: 5.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  14.2k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 14.2k, False: 25.1k]
  ------------------
  370|  14.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.2k|#  define MINBPC(enc) 2
  ------------------
  371|  14.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.2k|    {                                                                          \
  |  |  |  |  135|  14.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 14.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  14.2k|    }
  |  |  ------------------
  ------------------
  372|  14.2k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  14.2k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  14.2k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 10.5k, False: 3.72k]
  |  |  |  |  |  Branch (872:49): [True: 6.93k, False: 3.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  7.30k|      break;
  374|  6.93k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.93k|#  define MINBPC(enc) 2
  ------------------
  375|  6.93k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.93k|    {                                                                          \
  |  |  |  |  135|  6.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.93k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 6.92k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  6.93k|    }
  |  |  ------------------
  ------------------
  376|  6.92k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  6.92k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.92k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.73k, False: 2.19k]
  |  |  |  |  |  Branch (872:49): [True: 237, False: 4.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  6.69k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  6.69k|#  define MINBPC(enc) 2
  ------------------
  378|  6.69k|      break;
  379|  6.69k|    }
  380|    237|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    237|#  define MINBPC(enc) 2
  ------------------
  381|    237|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    237|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  13.8k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 13.8k, False: 25.5k]
  ------------------
  383|  13.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.8k|#  define MINBPC(enc) 2
  ------------------
  384|  13.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.8k|    {                                                                          \
  |  |  |  |  135|  13.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 13.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  13.8k|    }
  |  |  ------------------
  ------------------
  385|  13.7k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  13.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.60k, False: 4.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 242, False: 13.5k]
  ------------------
  386|    242|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    242|#  define MINBPC(enc) 2
  ------------------
  387|  13.7k|    *nextTokPtr = ptr;
  388|  13.7k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  13.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.69k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.69k, False: 36.6k]
  ------------------
  390|  2.69k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.69k|#  define MINBPC(enc) 2
  ------------------
  391|  2.69k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.69k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  3.05k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 39.3k]
  |  |  |  |  ------------------
  |  |  |  |   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: 39.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.49k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.43k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.49k, False: 37.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.49k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 58, False: 1.43k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.43k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     58|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.43k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.43k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.43k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.43k|    break;
  |  |  ------------------
  |  |   63|  1.43k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 59, False: 39.2k]
  |  |  ------------------
  |  |   64|     59|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 39.3k]
  |  |  ------------------
  |  |   65|     66|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 39.3k]
  |  |  ------------------
  |  |   66|     66|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     66|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     66|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  7.05k|  default:
  ------------------
  |  Branch (393:3): [True: 7.05k, False: 32.2k]
  ------------------
  394|  7.05k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.05k|#  define MINBPC(enc) 2
  ------------------
  395|  7.05k|    break;
  396|  39.3k|  }
  397|  1.94M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.94M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.94M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.94M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  58.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 58.6k, False: 1.89M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.94M]
  |  |  ------------------
  |  |  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.94M]
  |  |  ------------------
  |  |  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|  23.5k|      LEAD_CASE(4)
  ------------------
  |  |  400|  23.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 23.5k, False: 1.92M]
  |  |  ------------------
  |  |  401|  23.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  23.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 52, False: 23.4k]
  |  |  ------------------
  |  |  402|     52|      *nextTokPtr = ptr;                                                       \
  |  |  403|     52|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     52|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     52|    }                                                                          \
  |  |  405|  23.4k|    ptr += n;                                                                  \
  |  |  406|  23.4k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     56|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 56, False: 1.94M]
  ------------------
  412|     56|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.94M]
  ------------------
  413|     61|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 1.94M]
  ------------------
  414|  9.99k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 9.93k, False: 1.93M]
  ------------------
  415|  12.4k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 2.44k, False: 1.94M]
  ------------------
  416|  22.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 9.86k, False: 1.93M]
  ------------------
  417|  22.2k|      *nextTokPtr = ptr;
  418|  22.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.90M|    default:
  ------------------
  |  Branch (419:5): [True: 1.90M, False: 45.8k]
  ------------------
  420|  1.90M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.90M|#  define MINBPC(enc) 2
  ------------------
  421|  1.90M|      break;
  422|  1.94M|    }
  423|  1.94M|  }
  424|    145|  *nextTokPtr = ptr;
  425|    145|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    145|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  22.4k|}
xmltok.c:big2_attributeValueTok:
 1262|  45.3k|                          const char **nextTokPtr) {
 1263|  45.3k|  const char *start;
 1264|  45.3k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.59k, False: 42.7k]
  ------------------
 1265|  2.59k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.59k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  42.7k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  42.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  42.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  42.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 42.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|  42.7k|  start = ptr;
 1275|  1.33M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.33M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.33M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.33M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  58.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 58.2k, False: 1.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.33M]
  |  |  ------------------
  |  | 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.33M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  5.71k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  5.71k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 5.71k, False: 1.32M]
  |  |  ------------------
  |  | 1279|  5.71k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  5.71k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  18.6k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 18.6k, False: 1.31M]
  ------------------
 1286|  18.6k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 12.9k, False: 5.77k]
  ------------------
 1287|  12.9k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.9k|#  define MINBPC(enc) 2
  ------------------
 1288|  5.77k|      *nextTokPtr = ptr;
 1289|  5.77k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.77k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 1.33M]
  ------------------
 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|  1.24k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 1.24k, False: 1.33M]
  ------------------
 1295|  1.24k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 743, False: 505]
  ------------------
 1296|    743|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    743|#  define MINBPC(enc) 2
  ------------------
 1297|    743|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    743|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|    743|      }
 1299|    505|      *nextTokPtr = ptr;
 1300|    505|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    505|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  17.5k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 17.5k, False: 1.31M]
  ------------------
 1302|  17.5k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 10.5k, False: 7.03k]
  ------------------
 1303|  10.5k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  10.5k|#  define MINBPC(enc) 2
  ------------------
 1304|  10.5k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  10.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 452, False: 10.0k]
  ------------------
 1305|    452|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    452|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  10.0k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  10.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.43k, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 697, False: 9.35k]
  ------------------
 1307|    697|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    697|#  define MINBPC(enc) 2
  ------------------
 1308|  10.0k|        *nextTokPtr = ptr;
 1309|  10.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  10.5k|      }
 1311|  7.03k|      *nextTokPtr = ptr;
 1312|  7.03k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.03k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  3.93k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 3.93k, False: 1.32M]
  ------------------
 1314|  3.93k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 2.65k, False: 1.28k]
  ------------------
 1315|  2.65k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.65k|#  define MINBPC(enc) 2
  ------------------
 1316|  2.65k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  2.65k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  2.65k|      }
 1318|  1.28k|      *nextTokPtr = ptr;
 1319|  1.28k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.28k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.28M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.28M, False: 47.1k]
  ------------------
 1321|  1.28M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.28M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.28M|      break;
 1323|  1.33M|    }
 1324|  1.33M|  }
 1325|  1.38k|  *nextTokPtr = ptr;
 1326|  1.38k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.38k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  42.7k|}
xmltok.c:big2_entityValueTok:
 1331|   118k|                       const char **nextTokPtr) {
 1332|   118k|  const char *start;
 1333|   118k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.33k, False: 116k]
  ------------------
 1334|  2.33k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.33k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   116k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   116k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   116k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   116k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 116k]
  ------------------
 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|   116k|  start = ptr;
 1344|  34.6M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  34.6M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  34.6M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  34.6M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   291k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 291k, False: 34.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 34.6M]
  |  |  ------------------
  |  | 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: 34.6M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  99.4k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  99.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 99.4k, False: 34.5M]
  |  |  ------------------
  |  | 1348|  99.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  99.4k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  5.97k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 5.97k, False: 34.6M]
  ------------------
 1355|  5.97k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 3.26k, False: 2.71k]
  ------------------
 1356|  3.26k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.26k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.26k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.71k|      *nextTokPtr = ptr;
 1358|  2.71k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.71k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 34.6M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 2]
  ------------------
 1361|      6|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      6|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      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|  15.4k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 15.4k, False: 34.6M]
  ------------------
 1367|  15.4k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 8.48k, False: 6.97k]
  ------------------
 1368|  8.48k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  8.48k|#  define MINBPC(enc) 2
  ------------------
 1369|  8.48k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.48k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  8.48k|      }
 1371|  6.97k|      *nextTokPtr = ptr;
 1372|  6.97k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.97k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  93.5k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 93.5k, False: 34.5M]
  ------------------
 1374|  93.5k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 50.0k, False: 43.5k]
  ------------------
 1375|  50.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  50.0k|#  define MINBPC(enc) 2
  ------------------
 1376|  50.0k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  50.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  50.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  50.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 290, False: 49.7k]
  ------------------
 1377|    290|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    290|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  49.7k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  49.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  49.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  39.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 39.1k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.70k, False: 48.0k]
  ------------------
 1379|  1.70k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.70k|#  define MINBPC(enc) 2
  ------------------
 1380|  49.7k|        *nextTokPtr = ptr;
 1381|  49.7k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  49.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  50.0k|      }
 1383|  43.5k|      *nextTokPtr = ptr;
 1384|  43.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  43.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  34.4M|    default:
  ------------------
  |  Branch (1385:5): [True: 34.4M, False: 214k]
  ------------------
 1386|  34.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  34.4M|#  define MINBPC(enc) 2
  ------------------
 1387|  34.4M|      break;
 1388|  34.6M|    }
 1389|  34.6M|  }
 1390|  1.20k|  *nextTokPtr = ptr;
 1391|  1.20k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.20k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   116k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  23.8k|                         const char *end1, const char *ptr2) {
 1716|  23.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   109k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  85.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 94.6k, False: 14.4k]
  ------------------
 1718|  94.6k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  94.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 35, False: 94.6k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     35|      return 0; /* LCOV_EXCL_LINE */
 1725|     35|    }
 1726|  94.6k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  94.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  94.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 94.6k, False: 36]
  |  |  |  |  |  Branch (872:49): [True: 85.2k, False: 9.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  9.36k|      return 0;
 1728|  94.6k|  }
 1729|  14.4k|  return ptr1 == end1;
 1730|  23.8k|}
xmltok.c:big2_nameLength:
 1733|  13.8k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  13.8k|  const char *start = ptr;
 1735|  91.2k|  for (;;) {
 1736|  91.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  91.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  91.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  24.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 24.7k, False: 66.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 91.2k]
  |  |  ------------------
  |  | 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: 91.2k]
  |  |  ------------------
  |  | 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: 91.2k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  66.5k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 66.5k, False: 24.7k]
  ------------------
 1746|  73.5k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.07k, False: 84.2k]
  ------------------
 1747|  73.5k|#  ifdef XML_NS
 1748|  73.5k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 91.2k]
  ------------------
 1749|  73.5k|#  endif
 1750|  77.0k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.44k, False: 87.8k]
  ------------------
 1751|  77.0k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 6, False: 91.2k]
  ------------------
 1752|  77.2k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 191, False: 91.1k]
  ------------------
 1753|  77.4k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 217, False: 91.0k]
  ------------------
 1754|  77.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  77.4k|#  define MINBPC(enc) 2
  ------------------
 1755|  77.4k|      break;
 1756|  13.8k|    default:
  ------------------
  |  Branch (1756:5): [True: 13.8k, False: 77.4k]
  ------------------
 1757|  13.8k|      return (int)(ptr - start);
 1758|  91.2k|    }
 1759|  91.2k|  }
 1760|  13.8k|}
xmltok.c:big2_getAtts:
 1510|  9.60k|                ATTRIBUTE *atts) {
 1511|  9.60k|  enum { other, inName, inValue } state = inName;
 1512|  9.60k|  int nAtts = 0;
 1513|  9.60k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.01M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.60k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.00M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.01M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  9.01M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.01M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.21M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.21M, False: 4.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.01M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.01M]
  |  |  ------------------
  |  | 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|  99.9k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  99.9k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 99.9k, False: 8.91M]
  |  |  ------------------
  |  | 1528|  99.9k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  99.9k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 99.9k]
  |  |  |  |  ------------------
  |  |  |  | 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|  99.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  99.9k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  4.70M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 4.70M, False: 4.31M]
  ------------------
 1535|  5.08M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 380k, False: 8.63M]
  ------------------
 1536|  5.38M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 308k, False: 8.70M]
  ------------------
 1537|  5.38M|      START_NAME
  ------------------
  |  | 1519|  5.38M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 505k, False: 4.88M]
  |  |  ------------------
  |  | 1520|   505k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 256k, False: 249k]
  |  |  ------------------
  |  | 1521|   256k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   256k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   256k|      }                                                                        \
  |  | 1524|   505k|      state = inName;                                                          \
  |  | 1525|   505k|    }
  ------------------
 1538|  5.38M|      break;
 1539|      0|#  undef START_NAME
 1540|   483k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 483k, False: 8.53M]
  ------------------
 1541|   483k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 140k, False: 342k]
  ------------------
 1542|   140k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 72.0k, False: 68.8k]
  ------------------
 1543|  72.0k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  72.0k|#  define MINBPC(enc) 2
  ------------------
 1544|   140k|        state = inValue;
 1545|   140k|        open = BT_QUOT;
 1546|   342k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 140k, False: 201k]
  ------------------
 1547|   140k|        state = other;
 1548|   140k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 72.0k, False: 68.8k]
  ------------------
 1549|  72.0k|          atts[nAtts].valueEnd = ptr;
 1550|   140k|        nAtts++;
 1551|   140k|      }
 1552|   483k|      break;
 1553|   730k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 730k, False: 8.28M]
  ------------------
 1554|   730k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 365k, False: 365k]
  ------------------
 1555|   365k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 184k, False: 181k]
  ------------------
 1556|   184k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   184k|#  define MINBPC(enc) 2
  ------------------
 1557|   365k|        state = inValue;
 1558|   365k|        open = BT_APOS;
 1559|   365k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 365k, False: 213]
  ------------------
 1560|   365k|        state = other;
 1561|   365k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 184k, False: 181k]
  ------------------
 1562|   184k|          atts[nAtts].valueEnd = ptr;
 1563|   365k|        nAtts++;
 1564|   365k|      }
 1565|   730k|      break;
 1566|  13.0k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 13.0k, False: 9.00M]
  ------------------
 1567|  13.0k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 12.6k, False: 360]
  ------------------
 1568|  12.6k|        atts[nAtts].normalized = 0;
 1569|  13.0k|      break;
 1570|  1.18M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.18M, False: 7.82M]
  ------------------
 1571|  1.18M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.42k, False: 1.18M]
  ------------------
 1572|  2.42k|        state = other;
 1573|  1.18M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 647k, False: 539k]
  |  Branch (1573:36): [True: 326k, False: 321k]
  |  Branch (1573:55): [True: 190k, False: 135k]
  ------------------
 1574|  1.18M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 39.3k, False: 151k]
  ------------------
 1575|   190k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|   151k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   151k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 151k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   341k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 308, False: 150k]
  ------------------
 1576|   190k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|   150k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   150k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 118k, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   341k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 88.6k, False: 62.2k]
  ------------------
 1577|   190k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  62.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  62.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.3k, False: 31.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 8.46k, False: 53.7k]
  ------------------
 1578|   136k|        atts[nAtts].normalized = 0;
 1579|  1.18M|      break;
 1580|   111k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 111k, False: 8.90M]
  ------------------
 1581|   121k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 9.42k, False: 9.00M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   121k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.46k, False: 118k]
  ------------------
 1585|  2.46k|        state = other;
 1586|   118k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 113k, False: 5.10k]
  |  Branch (1586:36): [True: 63.1k, False: 50.6k]
  ------------------
 1587|  63.1k|        atts[nAtts].normalized = 0;
 1588|   121k|      break;
 1589|   337k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 337k, False: 8.67M]
  ------------------
 1590|   348k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 10.9k, False: 9.00M]
  ------------------
 1591|   348k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 9.60k, False: 338k]
  ------------------
 1592|  9.60k|        return nAtts;
 1593|   338k|      break;
 1594|   641k|    default:
  ------------------
  |  Branch (1594:5): [True: 641k, False: 8.37M]
  ------------------
 1595|   641k|      break;
 1596|  9.01M|    }
 1597|  9.01M|  }
 1598|       |  /* not reached */
 1599|  9.60k|}
xmltok.c:big2_charRefNumber:
 1602|  5.07k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.07k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.07k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.07k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.07k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  5.07k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.07k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  5.07k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.07k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.07k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.04k, False: 1.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  17.9k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  4.04k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  17.9k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  17.9k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 17.9k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.02k, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  13.9k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  13.9k|#  define MINBPC(enc) 2
  ------------------
 1610|  13.9k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  13.9k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  13.9k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 13.9k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  13.9k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 13.9k]
  ------------------
 1612|    430|      case ASCII_0:
  ------------------
  |  |   90|    430|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 430, False: 13.5k]
  ------------------
 1613|  1.03k|      case ASCII_1:
  ------------------
  |  |   91|  1.03k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 605, False: 13.3k]
  ------------------
 1614|  2.63k|      case ASCII_2:
  ------------------
  |  |   92|  2.63k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.59k, False: 12.3k]
  ------------------
 1615|  4.88k|      case ASCII_3:
  ------------------
  |  |   93|  4.88k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 2.25k, False: 11.7k]
  ------------------
 1616|  5.44k|      case ASCII_4:
  ------------------
  |  |   94|  5.44k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 560, False: 13.4k]
  ------------------
 1617|  6.37k|      case ASCII_5:
  ------------------
  |  |   95|  6.37k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 925, False: 13.0k]
  ------------------
 1618|  6.82k|      case ASCII_6:
  ------------------
  |  |   96|  6.82k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 450, False: 13.5k]
  ------------------
 1619|  7.44k|      case ASCII_7:
  ------------------
  |  |   97|  7.44k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 619, False: 13.3k]
  ------------------
 1620|  7.65k|      case ASCII_8:
  ------------------
  |  |   98|  7.65k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 211, False: 13.7k]
  ------------------
 1621|  8.17k|      case ASCII_9:
  ------------------
  |  |   99|  8.17k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 523, False: 13.4k]
  ------------------
 1622|  8.17k|        result <<= 4;
 1623|  8.17k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.17k|#define ASCII_0 0x30
  ------------------
 1624|  8.17k|        break;
 1625|    201|      case ASCII_A:
  ------------------
  |  |   36|    201|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 201, False: 13.7k]
  ------------------
 1626|    417|      case ASCII_B:
  ------------------
  |  |   37|    417|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 216, False: 13.7k]
  ------------------
 1627|    814|      case ASCII_C:
  ------------------
  |  |   38|    814|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 397, False: 13.5k]
  ------------------
 1628|  1.37k|      case ASCII_D:
  ------------------
  |  |   39|  1.37k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 561, False: 13.4k]
  ------------------
 1629|  1.77k|      case ASCII_E:
  ------------------
  |  |   40|  1.77k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 398, False: 13.5k]
  ------------------
 1630|  2.66k|      case ASCII_F:
  ------------------
  |  |   41|  2.66k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 896, False: 13.0k]
  ------------------
 1631|  2.66k|        result <<= 4;
 1632|  2.66k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.66k|#define ASCII_A 0x41
  ------------------
 1633|  2.66k|        break;
 1634|    654|      case ASCII_a:
  ------------------
  |  |   63|    654|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 654, False: 13.3k]
  ------------------
 1635|    929|      case ASCII_b:
  ------------------
  |  |   64|    929|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 275, False: 13.6k]
  ------------------
 1636|  1.22k|      case ASCII_c:
  ------------------
  |  |   65|  1.22k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 294, False: 13.6k]
  ------------------
 1637|  1.94k|      case ASCII_d:
  ------------------
  |  |   66|  1.94k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 724, False: 13.2k]
  ------------------
 1638|  2.60k|      case ASCII_e:
  ------------------
  |  |   67|  2.60k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 657, False: 13.3k]
  ------------------
 1639|  3.12k|      case ASCII_f:
  ------------------
  |  |   68|  3.12k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 520, False: 13.4k]
  ------------------
 1640|  3.12k|        result <<= 4;
 1641|  3.12k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.12k|#define ASCII_a 0x61
  ------------------
 1642|  3.12k|        break;
 1643|  13.9k|      }
 1644|  13.9k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 15, False: 13.9k]
  ------------------
 1645|     15|        return -1;
 1646|  13.9k|    }
 1647|  4.04k|  } else {
 1648|  3.54k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  3.54k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.54k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.54k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1.02k, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.51k|#  define MINBPC(enc) 2
  ------------------
 1649|  2.51k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  2.51k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.51k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.51k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  2.51k|      result *= 10;
 1651|  2.51k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  2.51k|#define ASCII_0 0x30
  ------------------
 1652|  2.51k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 2.51k]
  ------------------
 1653|      5|        return -1;
 1654|  2.51k|    }
 1655|  1.03k|  }
 1656|  5.05k|  return checkCharRefNumber(result);
 1657|  5.07k|}
xmltok.c:big2_predefinedEntityName:
 1661|  22.1k|                             const char *end) {
 1662|  22.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  22.1k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  22.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 15.1k, False: 7.07k]
  ------------------
 1664|  2.09k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.09k, False: 20.1k]
  ------------------
 1665|  2.09k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  2.09k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.09k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.74k, False: 348]
  |  |  |  |  |  Branch (872:49): [True: 886, False: 861]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    886|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    886|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    886|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 332, False: 554]
  |  |  |  |  |  Branch (871:32): [True: 570, False: 316]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|     86|      case ASCII_l:
  ------------------
  |  |   74|     86|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 86, False: 800]
  ------------------
 1668|     86|        return ASCII_LT;
  ------------------
  |  |  111|     86|#define ASCII_LT 0x3C
  ------------------
 1669|    468|      case ASCII_g:
  ------------------
  |  |   69|    468|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 468, False: 418]
  ------------------
 1670|    468|        return ASCII_GT;
  ------------------
  |  |  113|    468|#define ASCII_GT 0x3E
  ------------------
 1671|    886|      }
 1672|    886|    }
 1673|  1.54k|    break;
 1674|  1.56k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.56k, False: 20.6k]
  ------------------
 1675|  1.56k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.56k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.56k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.36k, False: 199]
  |  |  |  |  |  Branch (872:49): [True: 1.03k, False: 326]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.03k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.03k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.03k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.03k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.03k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 821, False: 214]
  |  |  |  |  |  Branch (872:49): [True: 598, False: 223]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    598|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    598|#  define MINBPC(enc) 2
  ------------------
 1679|    598|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    598|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    598|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 404, False: 194]
  |  |  |  |  |  Branch (872:49): [True: 199, False: 205]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    199|          return ASCII_AMP;
  ------------------
  |  |  105|    199|#define ASCII_AMP 0x26
  ------------------
 1681|    598|      }
 1682|  1.03k|    }
 1683|  1.36k|    break;
 1684|  3.42k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.42k, False: 18.7k]
  ------------------
 1685|  3.42k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.42k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.42k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 384, False: 3.03k]
  |  |  |  |  |  Branch (871:32): [True: 3.20k, False: 216]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.73k|    case ASCII_q:
  ------------------
  |  |   79|  1.73k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.73k, False: 1.68k]
  ------------------
 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.52k, False: 213]
  |  |  |  |  |  Branch (872:49): [True: 1.31k, False: 211]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.31k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.31k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.31k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  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: 1.07k, False: 237]
  |  |  |  |  |  Branch (872:49): [True: 875, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    875|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    875|#  define MINBPC(enc) 2
  ------------------
 1692|    875|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    875|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    875|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 592, False: 283]
  |  |  |  |  |  Branch (872:49): [True: 344, False: 248]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    344|            return ASCII_QUOT;
  ------------------
  |  |  104|    344|#define ASCII_QUOT 0x22
  ------------------
 1694|    875|        }
 1695|  1.31k|      }
 1696|  1.39k|      break;
 1697|  1.39k|    case ASCII_a:
  ------------------
  |  |   63|  1.29k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.29k, False: 2.12k]
  ------------------
 1698|  1.29k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.29k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.29k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  1.29k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.29k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.10k, False: 197]
  |  |  |  |  |  Branch (872:49): [True: 876, False: 226]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|    876|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    876|#  define MINBPC(enc) 2
  ------------------
 1701|    876|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|    876|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    876|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 657, False: 219]
  |  |  |  |  |  Branch (872:49): [True: 460, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    460|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    460|#  define MINBPC(enc) 2
  ------------------
 1703|    460|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    460|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    460|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 261, False: 199]
  |  |  |  |  |  Branch (872:49): [True: 66, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|     66|            return ASCII_APOS;
  ------------------
  |  |  106|     66|#define ASCII_APOS 0x27
  ------------------
 1705|    460|        }
 1706|    876|      }
 1707|  1.23k|      break;
 1708|  3.42k|    }
 1709|  22.1k|  }
 1710|  21.0k|  return 0;
 1711|  22.1k|}
xmltok.c:big2_updatePosition:
 1779|  3.41k|                       POSITION *pos) {
 1780|  4.45M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.45M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.45M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.45M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   288k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 288k, False: 4.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.45M]
  |  |  ------------------
  |  | 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.45M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  50.1k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  50.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 50.1k, False: 4.40M]
  |  |  ------------------
  |  | 1784|  50.1k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  50.1k|    pos->columnNumber++;                                                       \
  |  | 1786|  50.1k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  11.1k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 11.1k, False: 4.44M]
  ------------------
 1792|  11.1k|      pos->columnNumber = 0;
 1793|  11.1k|      pos->lineNumber++;
 1794|  11.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.1k|#  define MINBPC(enc) 2
  ------------------
 1795|  11.1k|      break;
 1796|  25.7k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 25.7k, False: 4.42M]
  ------------------
 1797|  25.7k|      pos->lineNumber++;
 1798|  25.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  25.7k|#  define MINBPC(enc) 2
  ------------------
 1799|  25.7k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  25.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  51.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  25.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 25.7k, False: 33]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  25.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.8k, False: 7.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.74k, False: 23.9k]
  ------------------
 1800|  1.74k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.74k|#  define MINBPC(enc) 2
  ------------------
 1801|  25.7k|      pos->columnNumber = 0;
 1802|  25.7k|      break;
 1803|  4.36M|    default:
  ------------------
  |  Branch (1803:5): [True: 4.36M, False: 87.0k]
  ------------------
 1804|  4.36M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.36M|#  define MINBPC(enc) 2
  ------------------
 1805|  4.36M|      pos->columnNumber++;
 1806|  4.36M|      break;
 1807|  4.45M|    }
 1808|  4.45M|  }
 1809|  3.41k|}
xmltok.c:big2_isPublicId:
 1450|  2.02k|                   const char **badPtr) {
 1451|  2.02k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.02k|#  define MINBPC(enc) 2
  ------------------
 1452|  2.02k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  2.02k|#  define MINBPC(enc) 2
  ------------------
 1453|  11.6k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.5k|#  define MINBPC(enc) 2
  ------------------
 1454|  11.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  11.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  11.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.6k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    673|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 673, False: 10.9k]
  ------------------
 1456|  1.52k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 856, False: 10.7k]
  ------------------
 1457|  1.86k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 334, False: 11.2k]
  ------------------
 1458|  2.07k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 214, False: 11.4k]
  ------------------
 1459|  2.48k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 404, False: 11.2k]
  ------------------
 1460|  3.07k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 593, False: 11.0k]
  ------------------
 1461|  3.31k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 236, False: 11.3k]
  ------------------
 1462|  3.72k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 419, False: 11.2k]
  ------------------
 1463|  4.16k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 437, False: 11.1k]
  ------------------
 1464|  4.39k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 226, False: 11.4k]
  ------------------
 1465|  4.62k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 237, False: 11.3k]
  ------------------
 1466|  5.08k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 456, False: 11.1k]
  ------------------
 1467|  5.42k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 340, False: 11.2k]
  ------------------
 1468|  6.01k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 586, False: 11.0k]
  ------------------
 1469|  6.67k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 668, False: 10.9k]
  ------------------
 1470|  7.00k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 330, False: 11.3k]
  ------------------
 1471|  7.51k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 509, False: 11.1k]
  ------------------
 1472|  7.78k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 267, False: 11.3k]
  ------------------
 1473|  7.78k|#  ifdef XML_NS
 1474|  7.78k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 11.6k]
  ------------------
 1475|  7.78k|#  endif
 1476|  7.78k|      break;
 1477|    864|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 864, False: 10.7k]
  ------------------
 1478|    864|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    864|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    864|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 864, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 863]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    863|      break;
 1483|    863|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 320, False: 11.3k]
  ------------------
 1484|  1.62k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.30k, False: 10.3k]
  ------------------
 1485|  1.62k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  1.62k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.62k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.62k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.61k, False: 12]
  ------------------
 1486|  1.61k|        break;
 1487|       |      /* fall through */
 1488|  1.37k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.35k, False: 10.2k]
  ------------------
 1489|  1.37k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.37k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.37k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.34k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    553|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 553, False: 817]
  ------------------
 1491|  1.33k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 779, False: 591]
  ------------------
 1492|  1.33k|        break;
 1493|     38|      default:
  ------------------
  |  Branch (1493:7): [True: 38, False: 1.33k]
  ------------------
 1494|     38|        *badPtr = ptr;
 1495|     38|        return 0;
 1496|  1.37k|      }
 1497|  1.33k|      break;
 1498|  11.6k|    }
 1499|  11.6k|  }
 1500|  1.98k|  return 1;
 1501|  2.02k|}

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

