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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.5k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.5k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.5k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.5k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.5k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.5k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.5k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.5k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.5k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.5k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.5k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.5k|  return key;
  152|  19.5k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.5k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.5k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.5k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.5k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.5k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.5k|sip24_final(struct siphash *H) {
  232|  19.5k|  const char left = (char)(H->p - H->buf);
  233|  19.5k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.5k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.5k]
  ------------------
  236|  1.23k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.23k, False: 18.3k]
  ------------------
  237|  1.23k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  5.17k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.94k, False: 15.6k]
  ------------------
  240|  5.17k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.25k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.08k, False: 18.5k]
  ------------------
  243|  6.25k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  10.1k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.87k, False: 15.7k]
  ------------------
  246|  10.1k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.2k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.15k, False: 18.4k]
  ------------------
  249|  11.2k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.6k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.41k, False: 16.1k]
  ------------------
  252|  14.6k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.9k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.23k, False: 18.3k]
  ------------------
  255|  15.9k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.5k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.66k, False: 15.9k]
  ------------------
  258|  19.5k|    break;
  259|  19.5k|  }
  260|       |
  261|  19.5k|  H->v3 ^= b;
  262|  19.5k|  sip_round(H, 2);
  263|  19.5k|  H->v0 ^= b;
  264|  19.5k|  H->v2 ^= 0xff;
  265|  19.5k|  sip_round(H, 4);
  266|       |
  267|  19.5k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.5k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  40.3M|sip_round(struct siphash *H, const int rounds) {
  168|  40.3M|  int i;
  169|       |
  170|   121M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 80.6M, False: 40.3M]
  ------------------
  171|  80.6M|    H->v0 += H->v1;
  172|  80.6M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  80.6M|    H->v1 ^= H->v0;
  174|  80.6M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  80.6M|    H->v2 += H->v3;
  177|  80.6M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  80.6M|    H->v3 ^= H->v2;
  179|       |
  180|  80.6M|    H->v0 += H->v3;
  181|  80.6M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  80.6M|    H->v3 ^= H->v0;
  183|       |
  184|  80.6M|    H->v2 += H->v1;
  185|  80.6M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  80.6M|    H->v1 ^= H->v2;
  187|  80.6M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  80.6M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  80.6M|  }
  189|  40.3M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.5k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.5k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.5k|  uint64_t m;
  210|       |
  211|  40.3M|  do {
  212|   362M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   362M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 362M, False: 19.5k]
  |  Branch (212:22): [True: 322M, False: 40.2M]
  ------------------
  213|   322M|      *H->p++ = *p++;
  214|       |
  215|  40.3M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  40.3M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.9k, False: 40.2M]
  ------------------
  216|  15.9k|      break;
  217|       |
  218|  40.2M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  40.2M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  40.2M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  40.2M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  40.2M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  40.2M|    H->v3 ^= m;
  220|  40.2M|    sip_round(H, 2);
  221|  40.2M|    H->v0 ^= m;
  222|       |
  223|  40.2M|    H->p = H->buf;
  224|  40.2M|    H->c += 8;
  225|  40.2M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 40.2M, False: 3.66k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.5k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.5k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.5k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.5k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.5k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.5k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.5k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.5k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.5k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.5k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.5k|  H->p = H->buf;
  199|  19.5k|  H->c = 0;
  200|       |
  201|  19.5k|  return H;
  202|  19.5k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  3.53M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  3.53M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  3.53M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  3.53M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  3.53M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  3.53M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  3.53M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  3.53M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  3.53M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  3.53M|  H->p = H->buf;
  199|  3.53M|  H->c = 0;
  200|       |
  201|  3.53M|  return H;
  202|  3.53M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  3.53M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  3.53M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  3.53M|  uint64_t m;
  210|       |
  211|  4.41M|  do {
  212|  15.2M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  11.6M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 11.6M, False: 3.53M]
  |  Branch (212:22): [True: 10.8M, False: 875k]
  ------------------
  213|  10.8M|      *H->p++ = *p++;
  214|       |
  215|  4.41M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.41M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 3.53M, False: 884k]
  ------------------
  216|  3.53M|      break;
  217|       |
  218|   884k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   884k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   884k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   884k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   884k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   884k|    H->v3 ^= m;
  220|   884k|    sip_round(H, 2);
  221|   884k|    H->v0 ^= m;
  222|       |
  223|   884k|    H->p = H->buf;
  224|   884k|    H->c += 8;
  225|   884k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 875k, False: 8.80k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  3.53M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  7.96M|sip_round(struct siphash *H, const int rounds) {
  168|  7.96M|  int i;
  169|       |
  170|  30.9M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 23.0M, False: 7.96M]
  ------------------
  171|  23.0M|    H->v0 += H->v1;
  172|  23.0M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  23.0M|    H->v1 ^= H->v0;
  174|  23.0M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  23.0M|    H->v2 += H->v3;
  177|  23.0M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  23.0M|    H->v3 ^= H->v2;
  179|       |
  180|  23.0M|    H->v0 += H->v3;
  181|  23.0M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  23.0M|    H->v3 ^= H->v0;
  183|       |
  184|  23.0M|    H->v2 += H->v1;
  185|  23.0M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  23.0M|    H->v1 ^= H->v2;
  187|  23.0M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  23.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  23.0M|  }
  189|  7.96M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  3.53M|sip24_final(struct siphash *H) {
  232|  3.53M|  const char left = (char)(H->p - H->buf);
  233|  3.53M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  3.53M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 3.53M]
  ------------------
  236|  4.09k|  case 7:
  ------------------
  |  Branch (236:3): [True: 4.09k, False: 3.53M]
  ------------------
  237|  4.09k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  10.2k|  case 6:
  ------------------
  |  Branch (239:3): [True: 6.19k, False: 3.53M]
  ------------------
  240|  10.2k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  16.3k|  case 5:
  ------------------
  |  Branch (242:3): [True: 6.03k, False: 3.53M]
  ------------------
  243|  16.3k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  26.9k|  case 4:
  ------------------
  |  Branch (245:3): [True: 10.6k, False: 3.52M]
  ------------------
  246|  26.9k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  41.5k|  case 3:
  ------------------
  |  Branch (248:3): [True: 14.5k, False: 3.52M]
  ------------------
  249|  41.5k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   109k|  case 2:
  ------------------
  |  Branch (251:3): [True: 67.8k, False: 3.47M]
  ------------------
  252|   109k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  3.53M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.42M, False: 118k]
  ------------------
  255|  3.53M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  3.53M|  case 0:
  ------------------
  |  Branch (257:3): [True: 9.01k, False: 3.53M]
  ------------------
  258|  3.53M|    break;
  259|  3.53M|  }
  260|       |
  261|  3.53M|  H->v3 ^= b;
  262|  3.53M|  sip_round(H, 2);
  263|  3.53M|  H->v0 ^= b;
  264|  3.53M|  H->v2 ^= 0xff;
  265|  3.53M|  sip_round(H, 4);
  266|       |
  267|  3.53M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  3.53M|} /* sip24_final() */

XML_ParserCreate:
  718|  19.5k|XML_ParserCreate(const XML_Char *encodingName) {
  719|  19.5k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  720|  19.5k|}
XML_ParserCreate_MM:
  969|  19.5k|                    const XML_Char *nameSep) {
  970|  19.5k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  971|  19.5k|}
XML_ParserFree:
 1440|  19.5k|XML_ParserFree(XML_Parser parser) {
 1441|  19.5k|  TAG *tagList;
 1442|  19.5k|  OPEN_INTERNAL_ENTITY *entityList;
 1443|  19.5k|  if (parser == NULL)
  ------------------
  |  Branch (1443:7): [True: 0, False: 19.5k]
  ------------------
 1444|      0|    return;
 1445|       |  /* free m_tagStack and m_freeTagList */
 1446|  19.5k|  tagList = parser->m_tagStack;
 1447|  2.94M|  for (;;) {
 1448|  2.94M|    TAG *p;
 1449|  2.94M|    if (tagList == NULL) {
  ------------------
  |  Branch (1449:9): [True: 19.8k, False: 2.92M]
  ------------------
 1450|  19.8k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1450:11): [True: 19.5k, False: 248]
  ------------------
 1451|  19.5k|        break;
 1452|    248|      tagList = parser->m_freeTagList;
 1453|    248|      parser->m_freeTagList = NULL;
 1454|    248|    }
 1455|  2.92M|    p = tagList;
 1456|  2.92M|    tagList = tagList->parent;
 1457|  2.92M|    FREE(parser, p->buf);
  ------------------
  |  |  715|  2.92M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1458|  2.92M|    destroyBindings(p->bindings, parser);
 1459|  2.92M|    FREE(parser, p);
  ------------------
  |  |  715|  2.92M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1460|  2.92M|  }
 1461|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1462|  19.5k|  entityList = parser->m_openInternalEntities;
 1463|  21.2k|  for (;;) {
 1464|  21.2k|    OPEN_INTERNAL_ENTITY *openEntity;
 1465|  21.2k|    if (entityList == NULL) {
  ------------------
  |  Branch (1465:9): [True: 20.2k, False: 979]
  ------------------
 1466|  20.2k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1466:11): [True: 19.5k, False: 628]
  ------------------
 1467|  19.5k|        break;
 1468|    628|      entityList = parser->m_freeInternalEntities;
 1469|    628|      parser->m_freeInternalEntities = NULL;
 1470|    628|    }
 1471|  1.60k|    openEntity = entityList;
 1472|  1.60k|    entityList = entityList->next;
 1473|  1.60k|    FREE(parser, openEntity);
  ------------------
  |  |  715|  1.60k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1474|  1.60k|  }
 1475|       |
 1476|  19.5k|  destroyBindings(parser->m_freeBindingList, parser);
 1477|  19.5k|  destroyBindings(parser->m_inheritedBindings, parser);
 1478|  19.5k|  poolDestroy(&parser->m_tempPool);
 1479|  19.5k|  poolDestroy(&parser->m_temp2Pool);
 1480|  19.5k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1481|  19.5k|#ifdef XML_DTD
 1482|       |  /* external parameter entity parsers share the DTD structure
 1483|       |     parser->m_dtd with the root parser, so we must not destroy it
 1484|       |  */
 1485|  19.5k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1485:7): [True: 19.5k, False: 0]
  |  Branch (1485:36): [True: 19.5k, False: 0]
  ------------------
 1486|       |#else
 1487|       |  if (parser->m_dtd)
 1488|       |#endif /* XML_DTD */
 1489|  19.5k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1490|  19.5k|               &parser->m_mem);
 1491|  19.5k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1492|       |#ifdef XML_ATTR_INFO
 1493|       |  FREE(parser, (void *)parser->m_attInfo);
 1494|       |#endif
 1495|  19.5k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1496|  19.5k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.5k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.5k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.5k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.5k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1500:7): [True: 0, False: 19.5k]
  ------------------
 1501|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1502|  19.5k|  FREE(parser, parser);
  ------------------
  |  |  715|  19.5k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1503|  19.5k|}
XML_SetElementHandler:
 1595|  19.5k|                      XML_EndElementHandler end) {
 1596|  19.5k|  if (parser == NULL)
  ------------------
  |  Branch (1596:7): [True: 0, False: 19.5k]
  ------------------
 1597|      0|    return;
 1598|  19.5k|  parser->m_startElementHandler = start;
 1599|  19.5k|  parser->m_endElementHandler = end;
 1600|  19.5k|}
XML_SetHashSalt:
 1815|  19.5k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1816|  19.5k|  if (parser == NULL)
  ------------------
  |  Branch (1816:7): [True: 0, False: 19.5k]
  ------------------
 1817|      0|    return 0;
 1818|  19.5k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1818:7): [True: 0, False: 19.5k]
  ------------------
 1819|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1820|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1821|  19.5k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1821:7): [True: 0, False: 19.5k]
  ------------------
 1822|  19.5k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1822:10): [True: 0, False: 19.5k]
  ------------------
 1823|      0|    return 0;
 1824|  19.5k|  parser->m_hash_secret_salt = hash_salt;
 1825|  19.5k|  return 1;
 1826|  19.5k|}
XML_ParseBuffer:
 1983|  19.5k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1984|  19.5k|  const char *start;
 1985|  19.5k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.5k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1986|       |
 1987|  19.5k|  if (parser == NULL)
  ------------------
  |  Branch (1987:7): [True: 0, False: 19.5k]
  ------------------
 1988|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1989|  19.5k|  switch (parser->m_parsingStatus.parsing) {
 1990|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1990:3): [True: 0, False: 19.5k]
  ------------------
 1991|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1992|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1993|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1993:3): [True: 0, False: 19.5k]
  ------------------
 1994|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1995|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1996|  19.5k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1996:3): [True: 19.5k, False: 0]
  ------------------
 1997|       |    /* Has someone called XML_GetBuffer successfully before? */
 1998|  19.5k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 19.5k]
  ------------------
 1999|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2000|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2001|      0|    }
 2002|       |
 2003|  19.5k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2003:9): [True: 19.5k, False: 0]
  |  Branch (2003:43): [True: 0, False: 19.5k]
  ------------------
 2004|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2005|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2006|      0|    }
 2007|       |    /* fall through */
 2008|  19.5k|  default:
  ------------------
  |  Branch (2008:3): [True: 0, False: 19.5k]
  ------------------
 2009|  19.5k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2010|  19.5k|  }
 2011|       |
 2012|  19.5k|  start = parser->m_bufferPtr;
 2013|  19.5k|  parser->m_positionPtr = start;
 2014|  19.5k|  parser->m_bufferEnd += len;
 2015|  19.5k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2016|  19.5k|  parser->m_parseEndByteIndex += len;
 2017|  19.5k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2018|       |
 2019|  19.5k|  parser->m_errorCode = parser->m_processor(
 2020|  19.5k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2021|       |
 2022|  19.5k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2022:7): [True: 7.97k, False: 11.6k]
  ------------------
 2023|  7.97k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2024|  7.97k|    parser->m_processor = errorProcessor;
 2025|  7.97k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.97k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2026|  11.6k|  } else {
 2027|  11.6k|    switch (parser->m_parsingStatus.parsing) {
 2028|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2028:5): [True: 0, False: 11.6k]
  ------------------
 2029|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2030|      0|      break;
 2031|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2031:5): [True: 0, False: 11.6k]
  ------------------
 2032|  11.6k|    case XML_PARSING:
  ------------------
  |  Branch (2032:5): [True: 11.6k, False: 0]
  ------------------
 2033|  11.6k|      if (isFinal) {
  ------------------
  |  Branch (2033:11): [True: 0, False: 11.6k]
  ------------------
 2034|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2035|      0|        return result;
 2036|      0|      }
 2037|  11.6k|    default:; /* should not happen */
  ------------------
  |  Branch (2037:5): [True: 0, False: 11.6k]
  ------------------
 2038|  11.6k|    }
 2039|  11.6k|  }
 2040|       |
 2041|  11.6k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.6k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2042|  11.6k|                    parser->m_bufferPtr, &parser->m_position);
 2043|  11.6k|  parser->m_positionPtr = parser->m_bufferPtr;
 2044|  11.6k|  return result;
 2045|  19.5k|}
XML_GetBuffer:
 2048|  19.5k|XML_GetBuffer(XML_Parser parser, int len) {
 2049|  19.5k|  if (parser == NULL)
  ------------------
  |  Branch (2049:7): [True: 0, False: 19.5k]
  ------------------
 2050|      0|    return NULL;
 2051|  19.5k|  if (len < 0) {
  ------------------
  |  Branch (2051:7): [True: 0, False: 19.5k]
  ------------------
 2052|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2053|      0|    return NULL;
 2054|      0|  }
 2055|  19.5k|  switch (parser->m_parsingStatus.parsing) {
 2056|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2056:3): [True: 0, False: 19.5k]
  ------------------
 2057|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2058|      0|    return NULL;
 2059|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2059:3): [True: 0, False: 19.5k]
  ------------------
 2060|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2061|      0|    return NULL;
 2062|  19.5k|  default:;
  ------------------
  |  Branch (2062:3): [True: 19.5k, False: 0]
  ------------------
 2063|  19.5k|  }
 2064|       |
 2065|  19.5k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  199|  19.5k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.5k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2065:7): [True: 19.5k, False: 0]
  ------------------
 2066|  19.5k|#ifdef XML_CONTEXT_BYTES
 2067|  19.5k|    int keep;
 2068|  19.5k|#endif /* defined XML_CONTEXT_BYTES */
 2069|       |    /* Do not invoke signed arithmetic overflow: */
 2070|  19.5k|    int neededSize = (int)((unsigned)len
 2071|  19.5k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  199|  19.5k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.5k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2072|  19.5k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2073|  19.5k|    if (neededSize < 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 19.5k]
  ------------------
 2074|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2075|      0|      return NULL;
 2076|      0|    }
 2077|  19.5k|#ifdef XML_CONTEXT_BYTES
 2078|  19.5k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  199|  19.5k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.5k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2079|  19.5k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   96|  19.5k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2079:9): [True: 0, False: 19.5k]
  ------------------
 2080|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   96|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2081|       |    /* Detect and prevent integer overflow */
 2082|  19.5k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 19.5k]
  ------------------
 2083|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2084|      0|      return NULL;
 2085|      0|    }
 2086|  19.5k|    neededSize += keep;
 2087|  19.5k|#endif /* defined XML_CONTEXT_BYTES */
 2088|  19.5k|    if (neededSize
  ------------------
  |  Branch (2088:9): [True: 0, False: 19.5k]
  ------------------
 2089|  19.5k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  199|  19.5k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.5k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2090|      0|#ifdef XML_CONTEXT_BYTES
 2091|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2091:11): [True: 0, False: 0]
  ------------------
 2092|      0|        int offset
 2093|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2094|      0|              - keep;
 2095|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2096|       |         * in the buffer */
 2097|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2098|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2099|      0|        parser->m_bufferEnd -= offset;
 2100|      0|        parser->m_bufferPtr -= offset;
 2101|      0|      }
 2102|       |#else
 2103|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2104|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2105|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2106|       |        parser->m_bufferEnd
 2107|       |            = parser->m_buffer
 2108|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2109|       |        parser->m_bufferPtr = parser->m_buffer;
 2110|       |      }
 2111|       |#endif /* not defined XML_CONTEXT_BYTES */
 2112|  19.5k|    } else {
 2113|  19.5k|      char *newBuf;
 2114|  19.5k|      int bufferSize
 2115|  19.5k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  199|  19.5k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.5k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2116|  19.5k|      if (bufferSize == 0)
  ------------------
  |  Branch (2116:11): [True: 19.5k, False: 0]
  ------------------
 2117|  19.5k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  246|  19.5k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2118|  30.4k|      do {
 2119|       |        /* Do not invoke signed arithmetic overflow: */
 2120|  30.4k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2121|  30.4k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2121:16): [True: 10.9k, False: 19.5k]
  |  Branch (2121:43): [True: 10.9k, False: 0]
  ------------------
 2122|  19.5k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2122:11): [True: 0, False: 19.5k]
  ------------------
 2123|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2124|      0|        return NULL;
 2125|      0|      }
 2126|  19.5k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  713|  19.5k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2127|  19.5k|      if (newBuf == 0) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 19.5k]
  ------------------
 2128|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2129|      0|        return NULL;
 2130|      0|      }
 2131|  19.5k|      parser->m_bufferLim = newBuf + bufferSize;
 2132|  19.5k|#ifdef XML_CONTEXT_BYTES
 2133|  19.5k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2133:11): [True: 0, False: 19.5k]
  ------------------
 2134|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2135|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2136|      0|                   + keep);
 2137|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2138|      0|        parser->m_buffer = newBuf;
 2139|      0|        parser->m_bufferEnd
 2140|      0|            = parser->m_buffer
 2141|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2142|      0|              + keep;
 2143|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2144|  19.5k|      } else {
 2145|       |        /* This must be a brand new buffer with no data in it yet */
 2146|  19.5k|        parser->m_bufferEnd = newBuf;
 2147|  19.5k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2148|  19.5k|      }
 2149|       |#else
 2150|       |      if (parser->m_bufferPtr) {
 2151|       |        memcpy(newBuf, parser->m_bufferPtr,
 2152|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2153|       |        FREE(parser, parser->m_buffer);
 2154|       |        parser->m_bufferEnd
 2155|       |            = newBuf
 2156|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2157|       |      } else {
 2158|       |        /* This must be a brand new buffer with no data in it yet */
 2159|       |        parser->m_bufferEnd = newBuf;
 2160|       |      }
 2161|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2162|       |#endif /* not defined XML_CONTEXT_BYTES */
 2163|  19.5k|    }
 2164|  19.5k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2165|  19.5k|    parser->m_positionPtr = NULL;
 2166|  19.5k|  }
 2167|  19.5k|  return parser->m_bufferEnd;
 2168|  19.5k|}
xmlparse.c:parserCreate:
  976|  19.5k|             DTD *dtd) {
  977|  19.5k|  XML_Parser parser;
  978|       |
  979|  19.5k|  if (memsuite) {
  ------------------
  |  Branch (979:7): [True: 0, False: 19.5k]
  ------------------
  980|      0|    XML_Memory_Handling_Suite *mtemp;
  981|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  982|      0|    if (parser != NULL) {
  ------------------
  |  Branch (982:9): [True: 0, False: 0]
  ------------------
  983|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  984|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  985|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  986|      0|      mtemp->free_fcn = memsuite->free_fcn;
  987|      0|    }
  988|  19.5k|  } else {
  989|  19.5k|    XML_Memory_Handling_Suite *mtemp;
  990|  19.5k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  991|  19.5k|    if (parser != NULL) {
  ------------------
  |  Branch (991:9): [True: 19.5k, False: 0]
  ------------------
  992|  19.5k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  993|  19.5k|      mtemp->malloc_fcn = malloc;
  994|  19.5k|      mtemp->realloc_fcn = realloc;
  995|  19.5k|      mtemp->free_fcn = free;
  996|  19.5k|    }
  997|  19.5k|  }
  998|       |
  999|  19.5k|  if (! parser)
  ------------------
  |  Branch (999:7): [True: 0, False: 19.5k]
  ------------------
 1000|      0|    return parser;
 1001|       |
 1002|  19.5k|  parser->m_buffer = NULL;
 1003|  19.5k|  parser->m_bufferLim = NULL;
 1004|       |
 1005|  19.5k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  243|  19.5k|#define INIT_ATTS_SIZE 16
  ------------------
 1006|  19.5k|  parser->m_atts
 1007|  19.5k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  713|  19.5k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1008|  19.5k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 19.5k]
  ------------------
 1009|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1010|      0|    return NULL;
 1011|      0|  }
 1012|       |#ifdef XML_ATTR_INFO
 1013|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1014|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1015|       |  if (parser->m_attInfo == NULL) {
 1016|       |    FREE(parser, parser->m_atts);
 1017|       |    FREE(parser, parser);
 1018|       |    return NULL;
 1019|       |  }
 1020|       |#endif
 1021|  19.5k|  parser->m_dataBuf
 1022|  19.5k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  713|  19.5k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1023|  19.5k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 19.5k]
  ------------------
 1024|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1025|       |#ifdef XML_ATTR_INFO
 1026|       |    FREE(parser, parser->m_attInfo);
 1027|       |#endif
 1028|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1029|      0|    return NULL;
 1030|      0|  }
 1031|  19.5k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  242|  19.5k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1032|       |
 1033|  19.5k|  if (dtd)
  ------------------
  |  Branch (1033:7): [True: 0, False: 19.5k]
  ------------------
 1034|      0|    parser->m_dtd = dtd;
 1035|  19.5k|  else {
 1036|  19.5k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1037|  19.5k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 19.5k]
  ------------------
 1038|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1039|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|       |#ifdef XML_ATTR_INFO
 1041|       |      FREE(parser, parser->m_attInfo);
 1042|       |#endif
 1043|      0|      FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1044|      0|      return NULL;
 1045|      0|    }
 1046|  19.5k|  }
 1047|       |
 1048|  19.5k|  parser->m_freeBindingList = NULL;
 1049|  19.5k|  parser->m_freeTagList = NULL;
 1050|  19.5k|  parser->m_freeInternalEntities = NULL;
 1051|       |
 1052|  19.5k|  parser->m_groupSize = 0;
 1053|  19.5k|  parser->m_groupConnector = NULL;
 1054|       |
 1055|  19.5k|  parser->m_unknownEncodingHandler = NULL;
 1056|  19.5k|  parser->m_unknownEncodingHandlerData = NULL;
 1057|       |
 1058|  19.5k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.5k|#define ASCII_EXCL 0x21
  ------------------
 1059|  19.5k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1060|  19.5k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|       |
 1062|  19.5k|  parser->m_nsAtts = NULL;
 1063|  19.5k|  parser->m_nsAttsVersion = 0;
 1064|  19.5k|  parser->m_nsAttsPower = 0;
 1065|       |
 1066|  19.5k|  parser->m_protocolEncodingName = NULL;
 1067|       |
 1068|  19.5k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1069|  19.5k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1070|  19.5k|  parserInit(parser, encodingName);
 1071|       |
 1072|  19.5k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1072:7): [True: 19.5k, False: 0]
  |  Branch (1072:23): [True: 0, False: 19.5k]
  ------------------
 1073|      0|    if (dtd) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 0]
  ------------------
 1074|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1075|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1076|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1077|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1078|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1079|      0|      parser->m_dtd = NULL;
 1080|      0|    }
 1081|      0|    XML_ParserFree(parser);
 1082|      0|    return NULL;
 1083|      0|  }
 1084|       |
 1085|  19.5k|  if (nameSep) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 19.5k]
  ------------------
 1086|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1087|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  162|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1088|      0|    parser->m_namespaceSeparator = *nameSep;
 1089|  19.5k|  } else {
 1090|  19.5k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  161|  19.5k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1091|  19.5k|  }
 1092|       |
 1093|  19.5k|  return parser;
 1094|  19.5k|}
xmlparse.c:dtdCreate:
 6715|  19.5k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6716|  19.5k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6717|  19.5k|  if (p == NULL)
  ------------------
  |  Branch (6717:7): [True: 0, False: 19.5k]
  ------------------
 6718|      0|    return p;
 6719|  19.5k|  poolInit(&(p->pool), ms);
 6720|  19.5k|  poolInit(&(p->entityValuePool), ms);
 6721|  19.5k|  hashTableInit(&(p->generalEntities), ms);
 6722|  19.5k|  hashTableInit(&(p->elementTypes), ms);
 6723|  19.5k|  hashTableInit(&(p->attributeIds), ms);
 6724|  19.5k|  hashTableInit(&(p->prefixes), ms);
 6725|  19.5k|#ifdef XML_DTD
 6726|  19.5k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6727|  19.5k|  hashTableInit(&(p->paramEntities), ms);
 6728|  19.5k|#endif /* XML_DTD */
 6729|  19.5k|  p->defaultPrefix.name = NULL;
 6730|  19.5k|  p->defaultPrefix.binding = NULL;
 6731|       |
 6732|  19.5k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6733|  19.5k|  p->scaffIndex = NULL;
 6734|  19.5k|  p->scaffold = NULL;
 6735|  19.5k|  p->scaffLevel = 0;
 6736|  19.5k|  p->scaffSize = 0;
 6737|  19.5k|  p->scaffCount = 0;
 6738|  19.5k|  p->contentStringLen = 0;
 6739|       |
 6740|  19.5k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6741|  19.5k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6742|  19.5k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.5k|  return p;
 6744|  19.5k|}
xmlparse.c:hashTableInit:
 7149|  97.9k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7150|  97.9k|  p->power = 0;
 7151|  97.9k|  p->size = 0;
 7152|  97.9k|  p->used = 0;
 7153|  97.9k|  p->v = NULL;
 7154|  97.9k|  p->mem = ms;
 7155|  97.9k|}
xmlparse.c:poolInit:
 7174|  78.3k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7175|  78.3k|  pool->blocks = NULL;
 7176|  78.3k|  pool->freeBlocks = NULL;
 7177|  78.3k|  pool->start = NULL;
 7178|  78.3k|  pool->ptr = NULL;
 7179|  78.3k|  pool->end = NULL;
 7180|  78.3k|  pool->mem = ms;
 7181|  78.3k|}
xmlparse.c:parserInit:
 1097|  19.5k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1098|  19.5k|  parser->m_processor = prologInitProcessor;
 1099|  19.5k|  XmlPrologStateInit(&parser->m_prologState);
 1100|  19.5k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1100:7): [True: 19.5k, False: 0]
  ------------------
 1101|  19.5k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1102|  19.5k|  }
 1103|  19.5k|  parser->m_curBase = NULL;
 1104|  19.5k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1105|  19.5k|  parser->m_userData = NULL;
 1106|  19.5k|  parser->m_handlerArg = NULL;
 1107|  19.5k|  parser->m_startElementHandler = NULL;
 1108|  19.5k|  parser->m_endElementHandler = NULL;
 1109|  19.5k|  parser->m_characterDataHandler = NULL;
 1110|  19.5k|  parser->m_processingInstructionHandler = NULL;
 1111|  19.5k|  parser->m_commentHandler = NULL;
 1112|  19.5k|  parser->m_startCdataSectionHandler = NULL;
 1113|  19.5k|  parser->m_endCdataSectionHandler = NULL;
 1114|  19.5k|  parser->m_defaultHandler = NULL;
 1115|  19.5k|  parser->m_startDoctypeDeclHandler = NULL;
 1116|  19.5k|  parser->m_endDoctypeDeclHandler = NULL;
 1117|  19.5k|  parser->m_unparsedEntityDeclHandler = NULL;
 1118|  19.5k|  parser->m_notationDeclHandler = NULL;
 1119|  19.5k|  parser->m_startNamespaceDeclHandler = NULL;
 1120|  19.5k|  parser->m_endNamespaceDeclHandler = NULL;
 1121|  19.5k|  parser->m_notStandaloneHandler = NULL;
 1122|  19.5k|  parser->m_externalEntityRefHandler = NULL;
 1123|  19.5k|  parser->m_externalEntityRefHandlerArg = parser;
 1124|  19.5k|  parser->m_skippedEntityHandler = NULL;
 1125|  19.5k|  parser->m_elementDeclHandler = NULL;
 1126|  19.5k|  parser->m_attlistDeclHandler = NULL;
 1127|  19.5k|  parser->m_entityDeclHandler = NULL;
 1128|  19.5k|  parser->m_xmlDeclHandler = NULL;
 1129|  19.5k|  parser->m_bufferPtr = parser->m_buffer;
 1130|  19.5k|  parser->m_bufferEnd = parser->m_buffer;
 1131|  19.5k|  parser->m_parseEndByteIndex = 0;
 1132|  19.5k|  parser->m_parseEndPtr = NULL;
 1133|  19.5k|  parser->m_declElementType = NULL;
 1134|  19.5k|  parser->m_declAttributeId = NULL;
 1135|  19.5k|  parser->m_declEntity = NULL;
 1136|  19.5k|  parser->m_doctypeName = NULL;
 1137|  19.5k|  parser->m_doctypeSysid = NULL;
 1138|  19.5k|  parser->m_doctypePubid = NULL;
 1139|  19.5k|  parser->m_declAttributeType = NULL;
 1140|  19.5k|  parser->m_declNotationName = NULL;
 1141|  19.5k|  parser->m_declNotationPublicId = NULL;
 1142|  19.5k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1143|  19.5k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.5k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1145|  19.5k|  parser->m_errorCode = XML_ERROR_NONE;
 1146|  19.5k|  parser->m_eventPtr = NULL;
 1147|  19.5k|  parser->m_eventEndPtr = NULL;
 1148|  19.5k|  parser->m_positionPtr = NULL;
 1149|  19.5k|  parser->m_openInternalEntities = NULL;
 1150|  19.5k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1151|  19.5k|  parser->m_tagLevel = 0;
 1152|  19.5k|  parser->m_tagStack = NULL;
 1153|  19.5k|  parser->m_inheritedBindings = NULL;
 1154|  19.5k|  parser->m_nSpecifiedAtts = 0;
 1155|  19.5k|  parser->m_unknownEncodingMem = NULL;
 1156|  19.5k|  parser->m_unknownEncodingRelease = NULL;
 1157|  19.5k|  parser->m_unknownEncodingData = NULL;
 1158|  19.5k|  parser->m_parentParser = NULL;
 1159|  19.5k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1160|  19.5k|#ifdef XML_DTD
 1161|  19.5k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1162|  19.5k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.5k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1164|  19.5k|#endif
 1165|  19.5k|  parser->m_hash_secret_salt = 0;
 1166|       |
 1167|  19.5k|#ifdef XML_DTD
 1168|  19.5k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1169|  19.5k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1170|  19.5k|  parser->m_accounting.maximumAmplificationFactor
 1171|  19.5k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.5k|  100.0f
  ------------------
 1172|  19.5k|  parser->m_accounting.activationThresholdBytes
 1173|  19.5k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.5k|  8388608 // 8 MiB, 2^23
  ------------------
 1174|       |
 1175|  19.5k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1176|  19.5k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1177|  19.5k|#endif
 1178|  19.5k|}
xmlparse.c:prologInitProcessor:
 4405|  19.5k|                    const char **nextPtr) {
 4406|  19.5k|  enum XML_Error result = initializeEncoding(parser);
 4407|  19.5k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4407:7): [True: 0, False: 19.5k]
  ------------------
 4408|      0|    return result;
 4409|  19.5k|  parser->m_processor = prologProcessor;
 4410|  19.5k|  return prologProcessor(parser, s, end, nextPtr);
 4411|  19.5k|}
xmlparse.c:initializeEncoding:
 4248|  19.5k|initializeEncoding(XML_Parser parser) {
 4249|  19.5k|  const char *s;
 4250|       |#ifdef XML_UNICODE
 4251|       |  char encodingBuf[128];
 4252|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4253|       |  if (! parser->m_protocolEncodingName)
 4254|       |    s = NULL;
 4255|       |  else {
 4256|       |    int i;
 4257|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4258|       |      if (i == sizeof(encodingBuf) - 1
 4259|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4260|       |        encodingBuf[0] = '\0';
 4261|       |        break;
 4262|       |      }
 4263|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4264|       |    }
 4265|       |    encodingBuf[i] = '\0';
 4266|       |    s = encodingBuf;
 4267|       |  }
 4268|       |#else
 4269|  19.5k|  s = parser->m_protocolEncodingName;
 4270|  19.5k|#endif
 4271|  19.5k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4271:7): [True: 19.5k, False: 0]
  |  Branch (4271:8): [True: 0, False: 19.5k]
  ------------------
 4272|  19.5k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4273|  19.5k|    return XML_ERROR_NONE;
 4274|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4275|  19.5k|}
xmlparse.c:prologProcessor:
 4605|  19.5k|                const char **nextPtr) {
 4606|  19.5k|  const char *next = s;
 4607|  19.5k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.5k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.5k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4608|  19.5k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4609|  19.5k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4610|  19.5k|                  XML_ACCOUNT_DIRECT);
 4611|  19.5k|}
xmlparse.c:doProlog:
 4616|  19.5k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4617|  19.5k|#ifdef XML_DTD
 4618|  19.5k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.5k|#define ASCII_HASH 0x23
  ------------------
 4619|  19.5k|#endif /* XML_DTD */
 4620|  19.5k|  static const XML_Char atypeCDATA[]
 4621|  19.5k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.5k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.5k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.5k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.5k|#define ASCII_A 0x41
  ------------------
 4622|  19.5k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.5k|#define ASCII_D 0x44
  ------------------
 4623|  19.5k|  static const XML_Char atypeIDREF[]
 4624|  19.5k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.5k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.5k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.5k|#define ASCII_F 0x46
  ------------------
 4625|  19.5k|  static const XML_Char atypeIDREFS[]
 4626|  19.5k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.5k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.5k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.5k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.5k|#define ASCII_S 0x53
  ------------------
 4627|  19.5k|  static const XML_Char atypeENTITY[]
 4628|  19.5k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.5k|#define ASCII_Y 0x59
  ------------------
 4629|  19.5k|  static const XML_Char atypeENTITIES[]
 4630|  19.5k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
 4631|  19.5k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.5k|#define ASCII_S 0x53
  ------------------
 4632|  19.5k|  static const XML_Char atypeNMTOKEN[]
 4633|  19.5k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.5k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.5k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.5k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
 4634|  19.5k|  static const XML_Char atypeNMTOKENS[]
 4635|  19.5k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.5k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.5k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.5k|#define ASCII_K 0x4B
  ------------------
 4636|  19.5k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.5k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.5k|#define ASCII_S 0x53
  ------------------
 4637|  19.5k|  static const XML_Char notationPrefix[]
 4638|  19.5k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.5k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.5k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.5k|#define ASCII_T 0x54
  ------------------
 4639|  19.5k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.5k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.5k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.5k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.5k|#define ASCII_LPAREN 0x28
  ------------------
 4640|  19.5k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.5k|#define ASCII_PIPE 0x7C
  ------------------
 4641|  19.5k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.5k|#define ASCII_LPAREN 0x28
  ------------------
 4642|       |
 4643|       |#ifndef XML_DTD
 4644|       |  UNUSED_P(account);
 4645|       |#endif
 4646|       |
 4647|       |  /* save one level of indirection */
 4648|  19.5k|  DTD *const dtd = parser->m_dtd;
 4649|       |
 4650|  19.5k|  const char **eventPP;
 4651|  19.5k|  const char **eventEndPP;
 4652|  19.5k|  enum XML_Content_Quant quant;
 4653|       |
 4654|  19.5k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4654:7): [True: 19.5k, False: 0]
  ------------------
 4655|  19.5k|    eventPP = &parser->m_eventPtr;
 4656|  19.5k|    eventEndPP = &parser->m_eventEndPtr;
 4657|  19.5k|  } else {
 4658|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4659|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4660|      0|  }
 4661|       |
 4662|  4.19M|  for (;;) {
 4663|  4.19M|    int role;
 4664|  4.19M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  4.19M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4665|  4.19M|    *eventPP = s;
 4666|  4.19M|    *eventEndPP = next;
 4667|  4.19M|    if (tok <= 0) {
  ------------------
  |  Branch (4667:9): [True: 6.50k, False: 4.19M]
  ------------------
 4668|  6.50k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.50k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4668:11): [True: 6.50k, False: 0]
  |  Branch (4668:23): [True: 4.55k, False: 1.95k]
  ------------------
 4669|  4.55k|        *nextPtr = s;
 4670|  4.55k|        return XML_ERROR_NONE;
 4671|  4.55k|      }
 4672|  1.95k|      switch (tok) {
 4673|  1.95k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.95k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4673:7): [True: 1.95k, False: 0]
  ------------------
 4674|  1.95k|        *eventPP = next;
 4675|  1.95k|        return XML_ERROR_INVALID_TOKEN;
 4676|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4676:7): [True: 0, False: 1.95k]
  ------------------
 4677|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4678|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4678:7): [True: 0, False: 1.95k]
  ------------------
 4679|      0|        return XML_ERROR_PARTIAL_CHAR;
 4680|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4680:7): [True: 0, False: 1.95k]
  ------------------
 4681|      0|        tok = -tok;
 4682|      0|        break;
 4683|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4683:7): [True: 0, False: 1.95k]
  ------------------
 4684|      0|#ifdef XML_DTD
 4685|       |        /* for internal PE NOT referenced between declarations */
 4686|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4686:13): [True: 0, False: 0]
  ------------------
 4687|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4687:16): [True: 0, False: 0]
  ------------------
 4688|      0|          *nextPtr = s;
 4689|      0|          return XML_ERROR_NONE;
 4690|      0|        }
 4691|       |        /* WFC: PE Between Declarations - must check that PE contains
 4692|       |           complete markup, not only for external PEs, but also for
 4693|       |           internal PEs if the reference occurs between declarations.
 4694|       |        */
 4695|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4695:13): [True: 0, False: 0]
  |  Branch (4695:40): [True: 0, False: 0]
  ------------------
 4696|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4696:15): [True: 0, False: 0]
  ------------------
 4697|      0|              == XML_ROLE_ERROR)
 4698|      0|            return XML_ERROR_INCOMPLETE_PE;
 4699|      0|          *nextPtr = s;
 4700|      0|          return XML_ERROR_NONE;
 4701|      0|        }
 4702|      0|#endif /* XML_DTD */
 4703|      0|        return XML_ERROR_NO_ELEMENTS;
 4704|      0|      default:
  ------------------
  |  Branch (4704:7): [True: 0, False: 1.95k]
  ------------------
 4705|      0|        tok = -tok;
 4706|      0|        next = end;
 4707|      0|        break;
 4708|  1.95k|      }
 4709|  1.95k|    }
 4710|  4.19M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  4.19M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4711|  4.19M|#ifdef XML_DTD
 4712|  4.19M|    switch (role) {
 4713|  11.2k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4713:5): [True: 11.2k, False: 4.18M]
  ------------------
 4714|  11.5k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4714:5): [True: 314, False: 4.19M]
  ------------------
 4715|  11.5k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 0, False: 4.19M]
  ------------------
 4716|  11.5k|      break;
 4717|  4.18M|    default:
  ------------------
  |  Branch (4717:5): [True: 4.18M, False: 11.5k]
  ------------------
 4718|  4.18M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4718:11): [True: 1, False: 4.18M]
  ------------------
 4719|      1|        accountingOnAbort(parser);
 4720|      1|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4721|      1|      }
 4722|  4.19M|    }
 4723|  4.19M|#endif
 4724|  4.19M|    switch (role) {
  ------------------
  |  Branch (4724:13): [True: 0, False: 4.19M]
  ------------------
 4725|    314|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4725:5): [True: 314, False: 4.19M]
  ------------------
 4726|    314|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4727|    314|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4727:11): [True: 236, False: 78]
  ------------------
 4728|    236|        return result;
 4729|     78|      enc = parser->m_encoding;
 4730|     78|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     78|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4731|     78|    } break;
 4732|  5.83k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4732:5): [True: 5.83k, False: 4.18M]
  ------------------
 4733|  5.83k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4733:11): [True: 0, False: 5.83k]
  ------------------
 4734|      0|        parser->m_doctypeName
 4735|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4736|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4736:13): [True: 0, False: 0]
  ------------------
 4737|      0|          return XML_ERROR_NO_MEMORY;
 4738|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4739|      0|        parser->m_doctypePubid = NULL;
 4740|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4741|      0|      }
 4742|  5.83k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4743|  5.83k|      break;
 4744|  5.00k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4744:5): [True: 5.00k, False: 4.18M]
  ------------------
 4745|  5.00k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4745:11): [True: 0, False: 5.00k]
  ------------------
 4746|      0|        parser->m_startDoctypeDeclHandler(
 4747|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4748|      0|            parser->m_doctypePubid, 1);
 4749|      0|        parser->m_doctypeName = NULL;
 4750|      0|        poolClear(&parser->m_tempPool);
 4751|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4752|      0|      }
 4753|  5.00k|      break;
 4754|      0|#ifdef XML_DTD
 4755|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4755:5): [True: 0, False: 4.19M]
  ------------------
 4756|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4757|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4757:11): [True: 0, False: 0]
  ------------------
 4758|      0|        return result;
 4759|      0|      enc = parser->m_encoding;
 4760|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4761|      0|    } break;
 4762|      0|#endif /* XML_DTD */
 4763|    719|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4763:5): [True: 719, False: 4.19M]
  ------------------
 4764|    719|#ifdef XML_DTD
 4765|    719|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    719|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4766|    719|      parser->m_declEntity = (ENTITY *)lookup(
 4767|    719|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4768|    719|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4768:11): [True: 0, False: 719]
  ------------------
 4769|      0|        return XML_ERROR_NO_MEMORY;
 4770|    719|#endif /* XML_DTD */
 4771|    719|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    719|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4772|    719|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4772:11): [True: 0, False: 719]
  ------------------
 4773|      0|        XML_Char *pubId;
 4774|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4774:13): [True: 0, False: 0]
  ------------------
 4775|      0|          return XML_ERROR_PUBLICID;
 4776|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4777|      0|                                s + enc->minBytesPerChar,
 4778|      0|                                next - enc->minBytesPerChar);
 4779|      0|        if (! pubId)
  ------------------
  |  Branch (4779:13): [True: 0, False: 0]
  ------------------
 4780|      0|          return XML_ERROR_NO_MEMORY;
 4781|      0|        normalizePublicId(pubId);
 4782|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4783|      0|        parser->m_doctypePubid = pubId;
 4784|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4785|      0|        goto alreadyChecked;
 4786|      0|      }
 4787|       |      /* fall through */
 4788|  3.82k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4788:5): [True: 3.10k, False: 4.18M]
  ------------------
 4789|  3.82k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.82k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4789:11): [True: 81, False: 3.73k]
  ------------------
 4790|     81|        return XML_ERROR_PUBLICID;
 4791|  3.73k|    alreadyChecked:
 4792|  3.73k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4792:11): [True: 3.53k, False: 208]
  |  Branch (4792:34): [True: 886, False: 2.64k]
  ------------------
 4793|    886|        XML_Char *tem
 4794|    886|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4795|    886|                              next - enc->minBytesPerChar);
 4796|    886|        if (! tem)
  ------------------
  |  Branch (4796:13): [True: 0, False: 886]
  ------------------
 4797|      0|          return XML_ERROR_NO_MEMORY;
 4798|    886|        normalizePublicId(tem);
 4799|    886|        parser->m_declEntity->publicId = tem;
 4800|    886|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    886|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4801|       |        /* Don't suppress the default handler if we fell through from
 4802|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4803|       |         */
 4804|    886|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4804:13): [True: 0, False: 886]
  |  Branch (4804:44): [True: 0, False: 0]
  ------------------
 4805|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4806|    886|      }
 4807|  3.73k|      break;
 4808|  3.73k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4808:5): [True: 2.20k, False: 4.18M]
  ------------------
 4809|  2.20k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.20k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4809:11): [True: 0, False: 2.20k]
  ------------------
 4810|       |        /* Must not close doctype from within expanded parameter entities */
 4811|      0|        return XML_ERROR_INVALID_TOKEN;
 4812|      0|      }
 4813|       |
 4814|  2.20k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4814:11): [True: 0, False: 2.20k]
  ------------------
 4815|      0|        parser->m_startDoctypeDeclHandler(
 4816|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4817|      0|            parser->m_doctypePubid, 0);
 4818|      0|        poolClear(&parser->m_tempPool);
 4819|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4820|      0|      }
 4821|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4822|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4823|       |         was not set, indicating an external subset
 4824|       |      */
 4825|  2.20k|#ifdef XML_DTD
 4826|  2.20k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4826:11): [True: 11, False: 2.19k]
  |  Branch (4826:37): [True: 0, False: 2.19k]
  ------------------
 4827|     11|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4828|     11|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     11|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4829|     11|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4829:13): [True: 0, False: 11]
  ------------------
 4830|     11|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4830:16): [True: 0, False: 0]
  ------------------
 4831|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4832|      0|                                            externalSubsetName, sizeof(ENTITY));
 4833|      0|          if (! entity) {
  ------------------
  |  Branch (4833:15): [True: 0, False: 0]
  ------------------
 4834|       |            /* The external subset name "#" will have already been
 4835|       |             * inserted into the hash table at the start of the
 4836|       |             * external entity parsing, so no allocation will happen
 4837|       |             * and lookup() cannot fail.
 4838|       |             */
 4839|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4840|      0|          }
 4841|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4841:15): [True: 0, False: 0]
  ------------------
 4842|      0|            entity->base = parser->m_curBase;
 4843|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4844|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4844:15): [True: 0, False: 0]
  ------------------
 4845|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4846|      0|                  entity->systemId, entity->publicId))
 4847|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4848|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4848:15): [True: 0, False: 0]
  ------------------
 4849|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4849:17): [True: 0, False: 0]
  |  Branch (4849:38): [True: 0, False: 0]
  ------------------
 4850|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4850:20): [True: 0, False: 0]
  ------------------
 4851|      0|              return XML_ERROR_NOT_STANDALONE;
 4852|      0|          }
 4853|       |          /* if we didn't read the foreign DTD then this means that there
 4854|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4855|       |          */
 4856|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4856:20): [True: 0, False: 0]
  ------------------
 4857|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4858|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4859|      0|        }
 4860|     11|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     11|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4861|     11|      }
 4862|  2.20k|#endif /* XML_DTD */
 4863|  2.20k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4863:11): [True: 0, False: 2.20k]
  ------------------
 4864|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4865|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4866|      0|      }
 4867|  2.20k|      break;
 4868|  11.2k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4868:5): [True: 11.2k, False: 4.18M]
  ------------------
 4869|  11.2k|#ifdef XML_DTD
 4870|       |      /* if there is no DOCTYPE declaration then now is the
 4871|       |         last chance to read the foreign DTD
 4872|       |      */
 4873|  11.2k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4873:11): [True: 0, False: 11.2k]
  ------------------
 4874|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4875|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4876|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4876:13): [True: 0, False: 0]
  ------------------
 4877|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4877:16): [True: 0, False: 0]
  ------------------
 4878|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4879|      0|                                            externalSubsetName, sizeof(ENTITY));
 4880|      0|          if (! entity)
  ------------------
  |  Branch (4880:15): [True: 0, False: 0]
  ------------------
 4881|      0|            return XML_ERROR_NO_MEMORY;
 4882|      0|          entity->base = parser->m_curBase;
 4883|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4884|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4884:15): [True: 0, False: 0]
  ------------------
 4885|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4886|      0|                  entity->systemId, entity->publicId))
 4887|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4888|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4888:15): [True: 0, False: 0]
  ------------------
 4889|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4889:17): [True: 0, False: 0]
  |  Branch (4889:38): [True: 0, False: 0]
  ------------------
 4890|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4890:20): [True: 0, False: 0]
  ------------------
 4891|      0|              return XML_ERROR_NOT_STANDALONE;
 4892|      0|          }
 4893|       |          /* if we didn't read the foreign DTD then this means that there
 4894|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4895|       |          */
 4896|      0|          else
 4897|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4898|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4899|      0|        }
 4900|      0|      }
 4901|  11.2k|#endif /* XML_DTD */
 4902|  11.2k|      parser->m_processor = contentProcessor;
 4903|  11.2k|      return contentProcessor(parser, s, end, nextPtr);
 4904|  8.95k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4904:5): [True: 8.95k, False: 4.18M]
  ------------------
 4905|  8.95k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4906|  8.95k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4906:11): [True: 0, False: 8.95k]
  ------------------
 4907|      0|        return XML_ERROR_NO_MEMORY;
 4908|  8.95k|      goto checkAttListDeclHandler;
 4909|  33.7k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4909:5): [True: 33.7k, False: 4.15M]
  ------------------
 4910|  33.7k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4911|  33.7k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4911:11): [True: 0, False: 33.7k]
  ------------------
 4912|      0|        return XML_ERROR_NO_MEMORY;
 4913|  33.7k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  33.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4914|  33.7k|      parser->m_declAttributeType = NULL;
 4915|  33.7k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  33.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4916|  33.7k|      goto checkAttListDeclHandler;
 4917|    557|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4917:5): [True: 557, False: 4.19M]
  ------------------
 4918|    557|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    557|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4919|    557|      parser->m_declAttributeType = atypeCDATA;
 4920|    557|      goto checkAttListDeclHandler;
 4921|  5.83k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4921:5): [True: 5.83k, False: 4.18M]
  ------------------
 4922|  5.83k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  5.83k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4923|  5.83k|      parser->m_declAttributeType = atypeID;
 4924|  5.83k|      goto checkAttListDeclHandler;
 4925|    276|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4925:5): [True: 276, False: 4.19M]
  ------------------
 4926|    276|      parser->m_declAttributeType = atypeIDREF;
 4927|    276|      goto checkAttListDeclHandler;
 4928|    165|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4928:5): [True: 165, False: 4.19M]
  ------------------
 4929|    165|      parser->m_declAttributeType = atypeIDREFS;
 4930|    165|      goto checkAttListDeclHandler;
 4931|    228|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4931:5): [True: 228, False: 4.19M]
  ------------------
 4932|    228|      parser->m_declAttributeType = atypeENTITY;
 4933|    228|      goto checkAttListDeclHandler;
 4934|  1.54k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4934:5): [True: 1.54k, False: 4.19M]
  ------------------
 4935|  1.54k|      parser->m_declAttributeType = atypeENTITIES;
 4936|  1.54k|      goto checkAttListDeclHandler;
 4937|    259|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4937:5): [True: 259, False: 4.19M]
  ------------------
 4938|    259|      parser->m_declAttributeType = atypeNMTOKEN;
 4939|    259|      goto checkAttListDeclHandler;
 4940|    169|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4940:5): [True: 169, False: 4.19M]
  ------------------
 4941|    169|      parser->m_declAttributeType = atypeNMTOKENS;
 4942|  51.7k|    checkAttListDeclHandler:
 4943|  51.7k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4943:11): [True: 50.7k, False: 993]
  |  Branch (4943:34): [True: 0, False: 50.7k]
  ------------------
 4944|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4945|  51.7k|      break;
 4946|  27.9k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4946:5): [True: 27.9k, False: 4.16M]
  ------------------
 4947|  28.8k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4947:5): [True: 899, False: 4.19M]
  ------------------
 4948|  28.8k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4948:11): [True: 28.2k, False: 610]
  |  Branch (4948:34): [True: 0, False: 28.2k]
  ------------------
 4949|      0|        const XML_Char *prefix;
 4950|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4950:13): [True: 0, False: 0]
  ------------------
 4951|      0|          prefix = enumValueSep;
 4952|      0|        } else {
 4953|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4953:21): [True: 0, False: 0]
  ------------------
 4954|      0|                                                              : enumValueStart);
 4955|      0|        }
 4956|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4956:13): [True: 0, False: 0]
  ------------------
 4957|      0|          return XML_ERROR_NO_MEMORY;
 4958|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4958:13): [True: 0, False: 0]
  ------------------
 4959|      0|          return XML_ERROR_NO_MEMORY;
 4960|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4961|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4962|      0|      }
 4963|  28.8k|      break;
 4964|  28.8k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4964:5): [True: 22.9k, False: 4.16M]
  ------------------
 4965|  24.3k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 1.41k, False: 4.19M]
  ------------------
 4966|  24.3k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4966:11): [True: 24.1k, False: 206]
  ------------------
 4967|  24.1k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4967:13): [True: 0, False: 24.1k]
  ------------------
 4968|  24.1k|                              parser->m_declAttributeId,
 4969|  24.1k|                              parser->m_declAttributeIsCdata,
 4970|  24.1k|                              parser->m_declAttributeIsId, 0, parser))
 4971|      0|          return XML_ERROR_NO_MEMORY;
 4972|  24.1k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4972:13): [True: 0, False: 24.1k]
  |  Branch (4972:45): [True: 0, False: 0]
  ------------------
 4973|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4973:15): [True: 0, False: 0]
  ------------------
 4974|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:19): [True: 0, False: 0]
  ------------------
 4975|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:22): [True: 0, False: 0]
  ------------------
 4976|       |            /* Enumerated or Notation type */
 4977|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4977:17): [True: 0, False: 0]
  ------------------
 4978|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:20): [True: 0, False: 0]
  ------------------
 4979|      0|              return XML_ERROR_NO_MEMORY;
 4980|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4981|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4982|      0|          }
 4983|      0|          *eventEndPP = s;
 4984|      0|          parser->m_attlistDeclHandler(
 4985|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4986|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4987|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4988|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4989|      0|        }
 4990|  24.1k|      }
 4991|  24.3k|      poolClear(&parser->m_tempPool);
 4992|  24.3k|      break;
 4993|  8.04k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4993:5): [True: 8.04k, False: 4.18M]
  ------------------
 4994|  8.93k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 888, False: 4.19M]
  ------------------
 4995|  8.93k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4995:11): [True: 8.53k, False: 402]
  ------------------
 4996|  8.53k|        const XML_Char *attVal;
 4997|  8.53k|        enum XML_Error result = storeAttributeValue(
 4998|  8.53k|            parser, enc, parser->m_declAttributeIsCdata,
 4999|  8.53k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5000|  8.53k|            XML_ACCOUNT_NONE);
 5001|  8.53k|        if (result)
  ------------------
  |  Branch (5001:13): [True: 14, False: 8.51k]
  ------------------
 5002|     14|          return result;
 5003|  8.51k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  595|  8.51k|#define poolStart(pool) ((pool)->start)
  ------------------
 5004|  8.51k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  8.51k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5005|       |        /* ID attributes aren't allowed to have a default */
 5006|  8.51k|        if (! defineAttribute(
  ------------------
  |  Branch (5006:13): [True: 0, False: 8.51k]
  ------------------
 5007|  8.51k|                parser->m_declElementType, parser->m_declAttributeId,
 5008|  8.51k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  8.51k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5009|      0|          return XML_ERROR_NO_MEMORY;
 5010|  8.51k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 8.51k]
  |  Branch (5010:45): [True: 0, False: 0]
  ------------------
 5011|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5011:15): [True: 0, False: 0]
  ------------------
 5012|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:19): [True: 0, False: 0]
  ------------------
 5013|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:22): [True: 0, False: 0]
  ------------------
 5014|       |            /* Enumerated or Notation type */
 5015|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5015:17): [True: 0, False: 0]
  ------------------
 5016|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:20): [True: 0, False: 0]
  ------------------
 5017|      0|              return XML_ERROR_NO_MEMORY;
 5018|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5019|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5020|      0|          }
 5021|      0|          *eventEndPP = s;
 5022|      0|          parser->m_attlistDeclHandler(
 5023|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5024|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5025|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5026|      0|          poolClear(&parser->m_tempPool);
 5027|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5028|      0|        }
 5029|  8.51k|      }
 5030|  8.92k|      break;
 5031|  8.92k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5031:5): [True: 8.41k, False: 4.18M]
  ------------------
 5032|  8.41k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5032:11): [True: 8.08k, False: 330]
  ------------------
 5033|  8.08k|        enum XML_Error result
 5034|  8.08k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5035|  8.08k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5036|  8.08k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5036:13): [True: 3.37k, False: 4.70k]
  ------------------
 5037|  3.37k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  595|  3.37k|#define poolStart(pool) ((pool)->start)
  ------------------
 5038|  3.37k|          parser->m_declEntity->textLen
 5039|  3.37k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  596|  3.37k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5040|  3.37k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.37k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5041|  3.37k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5041:15): [True: 0, False: 3.37k]
  ------------------
 5042|      0|            *eventEndPP = s;
 5043|      0|            parser->m_entityDeclHandler(
 5044|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5045|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5046|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5047|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5048|      0|          }
 5049|  3.37k|        } else
 5050|  4.70k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  599|  4.70k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5051|  8.08k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5051:13): [True: 66, False: 8.01k]
  ------------------
 5052|     66|          return result;
 5053|  8.08k|      }
 5054|  8.34k|      break;
 5055|  8.34k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5055:5): [True: 48, False: 4.19M]
  ------------------
 5056|     48|#ifdef XML_DTD
 5057|     48|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     48|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5058|     48|#endif /* XML_DTD */
 5059|     48|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     48|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5060|     48|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5060:11): [True: 0, False: 48]
  ------------------
 5061|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5062|      0|                                                 s + enc->minBytesPerChar,
 5063|      0|                                                 next - enc->minBytesPerChar);
 5064|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5064:13): [True: 0, False: 0]
  ------------------
 5065|      0|          return XML_ERROR_NO_MEMORY;
 5066|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5067|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5068|      0|      }
 5069|     48|#ifdef XML_DTD
 5070|     48|      else
 5071|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5072|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5073|     48|        parser->m_doctypeSysid = externalSubsetName;
 5074|     48|#endif /* XML_DTD */
 5075|     48|      if (! dtd->standalone
  ------------------
  |  Branch (5075:11): [True: 47, False: 1]
  ------------------
 5076|     48|#ifdef XML_DTD
 5077|     48|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5077:14): [True: 47, False: 0]
  ------------------
 5078|     48|#endif /* XML_DTD */
 5079|     48|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5079:14): [True: 0, False: 47]
  ------------------
 5080|     48|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5080:14): [True: 0, False: 0]
  ------------------
 5081|      0|        return XML_ERROR_NOT_STANDALONE;
 5082|       |#ifndef XML_DTD
 5083|       |      break;
 5084|       |#else  /* XML_DTD */
 5085|     48|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5085:11): [True: 11, False: 37]
  ------------------
 5086|     11|        parser->m_declEntity = (ENTITY *)lookup(
 5087|     11|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5088|     11|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5088:13): [True: 0, False: 11]
  ------------------
 5089|      0|          return XML_ERROR_NO_MEMORY;
 5090|     11|        parser->m_declEntity->publicId = NULL;
 5091|     11|      }
 5092|     48|#endif /* XML_DTD */
 5093|       |      /* fall through */
 5094|  4.61k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5094:5): [True: 4.57k, False: 4.18M]
  ------------------
 5095|  4.61k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5095:11): [True: 4.18k, False: 439]
  |  Branch (5095:34): [True: 424, False: 3.75k]
  ------------------
 5096|    424|        parser->m_declEntity->systemId
 5097|    424|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5098|    424|                              next - enc->minBytesPerChar);
 5099|    424|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5099:13): [True: 0, False: 424]
  ------------------
 5100|      0|          return XML_ERROR_NO_MEMORY;
 5101|    424|        parser->m_declEntity->base = parser->m_curBase;
 5102|    424|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    424|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5103|       |        /* Don't suppress the default handler if we fell through from
 5104|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5105|       |         */
 5106|    424|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5106:13): [True: 0, False: 424]
  |  Branch (5106:44): [True: 0, False: 0]
  ------------------
 5107|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5108|    424|      }
 5109|  4.61k|      break;
 5110|  4.61k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5110:5): [True: 4.00k, False: 4.18M]
  ------------------
 5111|  4.00k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5111:11): [True: 3.76k, False: 240]
  |  Branch (5111:34): [True: 320, False: 3.44k]
  ------------------
 5112|  4.00k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5112:14): [True: 0, False: 320]
  ------------------
 5113|      0|        *eventEndPP = s;
 5114|      0|        parser->m_entityDeclHandler(
 5115|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5116|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5117|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5118|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5119|      0|      }
 5120|  4.00k|      break;
 5121|    541|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5121:5): [True: 541, False: 4.19M]
  ------------------
 5122|    541|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5122:11): [True: 342, False: 199]
  |  Branch (5122:34): [True: 42, False: 300]
  ------------------
 5123|     42|        parser->m_declEntity->notation
 5124|     42|            = poolStoreString(&dtd->pool, enc, s, next);
 5125|     42|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5125:13): [True: 0, False: 42]
  ------------------
 5126|      0|          return XML_ERROR_NO_MEMORY;
 5127|     42|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|     42|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5128|     42|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5128:13): [True: 0, False: 42]
  ------------------
 5129|      0|          *eventEndPP = s;
 5130|      0|          parser->m_unparsedEntityDeclHandler(
 5131|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5132|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5133|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5134|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5135|     42|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5135:20): [True: 0, False: 42]
  ------------------
 5136|      0|          *eventEndPP = s;
 5137|      0|          parser->m_entityDeclHandler(
 5138|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5139|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5140|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5141|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5142|      0|        }
 5143|     42|      }
 5144|    541|      break;
 5145|  10.7k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5145:5): [True: 10.7k, False: 4.18M]
  ------------------
 5146|  10.7k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  10.7k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 497, False: 10.2k]
  |  |  ------------------
  ------------------
 5147|    497|        parser->m_declEntity = NULL;
 5148|    497|        break;
 5149|    497|      }
 5150|  10.2k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5150:11): [True: 9.89k, False: 359]
  ------------------
 5151|  9.89k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5152|  9.89k|        if (! name)
  ------------------
  |  Branch (5152:13): [True: 0, False: 9.89k]
  ------------------
 5153|      0|          return XML_ERROR_NO_MEMORY;
 5154|  9.89k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5155|  9.89k|                                                name, sizeof(ENTITY));
 5156|  9.89k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5156:13): [True: 0, False: 9.89k]
  ------------------
 5157|      0|          return XML_ERROR_NO_MEMORY;
 5158|  9.89k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5158:13): [True: 6.36k, False: 3.53k]
  ------------------
 5159|  6.36k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  6.36k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5160|  6.36k|          parser->m_declEntity = NULL;
 5161|  6.36k|        } else {
 5162|  3.53k|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.53k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5163|  3.53k|          parser->m_declEntity->publicId = NULL;
 5164|  3.53k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.53k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5165|       |          /* if we have a parent parser or are reading an internal parameter
 5166|       |             entity, then the entity declaration is not considered "internal"
 5167|       |          */
 5168|  3.53k|          parser->m_declEntity->is_internal
 5169|  3.53k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5169:20): [True: 0, False: 3.53k]
  |  Branch (5169:46): [True: 0, False: 3.53k]
  ------------------
 5170|  3.53k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5170:15): [True: 0, False: 3.53k]
  ------------------
 5171|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5172|  3.53k|        }
 5173|  9.89k|      } else {
 5174|    359|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    359|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5175|    359|        parser->m_declEntity = NULL;
 5176|    359|      }
 5177|  10.2k|    } break;
 5178|  10.2k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5178:5): [True: 2.42k, False: 4.18M]
  ------------------
 5179|  2.42k|#ifdef XML_DTD
 5180|  2.42k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5180:11): [True: 1.99k, False: 427]
  ------------------
 5181|  1.99k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5182|  1.99k|        if (! name)
  ------------------
  |  Branch (5182:13): [True: 0, False: 1.99k]
  ------------------
 5183|      0|          return XML_ERROR_NO_MEMORY;
 5184|  1.99k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5185|  1.99k|                                                name, sizeof(ENTITY));
 5186|  1.99k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5186:13): [True: 0, False: 1.99k]
  ------------------
 5187|      0|          return XML_ERROR_NO_MEMORY;
 5188|  1.99k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5188:13): [True: 1.68k, False: 316]
  ------------------
 5189|  1.68k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  1.68k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5190|  1.68k|          parser->m_declEntity = NULL;
 5191|  1.68k|        } else {
 5192|    316|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|    316|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5193|    316|          parser->m_declEntity->publicId = NULL;
 5194|    316|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    316|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5195|       |          /* if we have a parent parser or are reading an internal parameter
 5196|       |             entity, then the entity declaration is not considered "internal"
 5197|       |          */
 5198|    316|          parser->m_declEntity->is_internal
 5199|    316|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5199:20): [True: 0, False: 316]
  |  Branch (5199:46): [True: 0, False: 316]
  ------------------
 5200|    316|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5200:15): [True: 0, False: 316]
  ------------------
 5201|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5202|    316|        }
 5203|  1.99k|      } else {
 5204|    427|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    427|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5205|    427|        parser->m_declEntity = NULL;
 5206|    427|      }
 5207|       |#else  /* not XML_DTD */
 5208|       |      parser->m_declEntity = NULL;
 5209|       |#endif /* XML_DTD */
 5210|  2.42k|      break;
 5211|  2.42k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5211:5): [True: 1.20k, False: 4.19M]
  ------------------
 5212|  1.20k|      parser->m_declNotationPublicId = NULL;
 5213|  1.20k|      parser->m_declNotationName = NULL;
 5214|  1.20k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5214:11): [True: 0, False: 1.20k]
  ------------------
 5215|      0|        parser->m_declNotationName
 5216|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5217|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5217:13): [True: 0, False: 0]
  ------------------
 5218|      0|          return XML_ERROR_NO_MEMORY;
 5219|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5220|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5221|      0|      }
 5222|  1.20k|      break;
 5223|  1.20k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5223:5): [True: 1.14k, False: 4.19M]
  ------------------
 5224|  1.14k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.14k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5224:11): [True: 1, False: 1.14k]
  ------------------
 5225|      1|        return XML_ERROR_PUBLICID;
 5226|  1.14k|      if (parser
  ------------------
  |  Branch (5226:11): [True: 0, False: 1.14k]
  ------------------
 5227|  1.14k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5228|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5229|      0|                                        s + enc->minBytesPerChar,
 5230|      0|                                        next - enc->minBytesPerChar);
 5231|      0|        if (! tem)
  ------------------
  |  Branch (5231:13): [True: 0, False: 0]
  ------------------
 5232|      0|          return XML_ERROR_NO_MEMORY;
 5233|      0|        normalizePublicId(tem);
 5234|      0|        parser->m_declNotationPublicId = tem;
 5235|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5236|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5237|      0|      }
 5238|  1.14k|      break;
 5239|  1.14k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5239:5): [True: 428, False: 4.19M]
  ------------------
 5240|    428|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5240:11): [True: 0, False: 428]
  |  Branch (5240:41): [True: 0, False: 0]
  ------------------
 5241|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5242|      0|                                                   s + enc->minBytesPerChar,
 5243|      0|                                                   next - enc->minBytesPerChar);
 5244|      0|        if (! systemId)
  ------------------
  |  Branch (5244:13): [True: 0, False: 0]
  ------------------
 5245|      0|          return XML_ERROR_NO_MEMORY;
 5246|      0|        *eventEndPP = s;
 5247|      0|        parser->m_notationDeclHandler(
 5248|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5249|      0|            systemId, parser->m_declNotationPublicId);
 5250|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5251|      0|      }
 5252|    428|      poolClear(&parser->m_tempPool);
 5253|    428|      break;
 5254|    738|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5254:5): [True: 738, False: 4.19M]
  ------------------
 5255|    738|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5255:11): [True: 0, False: 738]
  |  Branch (5255:45): [True: 0, False: 0]
  ------------------
 5256|      0|        *eventEndPP = s;
 5257|      0|        parser->m_notationDeclHandler(
 5258|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5259|      0|            0, parser->m_declNotationPublicId);
 5260|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5261|      0|      }
 5262|    738|      poolClear(&parser->m_tempPool);
 5263|    738|      break;
 5264|  1.40k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5264:5): [True: 1.40k, False: 4.19M]
  ------------------
 5265|  1.40k|      switch (tok) {
 5266|      5|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      5|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5266:7): [True: 5, False: 1.39k]
  ------------------
 5267|       |        /* PE references in internal subset are
 5268|       |           not allowed within declarations. */
 5269|      5|        return XML_ERROR_PARAM_ENTITY_REF;
 5270|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5270:7): [True: 1, False: 1.40k]
  ------------------
 5271|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5272|  1.39k|      default:
  ------------------
  |  Branch (5272:7): [True: 1.39k, False: 6]
  ------------------
 5273|  1.39k|        return XML_ERROR_SYNTAX;
 5274|  1.40k|      }
 5275|      0|#ifdef XML_DTD
 5276|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5276:5): [True: 0, False: 4.19M]
  ------------------
 5277|      0|      enum XML_Error result;
 5278|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5278:11): [True: 0, False: 0]
  ------------------
 5279|      0|        reportDefault(parser, enc, s, next);
 5280|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5281|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5282|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5282:11): [True: 0, False: 0]
  ------------------
 5283|      0|        return result;
 5284|      0|      else if (! next) {
  ------------------
  |  Branch (5284:16): [True: 0, False: 0]
  ------------------
 5285|      0|        parser->m_processor = ignoreSectionProcessor;
 5286|      0|        return result;
 5287|      0|      }
 5288|      0|    } break;
 5289|      0|#endif /* XML_DTD */
 5290|  3.55M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5290:5): [True: 3.55M, False: 635k]
  ------------------
 5291|  3.55M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5291:11): [True: 1.14k, False: 3.55M]
  ------------------
 5292|  1.14k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5292:13): [True: 432, False: 714]
  ------------------
 5293|    432|          {
 5294|       |            /* Detect and prevent integer overflow */
 5295|    432|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5295:17): [True: 0, False: 432]
  ------------------
 5296|      0|              return XML_ERROR_NO_MEMORY;
 5297|      0|            }
 5298|       |
 5299|    432|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  714|    432|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5300|    432|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5301|    432|            if (new_connector == NULL) {
  ------------------
  |  Branch (5301:17): [True: 0, False: 432]
  ------------------
 5302|      0|              parser->m_groupSize /= 2;
 5303|      0|              return XML_ERROR_NO_MEMORY;
 5304|      0|            }
 5305|    432|            parser->m_groupConnector = new_connector;
 5306|    432|          }
 5307|       |
 5308|    432|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5308:15): [True: 0, False: 432]
  ------------------
 5309|       |            /* Detect and prevent integer overflow.
 5310|       |             * The preprocessor guard addresses the "always false" warning
 5311|       |             * from -Wtype-limits on platforms where
 5312|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5313|       |#if UINT_MAX >= SIZE_MAX
 5314|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5315|       |              return XML_ERROR_NO_MEMORY;
 5316|       |            }
 5317|       |#endif
 5318|       |
 5319|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5320|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5321|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5321:17): [True: 0, False: 0]
  ------------------
 5322|      0|              return XML_ERROR_NO_MEMORY;
 5323|      0|            dtd->scaffIndex = new_scaff_index;
 5324|      0|          }
 5325|    714|        } else {
 5326|    714|          parser->m_groupConnector
 5327|    714|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  713|    714|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5328|    714|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5328:15): [True: 0, False: 714]
  ------------------
 5329|      0|            parser->m_groupSize = 0;
 5330|      0|            return XML_ERROR_NO_MEMORY;
 5331|      0|          }
 5332|    714|        }
 5333|  1.14k|      }
 5334|  3.55M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5335|  3.55M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5335:11): [True: 0, False: 3.55M]
  ------------------
 5336|      0|        int myindex = nextScaffoldPart(parser);
 5337|      0|        if (myindex < 0)
  ------------------
  |  Branch (5337:13): [True: 0, False: 0]
  ------------------
 5338|      0|          return XML_ERROR_NO_MEMORY;
 5339|      0|        assert(dtd->scaffIndex != NULL);
 5340|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5341|      0|        dtd->scaffLevel++;
 5342|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5343|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5343:13): [True: 0, False: 0]
  ------------------
 5344|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5345|      0|      }
 5346|  3.55M|      break;
 5347|  3.55M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5347:5): [True: 14.6k, False: 4.17M]
  ------------------
 5348|  14.6k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  14.6k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5348:11): [True: 2, False: 14.6k]
  ------------------
 5349|      2|        return XML_ERROR_SYNTAX;
 5350|  14.6k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  14.6k|#define ASCII_COMMA 0x2C
  ------------------
 5351|  14.6k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5351:11): [True: 0, False: 14.6k]
  |  Branch (5351:29): [True: 0, False: 0]
  ------------------
 5352|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5353|  14.6k|      break;
 5354|  5.23k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5354:5): [True: 5.23k, False: 4.18M]
  ------------------
 5355|  5.23k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  5.23k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5355:11): [True: 1, False: 5.22k]
  ------------------
 5356|      1|        return XML_ERROR_SYNTAX;
 5357|  5.22k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5357:11): [True: 0, False: 5.22k]
  ------------------
 5358|  5.22k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5358:14): [True: 0, False: 0]
  ------------------
 5359|  5.22k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|      0|              != XML_CTYPE_MIXED)) {
 5361|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5362|      0|            = XML_CTYPE_CHOICE;
 5363|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5363:13): [True: 0, False: 0]
  ------------------
 5364|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5365|      0|      }
 5366|  5.22k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  5.22k|#define ASCII_PIPE 0x7C
  ------------------
 5367|  5.22k|      break;
 5368|  3.47k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5368:5): [True: 3.47k, False: 4.18M]
  ------------------
 5369|  3.47k|#ifdef XML_DTD
 5370|  3.47k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5370:5): [True: 0, False: 4.19M]
  ------------------
 5371|  3.47k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.47k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5372|  3.47k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5372:11): [True: 3.47k, False: 0]
  ------------------
 5373|  3.47k|        dtd->keepProcessing = dtd->standalone;
 5374|      0|      else {
 5375|      0|        const XML_Char *name;
 5376|      0|        ENTITY *entity;
 5377|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5378|      0|                               next - enc->minBytesPerChar);
 5379|      0|        if (! name)
  ------------------
  |  Branch (5379:13): [True: 0, False: 0]
  ------------------
 5380|      0|          return XML_ERROR_NO_MEMORY;
 5381|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5382|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5383|       |        /* first, determine if a check for an existing declaration is needed;
 5384|       |           if yes, check that the entity exists, and that it is internal,
 5385|       |           otherwise call the skipped entity handler
 5386|       |        */
 5387|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5387:13): [True: 0, False: 0]
  ------------------
 5388|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5388:16): [True: 0, False: 0]
  |  Branch (5388:17): [True: 0, False: 0]
  ------------------
 5389|      0|                                : ! dtd->hasParamEntityRefs)) {
 5390|      0|          if (! entity)
  ------------------
  |  Branch (5390:15): [True: 0, False: 0]
  ------------------
 5391|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5392|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5392:20): [True: 0, False: 0]
  ------------------
 5393|       |            /* It's hard to exhaustively search the code to be sure,
 5394|       |             * but there doesn't seem to be a way of executing the
 5395|       |             * following line.  There are two cases:
 5396|       |             *
 5397|       |             * If 'standalone' is false, the DTD must have no
 5398|       |             * parameter entities or we wouldn't have passed the outer
 5399|       |             * 'if' statement.  That means the only entity in the hash
 5400|       |             * table is the external subset name "#" which cannot be
 5401|       |             * given as a parameter entity name in XML syntax, so the
 5402|       |             * lookup must have returned NULL and we don't even reach
 5403|       |             * the test for an internal entity.
 5404|       |             *
 5405|       |             * If 'standalone' is true, it does not seem to be
 5406|       |             * possible to create entities taking this code path that
 5407|       |             * are not internal entities, so fail the test above.
 5408|       |             *
 5409|       |             * Because this analysis is very uncertain, the code is
 5410|       |             * being left in place and merely removed from the
 5411|       |             * coverage test statistics.
 5412|       |             */
 5413|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5414|      0|          }
 5415|      0|        } else if (! entity) {
  ------------------
  |  Branch (5415:20): [True: 0, False: 0]
  ------------------
 5416|      0|          dtd->keepProcessing = dtd->standalone;
 5417|       |          /* cannot report skipped entities in declarations */
 5418|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5418:15): [True: 0, False: 0]
  ------------------
 5419|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5419:18): [True: 0, False: 0]
  ------------------
 5420|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5421|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5422|      0|          }
 5423|      0|          break;
 5424|      0|        }
 5425|      0|        if (entity->open)
  ------------------
  |  Branch (5425:13): [True: 0, False: 0]
  ------------------
 5426|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5427|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5427:13): [True: 0, False: 0]
  ------------------
 5428|      0|          enum XML_Error result;
 5429|      0|          XML_Bool betweenDecl
 5430|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5430:18): [True: 0, False: 0]
  ------------------
 5431|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5432|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5432:15): [True: 0, False: 0]
  ------------------
 5433|      0|            return result;
 5434|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5435|      0|          break;
 5436|      0|        }
 5437|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5437:13): [True: 0, False: 0]
  ------------------
 5438|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5439|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5440|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5441|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5441:15): [True: 0, False: 0]
  ------------------
 5442|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5443|      0|                  entity->systemId, entity->publicId)) {
 5444|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5445|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5446|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5447|      0|          }
 5448|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5449|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5450|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5451:15): [True: 0, False: 0]
  ------------------
 5452|      0|            dtd->keepProcessing = dtd->standalone;
 5453|      0|            break;
 5454|      0|          }
 5455|      0|        } else {
 5456|      0|          dtd->keepProcessing = dtd->standalone;
 5457|      0|          break;
 5458|      0|        }
 5459|      0|      }
 5460|  3.47k|#endif /* XML_DTD */
 5461|  3.47k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5461:11): [True: 3.27k, False: 202]
  |  Branch (5461:32): [True: 0, False: 3.27k]
  ------------------
 5462|  3.47k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5462:14): [True: 0, False: 0]
  ------------------
 5463|      0|        return XML_ERROR_NOT_STANDALONE;
 5464|  3.47k|      break;
 5465|       |
 5466|       |      /* Element declaration stuff */
 5467|       |
 5468|  5.46k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5468:5): [True: 5.46k, False: 4.18M]
  ------------------
 5469|  5.46k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5469:11): [True: 0, False: 5.46k]
  ------------------
 5470|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5471|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          return XML_ERROR_NO_MEMORY;
 5473|      0|        dtd->scaffLevel = 0;
 5474|      0|        dtd->scaffCount = 0;
 5475|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5476|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5477|      0|      }
 5478|  5.46k|      break;
 5479|       |
 5480|  5.46k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5480:5): [True: 52, False: 4.19M]
  ------------------
 5481|     70|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5481:5): [True: 18, False: 4.19M]
  ------------------
 5482|     70|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5482:11): [True: 0, False: 70]
  ------------------
 5483|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5483:13): [True: 0, False: 0]
  ------------------
 5484|      0|          XML_Content *content
 5485|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5486|      0|          if (! content)
  ------------------
  |  Branch (5486:15): [True: 0, False: 0]
  ------------------
 5487|      0|            return XML_ERROR_NO_MEMORY;
 5488|      0|          content->quant = XML_CQUANT_NONE;
 5489|      0|          content->name = NULL;
 5490|      0|          content->numchildren = 0;
 5491|      0|          content->children = NULL;
 5492|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5492:28): [True: 0, False: 0]
  ------------------
 5493|      0|                                                          : XML_CTYPE_EMPTY);
 5494|      0|          *eventEndPP = s;
 5495|      0|          parser->m_elementDeclHandler(
 5496|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5497|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5498|      0|        }
 5499|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5500|      0|      }
 5501|     70|      break;
 5502|       |
 5503|  1.70k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5503:5): [True: 1.70k, False: 4.19M]
  ------------------
 5504|  1.70k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5504:11): [True: 0, False: 1.70k]
  ------------------
 5505|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5506|      0|            = XML_CTYPE_MIXED;
 5507|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5507:13): [True: 0, False: 0]
  ------------------
 5508|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5509|      0|      }
 5510|  1.70k|      break;
 5511|       |
 5512|  20.3k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5512:5): [True: 20.3k, False: 4.17M]
  ------------------
 5513|  20.3k|      quant = XML_CQUANT_NONE;
 5514|  20.3k|      goto elementContent;
 5515|    354|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5515:5): [True: 354, False: 4.19M]
  ------------------
 5516|    354|      quant = XML_CQUANT_OPT;
 5517|    354|      goto elementContent;
 5518|  3.37k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5518:5): [True: 3.37k, False: 4.18M]
  ------------------
 5519|  3.37k|      quant = XML_CQUANT_REP;
 5520|  3.37k|      goto elementContent;
 5521|  1.21k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5521:5): [True: 1.21k, False: 4.19M]
  ------------------
 5522|  1.21k|      quant = XML_CQUANT_PLUS;
 5523|  25.2k|    elementContent:
 5524|  25.2k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5524:11): [True: 0, False: 25.2k]
  ------------------
 5525|      0|        ELEMENT_TYPE *el;
 5526|      0|        const XML_Char *name;
 5527|      0|        size_t nameLen;
 5528|      0|        const char *nxt
 5529|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5529:16): [True: 0, False: 0]
  ------------------
 5530|      0|        int myindex = nextScaffoldPart(parser);
 5531|      0|        if (myindex < 0)
  ------------------
  |  Branch (5531:13): [True: 0, False: 0]
  ------------------
 5532|      0|          return XML_ERROR_NO_MEMORY;
 5533|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5534|      0|        dtd->scaffold[myindex].quant = quant;
 5535|      0|        el = getElementType(parser, enc, s, nxt);
 5536|      0|        if (! el)
  ------------------
  |  Branch (5536:13): [True: 0, False: 0]
  ------------------
 5537|      0|          return XML_ERROR_NO_MEMORY;
 5538|      0|        name = el->name;
 5539|      0|        dtd->scaffold[myindex].name = name;
 5540|      0|        nameLen = 0;
 5541|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5541:16): [True: 0, False: 0]
  ------------------
 5542|      0|          ;
 5543|       |
 5544|       |        /* Detect and prevent integer overflow */
 5545|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5545:13): [True: 0, False: 0]
  ------------------
 5546|      0|          return XML_ERROR_NO_MEMORY;
 5547|      0|        }
 5548|       |
 5549|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5550|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5550:13): [True: 0, False: 0]
  ------------------
 5551|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5552|      0|      }
 5553|  25.2k|      break;
 5554|       |
 5555|  25.2k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5555:5): [True: 12.0k, False: 4.17M]
  ------------------
 5556|  12.0k|      quant = XML_CQUANT_NONE;
 5557|  12.0k|      goto closeGroup;
 5558|  11.6k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5558:5): [True: 11.6k, False: 4.18M]
  ------------------
 5559|  11.6k|      quant = XML_CQUANT_OPT;
 5560|  11.6k|      goto closeGroup;
 5561|  2.21k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5561:5): [True: 2.21k, False: 4.18M]
  ------------------
 5562|  2.21k|      quant = XML_CQUANT_REP;
 5563|  2.21k|      goto closeGroup;
 5564|  22.5k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5564:5): [True: 22.5k, False: 4.16M]
  ------------------
 5565|  22.5k|      quant = XML_CQUANT_PLUS;
 5566|  48.4k|    closeGroup:
 5567|  48.4k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 48.4k]
  ------------------
 5568|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5568:13): [True: 0, False: 0]
  ------------------
 5569|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5570|      0|        dtd->scaffLevel--;
 5571|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5572|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5572:13): [True: 0, False: 0]
  ------------------
 5573|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5573:15): [True: 0, False: 0]
  ------------------
 5574|      0|            XML_Content *model = build_model(parser);
 5575|      0|            if (! model)
  ------------------
  |  Branch (5575:17): [True: 0, False: 0]
  ------------------
 5576|      0|              return XML_ERROR_NO_MEMORY;
 5577|      0|            *eventEndPP = s;
 5578|      0|            parser->m_elementDeclHandler(
 5579|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5580|      0|          }
 5581|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5582|      0|          dtd->contentStringLen = 0;
 5583|      0|        }
 5584|      0|      }
 5585|  48.4k|      break;
 5586|       |      /* End element declaration stuff */
 5587|       |
 5588|  48.4k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5588:5): [True: 6.35k, False: 4.18M]
  ------------------
 5589|  6.35k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5589:11): [True: 0, False: 6.35k]
  ------------------
 5590|      0|        return XML_ERROR_NO_MEMORY;
 5591|  6.35k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.35k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5592|  6.35k|      break;
 5593|    922|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5593:5): [True: 922, False: 4.19M]
  ------------------
 5594|    922|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5594:11): [True: 0, False: 922]
  ------------------
 5595|      0|        return XML_ERROR_NO_MEMORY;
 5596|    922|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|    922|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5597|    922|      break;
 5598|  11.9k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5598:5): [True: 11.9k, False: 4.18M]
  ------------------
 5599|  11.9k|      switch (tok) {
  ------------------
  |  Branch (5599:15): [True: 4.77k, False: 7.14k]
  ------------------
 5600|  7.14k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  7.14k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5600:7): [True: 7.14k, False: 4.77k]
  ------------------
 5601|  7.14k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.14k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5602|  7.14k|        break;
 5603|  11.9k|      }
 5604|  11.9k|      break;
 5605|  17.0k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5605:5): [True: 17.0k, False: 4.17M]
  ------------------
 5606|  17.0k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5606:11): [True: 0, False: 17.0k]
  ------------------
 5607|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5608|  17.0k|      break;
 5609|  69.3k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5609:5): [True: 69.3k, False: 4.12M]
  ------------------
 5610|  69.3k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5610:11): [True: 63.8k, False: 5.50k]
  |  Branch (5610:34): [True: 0, False: 63.8k]
  ------------------
 5611|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5612|  69.3k|      break;
 5613|  7.20k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5613:5): [True: 7.20k, False: 4.18M]
  ------------------
 5614|  7.20k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5614:11): [True: 0, False: 7.20k]
  ------------------
 5615|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5616|  7.20k|      break;
 5617|   185k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5617:5): [True: 185k, False: 4.00M]
  ------------------
 5618|   185k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5618:11): [True: 182k, False: 3.32k]
  |  Branch (5618:34): [True: 0, False: 182k]
  ------------------
 5619|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5620|   185k|      break;
 5621|  54.6k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5621:5): [True: 54.6k, False: 4.13M]
  ------------------
 5622|  54.6k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5622:11): [True: 0, False: 54.6k]
  ------------------
 5623|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5624|  54.6k|      break;
 5625|  4.19M|    } /* end of big switch */
 5626|       |
 5627|  4.17M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5627:9): [True: 4.16M, False: 14.5k]
  |  Branch (5627:26): [True: 0, False: 4.16M]
  ------------------
 5628|      0|      reportDefault(parser, enc, s, next);
 5629|       |
 5630|  4.17M|    switch (parser->m_parsingStatus.parsing) {
 5631|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5631:5): [True: 0, False: 4.17M]
  ------------------
 5632|      0|      *nextPtr = next;
 5633|      0|      return XML_ERROR_NONE;
 5634|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5634:5): [True: 0, False: 4.17M]
  ------------------
 5635|      0|      return XML_ERROR_ABORTED;
 5636|  4.17M|    default:
  ------------------
  |  Branch (5636:5): [True: 4.17M, False: 0]
  ------------------
 5637|  4.17M|      s = next;
 5638|  4.17M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  4.17M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.17M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5639|  4.17M|    }
 5640|  4.17M|  }
 5641|       |  /* not reached */
 5642|  19.5k|}
xmlparse.c:accountingDiffTolerated:
 7736|  62.0M|                        enum XML_Account account) {
 7737|       |  /* Note: We need to check the token type *first* to be sure that
 7738|       |   *       we can even access variable <after>, safely.
 7739|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7740|  62.0M|  switch (tok) {
  ------------------
  |  Branch (7740:11): [True: 61.5M, False: 515k]
  ------------------
 7741|  2.48k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.48k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7741:3): [True: 2.48k, False: 62.0M]
  ------------------
 7742|  4.87k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.87k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7742:3): [True: 2.38k, False: 62.0M]
  ------------------
 7743|  5.32k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.32k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7743:3): [True: 450, False: 62.0M]
  ------------------
 7744|   515k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   515k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7744:3): [True: 510k, False: 61.5M]
  ------------------
 7745|   515k|    return XML_TRUE;
  ------------------
  |  |   55|   515k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7746|  62.0M|  }
 7747|       |
 7748|  61.5M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7748:7): [True: 905k, False: 60.6M]
  ------------------
 7749|   905k|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|   905k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7750|       |
 7751|  60.6M|  unsigned int levelsAwayFromRootParser;
 7752|  60.6M|  const XML_Parser rootParser
 7753|  60.6M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7754|  60.6M|  assert(! rootParser->m_parentParser);
 7755|       |
 7756|  60.6M|  const int isDirect
 7757|  60.6M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7757:9): [True: 5.93M, False: 54.7M]
  |  Branch (7757:44): [True: 5.93M, False: 0]
  ------------------
 7758|  60.6M|  const ptrdiff_t bytesMore = after - before;
 7759|       |
 7760|  60.6M|  XmlBigCount *const additionTarget
 7761|  60.6M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7761:9): [True: 5.93M, False: 54.7M]
  ------------------
 7762|  60.6M|                 : &rootParser->m_accounting.countBytesIndirect;
 7763|       |
 7764|       |  /* Detect and avoid integer overflow */
 7765|  60.6M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7765:7): [True: 0, False: 60.6M]
  ------------------
 7766|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7767|  60.6M|  *additionTarget += bytesMore;
 7768|       |
 7769|  60.6M|  const XmlBigCount countBytesOutput
 7770|  60.6M|      = rootParser->m_accounting.countBytesDirect
 7771|  60.6M|        + rootParser->m_accounting.countBytesIndirect;
 7772|  60.6M|  const float amplificationFactor
 7773|  60.6M|      = accountingGetCurrentAmplification(rootParser);
 7774|  60.6M|  const XML_Bool tolerated
 7775|  60.6M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7775:9): [True: 34.4M, False: 26.2M]
  ------------------
 7776|  60.6M|        || (amplificationFactor
  ------------------
  |  Branch (7776:12): [True: 26.2M, False: 39]
  ------------------
 7777|  26.2M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7778|       |
 7779|  60.6M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7779:7): [True: 0, False: 60.6M]
  ------------------
 7780|      0|    accountingReportStats(rootParser, "");
 7781|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7782|      0|                         bytesMore, source_line, account);
 7783|      0|  }
 7784|       |
 7785|  60.6M|  return tolerated;
 7786|  60.6M|}
xmlparse.c:getRootParserOf:
 7851|  61.6M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7852|  61.6M|  XML_Parser rootParser = parser;
 7853|  61.6M|  unsigned int stepsTakenUpwards = 0;
 7854|  61.6M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7854:10): [True: 0, False: 61.6M]
  ------------------
 7855|      0|    rootParser = rootParser->m_parentParser;
 7856|      0|    stepsTakenUpwards++;
 7857|      0|  }
 7858|  61.6M|  assert(! rootParser->m_parentParser);
 7859|  61.6M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7859:7): [True: 60.6M, False: 959k]
  ------------------
 7860|  60.6M|    *outLevelDiff = stepsTakenUpwards;
 7861|  60.6M|  }
 7862|  61.6M|  return rootParser;
 7863|  61.6M|}
xmlparse.c:accountingGetCurrentAmplification:
 7659|  60.6M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7660|  60.6M|  const XmlBigCount countBytesOutput
 7661|  60.6M|      = rootParser->m_accounting.countBytesDirect
 7662|  60.6M|        + rootParser->m_accounting.countBytesIndirect;
 7663|  60.6M|  const float amplificationFactor
 7664|  60.6M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7664:9): [True: 60.6M, False: 0]
  ------------------
 7665|  60.6M|            ? (countBytesOutput
 7666|  60.6M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7667|  60.6M|            : 1.0f;
 7668|  60.6M|  assert(! rootParser->m_parentParser);
 7669|  60.6M|  return amplificationFactor;
 7670|  60.6M|}
xmlparse.c:accountingReportStats:
 7673|     39|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7674|     39|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7675|     39|  assert(! rootParser->m_parentParser);
 7676|       |
 7677|     39|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7677:7): [True: 39, False: 0]
  ------------------
 7678|     39|    return;
 7679|     39|  }
 7680|       |
 7681|      0|  const float amplificationFactor
 7682|      0|      = accountingGetCurrentAmplification(rootParser);
 7683|      0|  fprintf(stderr,
 7684|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7685|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7686|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7687|      0|          rootParser->m_accounting.countBytesIndirect,
 7688|      0|          (double)amplificationFactor, epilog);
 7689|      0|}
xmlparse.c:accountingOnAbort:
 7692|     39|accountingOnAbort(XML_Parser originParser) {
 7693|     39|  accountingReportStats(originParser, " ABORTING\n");
 7694|     39|}
xmlparse.c:processXmlDecl:
 4279|    314|               const char *next) {
 4280|    314|  const char *encodingName = NULL;
 4281|    314|  const XML_Char *storedEncName = NULL;
 4282|    314|  const ENCODING *newEncoding = NULL;
 4283|    314|  const char *version = NULL;
 4284|    314|  const char *versionend = NULL;
 4285|    314|  const XML_Char *storedversion = NULL;
 4286|    314|  int standalone = -1;
 4287|       |
 4288|    314|#ifdef XML_DTD
 4289|    314|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    314|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4289:7): [True: 0, False: 314]
  ------------------
 4290|    314|                                XML_ACCOUNT_DIRECT)) {
 4291|      0|    accountingOnAbort(parser);
 4292|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4293|      0|  }
 4294|    314|#endif
 4295|       |
 4296|    314|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4296:7): [True: 236, False: 78]
  |  Branch (4296:10): [True: 0, False: 314]
  ------------------
 4297|    314|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4298|    314|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4299|    236|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4299:9): [True: 0, False: 236]
  ------------------
 4300|      0|      return XML_ERROR_TEXT_DECL;
 4301|    236|    else
 4302|    236|      return XML_ERROR_XML_DECL;
 4303|    236|  }
 4304|     78|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4304:7): [True: 78, False: 0]
  |  Branch (4304:32): [True: 27, False: 51]
  ------------------
 4305|     27|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     27|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4306|     27|#ifdef XML_DTD
 4307|     27|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4307:9): [True: 0, False: 27]
  ------------------
 4308|     27|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4309|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4310|     27|#endif /* XML_DTD */
 4311|     27|  }
 4312|     78|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4312:7): [True: 0, False: 78]
  ------------------
 4313|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4313:9): [True: 0, False: 0]
  ------------------
 4314|      0|      storedEncName = poolStoreString(
 4315|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4316|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4317|      0|      if (! storedEncName)
  ------------------
  |  Branch (4317:11): [True: 0, False: 0]
  ------------------
 4318|      0|        return XML_ERROR_NO_MEMORY;
 4319|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4320|      0|    }
 4321|      0|    if (version) {
  ------------------
  |  Branch (4321:9): [True: 0, False: 0]
  ------------------
 4322|      0|      storedversion
 4323|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4324|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4325|      0|      if (! storedversion)
  ------------------
  |  Branch (4325:11): [True: 0, False: 0]
  ------------------
 4326|      0|        return XML_ERROR_NO_MEMORY;
 4327|      0|    }
 4328|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4329|      0|                             standalone);
 4330|     78|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4330:14): [True: 0, False: 78]
  ------------------
 4331|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4332|     78|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4332:7): [True: 0, False: 78]
  ------------------
 4333|      0|    if (newEncoding) {
  ------------------
  |  Branch (4333:9): [True: 0, False: 0]
  ------------------
 4334|       |      /* Check that the specified encoding does not conflict with what
 4335|       |       * the parser has already deduced.  Do we have the same number
 4336|       |       * of bytes in the smallest representation of a character?  If
 4337|       |       * this is UTF-16, is it the same endianness?
 4338|       |       */
 4339|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4339:11): [True: 0, False: 0]
  ------------------
 4340|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4340:15): [True: 0, False: 0]
  ------------------
 4341|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4341:18): [True: 0, False: 0]
  ------------------
 4342|      0|        parser->m_eventPtr = encodingName;
 4343|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4344|      0|      }
 4345|      0|      parser->m_encoding = newEncoding;
 4346|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4346:16): [True: 0, False: 0]
  ------------------
 4347|      0|      enum XML_Error result;
 4348|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4348:11): [True: 0, False: 0]
  ------------------
 4349|      0|        storedEncName = poolStoreString(
 4350|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4351|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4352|      0|        if (! storedEncName)
  ------------------
  |  Branch (4352:13): [True: 0, False: 0]
  ------------------
 4353|      0|          return XML_ERROR_NO_MEMORY;
 4354|      0|      }
 4355|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4356|      0|      poolClear(&parser->m_temp2Pool);
 4357|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4357:11): [True: 0, False: 0]
  ------------------
 4358|      0|        parser->m_eventPtr = encodingName;
 4359|      0|      return result;
 4360|      0|    }
 4361|      0|  }
 4362|       |
 4363|     78|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4363:7): [True: 0, False: 78]
  |  Branch (4363:24): [True: 0, False: 78]
  ------------------
 4364|      0|    poolClear(&parser->m_temp2Pool);
 4365|       |
 4366|     78|  return XML_ERROR_NONE;
 4367|     78|}
xmlparse.c:poolStoreString:
 7283|   590k|                const char *end) {
 7284|   590k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7284:7): [True: 0, False: 590k]
  ------------------
 7285|      0|    return NULL;
 7286|   590k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7286:7): [True: 576, False: 589k]
  |  Branch (7286:33): [True: 0, False: 576]
  ------------------
 7287|      0|    return NULL;
 7288|   590k|  *(pool->ptr)++ = 0;
 7289|   590k|  return pool->start;
 7290|   590k|}
xmlparse.c:lookup:
 7042|  3.54M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7043|  3.54M|  size_t i;
 7044|  3.54M|  if (table->size == 0) {
  ------------------
  |  Branch (7044:7): [True: 38.2k, False: 3.50M]
  ------------------
 7045|  38.2k|    size_t tsize;
 7046|  38.2k|    if (! createSize)
  ------------------
  |  Branch (7046:9): [True: 21.3k, False: 16.9k]
  ------------------
 7047|  21.3k|      return NULL;
 7048|  16.9k|    table->power = INIT_POWER;
  ------------------
  |  | 7006|  16.9k|#define INIT_POWER 6
  ------------------
 7049|       |    /* table->size is a power of 2 */
 7050|  16.9k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7006|  16.9k|#define INIT_POWER 6
  ------------------
 7051|  16.9k|    tsize = table->size * sizeof(NAMED *);
 7052|  16.9k|    table->v = table->mem->malloc_fcn(tsize);
 7053|  16.9k|    if (! table->v) {
  ------------------
  |  Branch (7053:9): [True: 0, False: 16.9k]
  ------------------
 7054|      0|      table->size = 0;
 7055|      0|      return NULL;
 7056|      0|    }
 7057|  16.9k|    memset(table->v, 0, tsize);
 7058|  16.9k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7059|  3.50M|  } else {
 7060|  3.50M|    unsigned long h = hash(parser, name);
 7061|  3.50M|    unsigned long mask = (unsigned long)table->size - 1;
 7062|  3.50M|    unsigned char step = 0;
 7063|  3.50M|    i = h & mask;
 7064|  3.70M|    while (table->v[i]) {
  ------------------
  |  Branch (7064:12): [True: 3.67M, False: 29.0k]
  ------------------
 7065|  3.67M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7065:11): [True: 3.47M, False: 201k]
  ------------------
 7066|  3.47M|        return table->v[i];
 7067|   201k|      if (! step)
  ------------------
  |  Branch (7067:11): [True: 195k, False: 5.95k]
  ------------------
 7068|   195k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  234|   195k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|   195k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7069|   201k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7069:7): [True: 7.55k, False: 193k]
  ------------------
 7070|   201k|    }
 7071|  29.0k|    if (! createSize)
  ------------------
  |  Branch (7071:9): [True: 9.06k, False: 20.0k]
  ------------------
 7072|  9.06k|      return NULL;
 7073|       |
 7074|       |    /* check for overflow (table is half full) */
 7075|  20.0k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7075:9): [True: 244, False: 19.7k]
  ------------------
 7076|    244|      unsigned char newPower = table->power + 1;
 7077|       |
 7078|       |      /* Detect and prevent invalid shift */
 7079|    244|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7079:11): [True: 0, False: 244]
  ------------------
 7080|      0|        return NULL;
 7081|      0|      }
 7082|       |
 7083|    244|      size_t newSize = (size_t)1 << newPower;
 7084|    244|      unsigned long newMask = (unsigned long)newSize - 1;
 7085|       |
 7086|       |      /* Detect and prevent integer overflow */
 7087|    244|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7087:11): [True: 0, False: 244]
  ------------------
 7088|      0|        return NULL;
 7089|      0|      }
 7090|       |
 7091|    244|      size_t tsize = newSize * sizeof(NAMED *);
 7092|    244|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7093|    244|      if (! newV)
  ------------------
  |  Branch (7093:11): [True: 0, False: 244]
  ------------------
 7094|      0|        return NULL;
 7095|    244|      memset(newV, 0, tsize);
 7096|  33.0k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7096:19): [True: 32.7k, False: 244]
  ------------------
 7097|  32.7k|        if (table->v[i]) {
  ------------------
  |  Branch (7097:13): [True: 16.3k, False: 16.3k]
  ------------------
 7098|  16.3k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7099|  16.3k|          size_t j = newHash & newMask;
 7100|  16.3k|          step = 0;
 7101|  19.1k|          while (newV[j]) {
  ------------------
  |  Branch (7101:18): [True: 2.76k, False: 16.3k]
  ------------------
 7102|  2.76k|            if (! step)
  ------------------
  |  Branch (7102:17): [True: 2.22k, False: 544]
  ------------------
 7103|  2.22k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  234|  2.22k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|  2.22k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7104|  2.76k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7104:13): [True: 367, False: 2.39k]
  ------------------
 7105|  2.76k|          }
 7106|  16.3k|          newV[j] = table->v[i];
 7107|  16.3k|        }
 7108|    244|      table->mem->free_fcn(table->v);
 7109|    244|      table->v = newV;
 7110|    244|      table->power = newPower;
 7111|    244|      table->size = newSize;
 7112|    244|      i = h & newMask;
 7113|    244|      step = 0;
 7114|    399|      while (table->v[i]) {
  ------------------
  |  Branch (7114:14): [True: 155, False: 244]
  ------------------
 7115|    155|        if (! step)
  ------------------
  |  Branch (7115:13): [True: 93, False: 62]
  ------------------
 7116|     93|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  234|     93|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|     93|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7117|    155|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7117:9): [True: 28, False: 127]
  ------------------
 7118|    155|      }
 7119|    244|    }
 7120|  20.0k|  }
 7121|  36.9k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7122|  36.9k|  if (! table->v[i])
  ------------------
  |  Branch (7122:7): [True: 0, False: 36.9k]
  ------------------
 7123|      0|    return NULL;
 7124|  36.9k|  memset(table->v[i], 0, createSize);
 7125|  36.9k|  table->v[i]->name = name;
 7126|  36.9k|  (table->used)++;
 7127|  36.9k|  return table->v[i];
 7128|  36.9k|}
xmlparse.c:hash:
 7031|  3.53M|hash(XML_Parser parser, KEY s) {
 7032|  3.53M|  struct siphash state;
 7033|  3.53M|  struct sipkey key;
 7034|  3.53M|  (void)sip24_valid;
 7035|  3.53M|  copy_salt_to_sipkey(parser, &key);
 7036|  3.53M|  sip24_init(&state, &key);
 7037|  3.53M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7038|  3.53M|  return (unsigned long)sip24_final(&state);
 7039|  3.53M|}
xmlparse.c:copy_salt_to_sipkey:
 7025|  3.53M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7026|  3.53M|  key->k[0] = 0;
 7027|  3.53M|  key->k[1] = get_hash_secret_salt(parser);
 7028|  3.53M|}
xmlparse.c:get_hash_secret_salt:
  946|  3.53M|get_hash_secret_salt(XML_Parser parser) {
  947|  3.53M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (947:7): [True: 0, False: 3.53M]
  ------------------
  948|      0|    return get_hash_secret_salt(parser->m_parentParser);
  949|  3.53M|  return parser->m_hash_secret_salt;
  950|  3.53M|}
xmlparse.c:keylen:
 7017|  3.53M|keylen(KEY s) {
 7018|  3.53M|  size_t len = 0;
 7019|  14.3M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7019:10): [True: 10.8M, False: 3.53M]
  ------------------
 7020|  10.8M|    ;
 7021|  3.53M|  return len;
 7022|  3.53M|}
xmlparse.c:keyeq:
 7009|  3.67M|keyeq(KEY s1, KEY s2) {
 7010|  9.19M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7010:10): [True: 8.99M, False: 201k]
  ------------------
 7011|  8.99M|    if (*s1 == 0)
  ------------------
  |  Branch (7011:9): [True: 3.47M, False: 5.51M]
  ------------------
 7012|  3.47M|      return XML_TRUE;
  ------------------
  |  |   55|  3.47M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7013|   201k|  return XML_FALSE;
  ------------------
  |  |   56|   201k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7014|  3.67M|}
xmlparse.c:normalizePublicId:
 6694|    886|normalizePublicId(XML_Char *publicId) {
 6695|    886|  XML_Char *p = publicId;
 6696|    886|  XML_Char *s;
 6697|  21.0k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6697:22): [True: 20.1k, False: 886]
  ------------------
 6698|  20.1k|    switch (*s) {
 6699|    569|    case 0x20:
  ------------------
  |  Branch (6699:5): [True: 569, False: 19.5k]
  ------------------
 6700|  1.88k|    case 0xD:
  ------------------
  |  Branch (6700:5): [True: 1.31k, False: 18.8k]
  ------------------
 6701|  2.74k|    case 0xA:
  ------------------
  |  Branch (6701:5): [True: 860, False: 19.2k]
  ------------------
 6702|  2.74k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6702:11): [True: 1.30k, False: 1.43k]
  |  Branch (6702:28): [True: 475, False: 833]
  ------------------
 6703|    475|        *p++ = 0x20;
 6704|  2.74k|      break;
 6705|  17.4k|    default:
  ------------------
  |  Branch (6705:5): [True: 17.4k, False: 2.74k]
  ------------------
 6706|  17.4k|      *p++ = *s;
 6707|  20.1k|    }
 6708|  20.1k|  }
 6709|    886|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6709:7): [True: 601, False: 285]
  |  Branch (6709:24): [True: 52, False: 549]
  ------------------
 6710|     52|    --p;
 6711|    886|  *p = XML_T('\0');
  ------------------
  |  |  190|    886|#  define XML_T(x) x
  ------------------
 6712|    886|}
xmlparse.c:contentProcessor:
 2621|  11.2k|                 const char **endPtr) {
 2622|  11.2k|  enum XML_Error result = doContent(
 2623|  11.2k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2624|  11.2k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2625|  11.2k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2625:7): [True: 7.06k, False: 4.21k]
  ------------------
 2626|  7.06k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2626:9): [True: 0, False: 7.06k]
  ------------------
 2627|      0|      return XML_ERROR_NO_MEMORY;
 2628|  7.06k|  }
 2629|  11.2k|  return result;
 2630|  11.2k|}
xmlparse.c:doContent:
 2751|  90.0k|          XML_Bool haveMore, enum XML_Account account) {
 2752|       |  /* save one level of indirection */
 2753|  90.0k|  DTD *const dtd = parser->m_dtd;
 2754|       |
 2755|  90.0k|  const char **eventPP;
 2756|  90.0k|  const char **eventEndPP;
 2757|  90.0k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2757:7): [True: 11.2k, False: 78.7k]
  ------------------
 2758|  11.2k|    eventPP = &parser->m_eventPtr;
 2759|  11.2k|    eventEndPP = &parser->m_eventEndPtr;
 2760|  78.7k|  } else {
 2761|  78.7k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2762|  78.7k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2763|  78.7k|  }
 2764|  90.0k|  *eventPP = s;
 2765|       |
 2766|  35.0M|  for (;;) {
 2767|  35.0M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2768|  35.0M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  35.0M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  35.0M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2769|  35.0M|#ifdef XML_DTD
 2770|  35.0M|    const char *accountAfter
 2771|  35.0M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  35.0M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  35.0M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2771:12): [True: 874, False: 35.0M]
  |  Branch (2771:46): [True: 48, False: 35.0M]
  ------------------
 2772|  35.0M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2772:18): [True: 77, False: 845]
  ------------------
 2773|  35.0M|              : next;
 2774|  35.0M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2774:9): [True: 3, False: 35.0M]
  ------------------
 2775|  35.0M|                                  account)) {
 2776|      3|      accountingOnAbort(parser);
 2777|      3|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2778|      3|    }
 2779|  35.0M|#endif
 2780|  35.0M|    *eventEndPP = next;
 2781|  35.0M|    switch (tok) {
 2782|     48|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     48|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2782:5): [True: 48, False: 35.0M]
  ------------------
 2783|     48|      if (haveMore) {
  ------------------
  |  Branch (2783:11): [True: 48, False: 0]
  ------------------
 2784|     48|        *nextPtr = s;
 2785|     48|        return XML_ERROR_NONE;
 2786|     48|      }
 2787|      0|      *eventEndPP = end;
 2788|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2788:11): [True: 0, False: 0]
  ------------------
 2789|      0|        XML_Char c = 0xA;
 2790|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2791|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2791:18): [True: 0, False: 0]
  ------------------
 2792|      0|        reportDefault(parser, enc, s, end);
 2793|       |      /* We are at the end of the final buffer, should we check for
 2794|       |         XML_SUSPENDED, XML_FINISHED?
 2795|       |      */
 2796|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2796:11): [True: 0, False: 0]
  ------------------
 2797|      0|        return XML_ERROR_NO_ELEMENTS;
 2798|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2798:11): [True: 0, False: 0]
  ------------------
 2799|      0|        return XML_ERROR_ASYNC_ENTITY;
 2800|      0|      *nextPtr = end;
 2801|      0|      return XML_ERROR_NONE;
 2802|  81.1k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  81.1k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2802:5): [True: 81.1k, False: 34.9M]
  ------------------
 2803|  81.1k|      if (haveMore) {
  ------------------
  |  Branch (2803:11): [True: 3.88k, False: 77.2k]
  ------------------
 2804|  3.88k|        *nextPtr = s;
 2805|  3.88k|        return XML_ERROR_NONE;
 2806|  3.88k|      }
 2807|  77.2k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2807:11): [True: 77.2k, False: 0]
  ------------------
 2808|  77.2k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2808:13): [True: 51, False: 77.2k]
  ------------------
 2809|     51|          return XML_ERROR_ASYNC_ENTITY;
 2810|  77.2k|        *nextPtr = s;
 2811|  77.2k|        return XML_ERROR_NONE;
 2812|  77.2k|      }
 2813|      0|      return XML_ERROR_NO_ELEMENTS;
 2814|  2.27k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.27k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2814:5): [True: 2.27k, False: 35.0M]
  ------------------
 2815|  2.27k|      *eventPP = next;
 2816|  2.27k|      return XML_ERROR_INVALID_TOKEN;
 2817|  2.24k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.24k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2817:5): [True: 2.24k, False: 35.0M]
  ------------------
 2818|  2.24k|      if (haveMore) {
  ------------------
  |  Branch (2818:11): [True: 2.10k, False: 137]
  ------------------
 2819|  2.10k|        *nextPtr = s;
 2820|  2.10k|        return XML_ERROR_NONE;
 2821|  2.10k|      }
 2822|    137|      return XML_ERROR_UNCLOSED_TOKEN;
 2823|    311|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    311|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2823:5): [True: 311, False: 35.0M]
  ------------------
 2824|    311|      if (haveMore) {
  ------------------
  |  Branch (2824:11): [True: 311, False: 0]
  ------------------
 2825|    311|        *nextPtr = s;
 2826|    311|        return XML_ERROR_NONE;
 2827|    311|      }
 2828|      0|      return XML_ERROR_PARTIAL_CHAR;
 2829|  96.7k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  96.7k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2829:5): [True: 96.7k, False: 34.9M]
  ------------------
 2830|  96.7k|      const XML_Char *name;
 2831|  96.7k|      ENTITY *entity;
 2832|  96.7k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  96.7k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2833|  96.7k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2834|  96.7k|      if (ch) {
  ------------------
  |  Branch (2834:11): [True: 2.73k, False: 94.0k]
  ------------------
 2835|  2.73k|#ifdef XML_DTD
 2836|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2837|       |         *       so there is no amplification and hence recording without
 2838|       |         *       protection. */
 2839|  2.73k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2840|  2.73k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2841|  2.73k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2842|  2.73k|#endif /* XML_DTD */
 2843|  2.73k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2843:13): [True: 0, False: 2.73k]
  ------------------
 2844|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2845|  2.73k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2845:18): [True: 0, False: 2.73k]
  ------------------
 2846|      0|          reportDefault(parser, enc, s, next);
 2847|  2.73k|        break;
 2848|  2.73k|      }
 2849|  94.0k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2850|  94.0k|                             next - enc->minBytesPerChar);
 2851|  94.0k|      if (! name)
  ------------------
  |  Branch (2851:11): [True: 0, False: 94.0k]
  ------------------
 2852|      0|        return XML_ERROR_NO_MEMORY;
 2853|  94.0k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2854|  94.0k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  94.0k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2855|       |      /* First, determine if a check for an existing declaration is needed;
 2856|       |         if yes, check that the entity exists, and that it is internal,
 2857|       |         otherwise call the skipped entity or default handler.
 2858|       |      */
 2859|  94.0k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2859:11): [True: 76.3k, False: 17.7k]
  |  Branch (2859:40): [True: 201, False: 17.5k]
  ------------------
 2860|  76.5k|        if (! entity)
  ------------------
  |  Branch (2860:13): [True: 335, False: 76.1k]
  ------------------
 2861|    335|          return XML_ERROR_UNDEFINED_ENTITY;
 2862|  76.1k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2862:18): [True: 0, False: 76.1k]
  ------------------
 2863|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2864|  76.5k|      } else if (! entity) {
  ------------------
  |  Branch (2864:18): [True: 14.7k, False: 2.79k]
  ------------------
 2865|  14.7k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2865:13): [True: 0, False: 14.7k]
  ------------------
 2866|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2867|  14.7k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2867:18): [True: 0, False: 14.7k]
  ------------------
 2868|      0|          reportDefault(parser, enc, s, next);
 2869|  14.7k|        break;
 2870|  14.7k|      }
 2871|  78.9k|      if (entity->open)
  ------------------
  |  Branch (2871:11): [True: 5, False: 78.9k]
  ------------------
 2872|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2873|  78.9k|      if (entity->notation)
  ------------------
  |  Branch (2873:11): [True: 1, False: 78.9k]
  ------------------
 2874|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2875|  78.9k|      if (entity->textPtr) {
  ------------------
  |  Branch (2875:11): [True: 78.7k, False: 198]
  ------------------
 2876|  78.7k|        enum XML_Error result;
 2877|  78.7k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2877:13): [True: 0, False: 78.7k]
  ------------------
 2878|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2878:15): [True: 0, False: 0]
  ------------------
 2879|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2880|      0|                                           0);
 2881|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2881:20): [True: 0, False: 0]
  ------------------
 2882|      0|            reportDefault(parser, enc, s, next);
 2883|      0|          break;
 2884|      0|        }
 2885|  78.7k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|  78.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2886|  78.7k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2886:13): [True: 711, False: 78.0k]
  ------------------
 2887|    711|          return result;
 2888|  78.7k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2888:18): [True: 0, False: 198]
  ------------------
 2889|      0|        const XML_Char *context;
 2890|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2891|      0|        context = getContext(parser);
 2892|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2893|      0|        if (! context)
  ------------------
  |  Branch (2893:13): [True: 0, False: 0]
  ------------------
 2894|      0|          return XML_ERROR_NO_MEMORY;
 2895|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2895:13): [True: 0, False: 0]
  ------------------
 2896|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2897|      0|                entity->systemId, entity->publicId))
 2898|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2899|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2900|    198|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2900:18): [True: 0, False: 198]
  ------------------
 2901|      0|        reportDefault(parser, enc, s, next);
 2902|  78.2k|      break;
 2903|  78.9k|    }
 2904|  2.93M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.93M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2904:5): [True: 2.93M, False: 32.1M]
  ------------------
 2905|       |      /* fall through */
 2906|  2.94M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.94M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2906:5): [True: 8.03k, False: 35.0M]
  ------------------
 2907|  2.94M|      TAG *tag;
 2908|  2.94M|      enum XML_Error result;
 2909|  2.94M|      XML_Char *toPtr;
 2910|  2.94M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2910:11): [True: 15.9k, False: 2.92M]
  ------------------
 2911|  15.9k|        tag = parser->m_freeTagList;
 2912|  15.9k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2913|  2.92M|      } else {
 2914|  2.92M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  713|  2.92M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2915|  2.92M|        if (! tag)
  ------------------
  |  Branch (2915:13): [True: 0, False: 2.92M]
  ------------------
 2916|      0|          return XML_ERROR_NO_MEMORY;
 2917|  2.92M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  713|  2.92M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2918|  2.92M|        if (! tag->buf) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 2.92M]
  ------------------
 2919|      0|          FREE(parser, tag);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2920|      0|          return XML_ERROR_NO_MEMORY;
 2921|      0|        }
 2922|  2.92M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  241|  2.92M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2923|  2.92M|      }
 2924|  2.94M|      tag->bindings = NULL;
 2925|  2.94M|      tag->parent = parser->m_tagStack;
 2926|  2.94M|      parser->m_tagStack = tag;
 2927|  2.94M|      tag->name.localPart = NULL;
 2928|  2.94M|      tag->name.prefix = NULL;
 2929|  2.94M|      tag->rawName = s + enc->minBytesPerChar;
 2930|  2.94M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.94M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2931|  2.94M|      ++parser->m_tagLevel;
 2932|  2.94M|      {
 2933|  2.94M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2934|  2.94M|        const char *fromPtr = tag->rawName;
 2935|  2.94M|        toPtr = (XML_Char *)tag->buf;
 2936|  2.94M|        for (;;) {
 2937|  2.94M|          int bufSize;
 2938|  2.94M|          int convLen;
 2939|  2.94M|          const enum XML_Convert_Result convert_res
 2940|  2.94M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  160|  2.94M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.94M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2941|  2.94M|                           (ICHAR *)tag->bufEnd - 1);
 2942|  2.94M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2943|  2.94M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2943:15): [True: 2.94M, False: 1.96k]
  ------------------
 2944|  2.94M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2944:18): [True: 0, False: 1.96k]
  ------------------
 2945|  2.94M|            tag->name.strLen = convLen;
 2946|  2.94M|            break;
 2947|  2.94M|          }
 2948|  1.96k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2949|  1.96k|          {
 2950|  1.96k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  1.96k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2951|  1.96k|            if (temp == NULL)
  ------------------
  |  Branch (2951:17): [True: 0, False: 1.96k]
  ------------------
 2952|      0|              return XML_ERROR_NO_MEMORY;
 2953|  1.96k|            tag->buf = temp;
 2954|  1.96k|            tag->bufEnd = temp + bufSize;
 2955|  1.96k|            toPtr = (XML_Char *)temp + convLen;
 2956|  1.96k|          }
 2957|  1.96k|        }
 2958|  2.94M|      }
 2959|  2.94M|      tag->name.str = (XML_Char *)tag->buf;
 2960|  2.94M|      *toPtr = XML_T('\0');
  ------------------
  |  |  190|  2.94M|#  define XML_T(x) x
  ------------------
 2961|  2.94M|      result
 2962|  2.94M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2963|  2.94M|      if (result)
  ------------------
  |  Branch (2963:11): [True: 623, False: 2.94M]
  ------------------
 2964|    623|        return result;
 2965|  2.94M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2965:11): [True: 2.94M, False: 0]
  ------------------
 2966|  2.94M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2967|  2.94M|                                      (const XML_Char **)parser->m_atts);
 2968|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2968:16): [True: 0, False: 0]
  ------------------
 2969|      0|        reportDefault(parser, enc, s, next);
 2970|  2.94M|      poolClear(&parser->m_tempPool);
 2971|  2.94M|      break;
 2972|  2.94M|    }
 2973|  2.99k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  2.99k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2973:5): [True: 2.99k, False: 35.0M]
  ------------------
 2974|       |      /* fall through */
 2975|  9.41k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  9.41k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2975:5): [True: 6.41k, False: 35.0M]
  ------------------
 2976|  9.41k|      const char *rawName = s + enc->minBytesPerChar;
 2977|  9.41k|      enum XML_Error result;
 2978|  9.41k|      BINDING *bindings = NULL;
 2979|  9.41k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  9.41k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2980|  9.41k|      TAG_NAME name;
 2981|  9.41k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2982|  9.41k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  9.41k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2983|  9.41k|      if (! name.str)
  ------------------
  |  Branch (2983:11): [True: 0, False: 9.41k]
  ------------------
 2984|      0|        return XML_ERROR_NO_MEMORY;
 2985|  9.41k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  9.41k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2986|  9.41k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2987|  9.41k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2988|  9.41k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2988:11): [True: 44, False: 9.36k]
  ------------------
 2989|     44|        freeBindings(parser, bindings);
 2990|     44|        return result;
 2991|     44|      }
 2992|  9.36k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  9.36k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2993|  9.36k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2993:11): [True: 9.36k, False: 0]
  ------------------
 2994|  9.36k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2995|  9.36k|                                      (const XML_Char **)parser->m_atts);
 2996|  9.36k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.36k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2997|  9.36k|      }
 2998|  9.36k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2998:11): [True: 9.36k, False: 0]
  ------------------
 2999|  9.36k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (2999:13): [True: 9.36k, False: 0]
  ------------------
 3000|  9.36k|          *eventPP = *eventEndPP;
 3001|  9.36k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3002|  9.36k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.36k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3003|  9.36k|      }
 3004|  9.36k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3004:11): [True: 0, False: 9.36k]
  |  Branch (3004:28): [True: 0, False: 0]
  ------------------
 3005|      0|        reportDefault(parser, enc, s, next);
 3006|  9.36k|      poolClear(&parser->m_tempPool);
 3007|  9.36k|      freeBindings(parser, bindings);
 3008|  9.36k|    }
 3009|  9.36k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3009:11): [True: 112, False: 9.25k]
  ------------------
 3010|  9.36k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3010:14): [True: 112, False: 0]
  ------------------
 3011|    112|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3011:13): [True: 0, False: 112]
  ------------------
 3012|      0|          parser->m_processor = epilogProcessor;
 3013|    112|        else
 3014|    112|          return epilogProcessor(parser, next, end, nextPtr);
 3015|    112|      }
 3016|  9.25k|      break;
 3017|  16.5k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  16.5k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3017:5): [True: 16.5k, False: 35.0M]
  ------------------
 3018|  16.5k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3018:11): [True: 3, False: 16.5k]
  ------------------
 3019|      3|        return XML_ERROR_ASYNC_ENTITY;
 3020|  16.5k|      else {
 3021|  16.5k|        int len;
 3022|  16.5k|        const char *rawName;
 3023|  16.5k|        TAG *tag = parser->m_tagStack;
 3024|  16.5k|        rawName = s + enc->minBytesPerChar * 2;
 3025|  16.5k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  16.5k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3026|  16.5k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3026:13): [True: 29, False: 16.4k]
  ------------------
 3027|  16.5k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3027:16): [True: 173, False: 16.3k]
  ------------------
 3028|    202|          *eventPP = rawName;
 3029|    202|          return XML_ERROR_TAG_MISMATCH;
 3030|    202|        }
 3031|  16.3k|        parser->m_tagStack = tag->parent;
 3032|  16.3k|        tag->parent = parser->m_freeTagList;
 3033|  16.3k|        parser->m_freeTagList = tag;
 3034|  16.3k|        --parser->m_tagLevel;
 3035|  16.3k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3035:13): [True: 16.3k, False: 0]
  ------------------
 3036|  16.3k|          const XML_Char *localPart;
 3037|  16.3k|          const XML_Char *prefix;
 3038|  16.3k|          XML_Char *uri;
 3039|  16.3k|          localPart = tag->name.localPart;
 3040|  16.3k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3040:15): [True: 0, False: 16.3k]
  |  Branch (3040:31): [True: 0, False: 0]
  ------------------
 3041|       |            /* localPart and prefix may have been overwritten in
 3042|       |               tag->name.str, since this points to the binding->uri
 3043|       |               buffer which gets re-used; so we have to add them again
 3044|       |            */
 3045|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3046|       |            /* don't need to check for space - already done in storeAtts() */
 3047|      0|            while (*localPart)
  ------------------
  |  Branch (3047:20): [True: 0, False: 0]
  ------------------
 3048|      0|              *uri++ = *localPart++;
 3049|      0|            prefix = tag->name.prefix;
 3050|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3050:17): [True: 0, False: 0]
  |  Branch (3050:42): [True: 0, False: 0]
  ------------------
 3051|      0|              *uri++ = parser->m_namespaceSeparator;
 3052|      0|              while (*prefix)
  ------------------
  |  Branch (3052:22): [True: 0, False: 0]
  ------------------
 3053|      0|                *uri++ = *prefix++;
 3054|      0|            }
 3055|      0|            *uri = XML_T('\0');
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
 3056|      0|          }
 3057|  16.3k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3058|  16.3k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3058:20): [True: 0, False: 0]
  ------------------
 3059|      0|          reportDefault(parser, enc, s, next);
 3060|  16.3k|        while (tag->bindings) {
  ------------------
  |  Branch (3060:16): [True: 0, False: 16.3k]
  ------------------
 3061|      0|          BINDING *b = tag->bindings;
 3062|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3062:15): [True: 0, False: 0]
  ------------------
 3063|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3064|      0|                                              b->prefix->name);
 3065|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3066|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3067|      0|          parser->m_freeBindingList = b;
 3068|      0|          b->prefix->binding = b->prevPrefixBinding;
 3069|      0|        }
 3070|  16.3k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3070:13): [True: 38, False: 16.2k]
  ------------------
 3071|  16.3k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3071:16): [True: 38, False: 0]
  ------------------
 3072|     38|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3072:15): [True: 0, False: 38]
  ------------------
 3073|      0|            parser->m_processor = epilogProcessor;
 3074|     38|          else
 3075|     38|            return epilogProcessor(parser, next, end, nextPtr);
 3076|     38|        }
 3077|  16.3k|      }
 3078|  16.2k|      break;
 3079|  16.2k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.32k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3079:5): [True: 6.32k, False: 35.0M]
  ------------------
 3080|  6.32k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  6.32k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3081|  6.32k|      if (n < 0)
  ------------------
  |  Branch (3081:11): [True: 216, False: 6.10k]
  ------------------
 3082|    216|        return XML_ERROR_BAD_CHAR_REF;
 3083|  6.10k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3083:11): [True: 0, False: 6.10k]
  ------------------
 3084|      0|        XML_Char buf[XML_ENCODE_MAX];
 3085|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3086|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  163|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3087|  6.10k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3087:18): [True: 0, False: 6.10k]
  ------------------
 3088|      0|        reportDefault(parser, enc, s, next);
 3089|  6.10k|    } break;
 3090|      7|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      7|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3090:5): [True: 7, False: 35.0M]
  ------------------
 3091|      7|      return XML_ERROR_MISPLACED_XML_PI;
 3092|  30.9M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  30.9M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3092:5): [True: 30.9M, False: 4.14M]
  ------------------
 3093|  30.9M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3093:11): [True: 0, False: 30.9M]
  ------------------
 3094|      0|        XML_Char c = 0xA;
 3095|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3096|  30.9M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3096:18): [True: 0, False: 30.9M]
  ------------------
 3097|      0|        reportDefault(parser, enc, s, next);
 3098|  30.9M|      break;
 3099|  39.0k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  39.0k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3099:5): [True: 39.0k, False: 35.0M]
  ------------------
 3100|  39.0k|      enum XML_Error result;
 3101|  39.0k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3101:11): [True: 0, False: 39.0k]
  ------------------
 3102|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3103|       |      /* BEGIN disabled code */
 3104|       |      /* Suppose you doing a transformation on a document that involves
 3105|       |         changing only the character data.  You set up a defaultHandler
 3106|       |         and a characterDataHandler.  The defaultHandler simply copies
 3107|       |         characters through.  The characterDataHandler does the
 3108|       |         transformation and writes the characters out escaping them as
 3109|       |         necessary.  This case will fail to work if we leave out the
 3110|       |         following two lines (because & and < inside CDATA sections will
 3111|       |         be incorrectly escaped).
 3112|       |
 3113|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3114|       |         easier to let the user deal with this.
 3115|       |      */
 3116|  39.0k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3116:16): [Folded - Ignored]
  |  Branch (3116:23): [True: 0, False: 0]
  ------------------
 3117|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3118|      0|                                       0);
 3119|       |      /* END disabled code */
 3120|  39.0k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3120:16): [True: 0, False: 39.0k]
  ------------------
 3121|      0|        reportDefault(parser, enc, s, next);
 3122|  39.0k|      result
 3123|  39.0k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3124|  39.0k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3124:11): [True: 225, False: 38.8k]
  ------------------
 3125|    225|        return result;
 3126|  38.8k|      else if (! next) {
  ------------------
  |  Branch (3126:16): [True: 619, False: 38.2k]
  ------------------
 3127|    619|        parser->m_processor = cdataSectionProcessor;
 3128|    619|        return result;
 3129|    619|      }
 3130|  39.0k|    } break;
 3131|  38.2k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    874|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3131:5): [True: 874, False: 35.0M]
  ------------------
 3132|    874|      if (haveMore) {
  ------------------
  |  Branch (3132:11): [True: 29, False: 845]
  ------------------
 3133|     29|        *nextPtr = s;
 3134|     29|        return XML_ERROR_NONE;
 3135|     29|      }
 3136|    845|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3136:11): [True: 0, False: 845]
  ------------------
 3137|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3138|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3139|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3140|      0|          parser->m_characterDataHandler(
 3141|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3142|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3143|      0|        } else
 3144|      0|          parser->m_characterDataHandler(
 3145|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3146|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3147|    845|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3147:18): [True: 0, False: 845]
  ------------------
 3148|      0|        reportDefault(parser, enc, s, end);
 3149|       |      /* We are at the end of the final buffer, should we check for
 3150|       |         XML_SUSPENDED, XML_FINISHED?
 3151|       |      */
 3152|    845|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3152:11): [True: 0, False: 845]
  ------------------
 3153|      0|        *eventPP = end;
 3154|      0|        return XML_ERROR_NO_ELEMENTS;
 3155|      0|      }
 3156|    845|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3156:11): [True: 18, False: 827]
  ------------------
 3157|     18|        *eventPP = end;
 3158|     18|        return XML_ERROR_ASYNC_ENTITY;
 3159|     18|      }
 3160|    827|      *nextPtr = end;
 3161|    827|      return XML_ERROR_NONE;
 3162|   938k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   938k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3162:5): [True: 938k, False: 34.1M]
  ------------------
 3163|   938k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3164|   938k|      if (charDataHandler) {
  ------------------
  |  Branch (3164:11): [True: 0, False: 938k]
  ------------------
 3165|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3166|      0|          for (;;) {
 3167|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3168|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3169|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3170|      0|            *eventEndPP = s;
 3171|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3172|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3173|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3173:17): [True: 0, False: 0]
  ------------------
 3174|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3174:20): [True: 0, False: 0]
  ------------------
 3175|      0|              break;
 3176|      0|            *eventPP = s;
 3177|      0|          }
 3178|      0|        } else
 3179|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3180|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3181|   938k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3181:18): [True: 0, False: 938k]
  ------------------
 3182|      0|        reportDefault(parser, enc, s, next);
 3183|   938k|    } break;
 3184|  6.29k|    case XML_TOK_PI:
  ------------------
  |  |   76|  6.29k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3184:5): [True: 6.29k, False: 35.0M]
  ------------------
 3185|  6.29k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3185:11): [True: 0, False: 6.29k]
  ------------------
 3186|      0|        return XML_ERROR_NO_MEMORY;
 3187|  6.29k|      break;
 3188|  6.29k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    722|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3188:5): [True: 722, False: 35.0M]
  ------------------
 3189|    722|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3189:11): [True: 0, False: 722]
  ------------------
 3190|      0|        return XML_ERROR_NO_MEMORY;
 3191|    722|      break;
 3192|    722|    default:
  ------------------
  |  Branch (3192:5): [True: 0, False: 35.0M]
  ------------------
 3193|       |      /* All of the tokens produced by XmlContentTok() have their own
 3194|       |       * explicit cases, so this default is not strictly necessary.
 3195|       |       * However it is a useful safety net, so we retain the code and
 3196|       |       * simply exclude it from the coverage tests.
 3197|       |       *
 3198|       |       * LCOV_EXCL_START
 3199|       |       */
 3200|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3200:11): [True: 0, False: 0]
  ------------------
 3201|      0|        reportDefault(parser, enc, s, next);
 3202|      0|      break;
 3203|       |      /* LCOV_EXCL_STOP */
 3204|  35.0M|    }
 3205|  34.9M|    *eventPP = s = next;
 3206|  34.9M|    switch (parser->m_parsingStatus.parsing) {
 3207|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3207:5): [True: 0, False: 34.9M]
  ------------------
 3208|      0|      *nextPtr = next;
 3209|      0|      return XML_ERROR_NONE;
 3210|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3210:5): [True: 0, False: 34.9M]
  ------------------
 3211|      0|      return XML_ERROR_ABORTED;
 3212|  34.9M|    default:;
  ------------------
  |  Branch (3212:5): [True: 34.9M, False: 0]
  ------------------
 3213|  34.9M|    }
 3214|  34.9M|  }
 3215|       |  /* not reached */
 3216|  90.0k|}
xmlparse.c:hashTableIterInit:
 7158|  19.5k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7159|  19.5k|  iter->p = table->v;
 7160|  19.5k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7160:15): [True: 10.2k, False: 9.29k]
  ------------------
 7161|  19.5k|}
xmlparse.c:hashTableIterNext:
 7164|  41.0k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7165|   700k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7165:10): [True: 680k, False: 19.5k]
  ------------------
 7166|   680k|    NAMED *tem = *(iter->p)++;
 7167|   680k|    if (tem)
  ------------------
  |  Branch (7167:9): [True: 21.4k, False: 659k]
  ------------------
 7168|  21.4k|      return tem;
 7169|   680k|  }
 7170|  19.5k|  return NULL;
 7171|  41.0k|}
xmlparse.c:storeAtts:
 3253|  2.95M|          enum XML_Account account) {
 3254|  2.95M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3255|  2.95M|  ELEMENT_TYPE *elementType;
 3256|  2.95M|  int nDefaultAtts;
 3257|  2.95M|  const XML_Char **appAtts; /* the attribute list for the application */
 3258|  2.95M|  int attIndex = 0;
 3259|  2.95M|  int prefixLen;
 3260|  2.95M|  int i;
 3261|  2.95M|  int n;
 3262|  2.95M|  XML_Char *uri;
 3263|  2.95M|  int nPrefixes = 0;
 3264|  2.95M|  BINDING *binding;
 3265|  2.95M|  const XML_Char *localPart;
 3266|       |
 3267|       |  /* lookup the element type name */
 3268|  2.95M|  elementType
 3269|  2.95M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3270|  2.95M|  if (! elementType) {
  ------------------
  |  Branch (3270:7): [True: 14.3k, False: 2.93M]
  ------------------
 3271|  14.3k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3272|  14.3k|    if (! name)
  ------------------
  |  Branch (3272:9): [True: 0, False: 14.3k]
  ------------------
 3273|      0|      return XML_ERROR_NO_MEMORY;
 3274|  14.3k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3275|  14.3k|                                         sizeof(ELEMENT_TYPE));
 3276|  14.3k|    if (! elementType)
  ------------------
  |  Branch (3276:9): [True: 0, False: 14.3k]
  ------------------
 3277|      0|      return XML_ERROR_NO_MEMORY;
 3278|  14.3k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3278:9): [True: 0, False: 14.3k]
  |  Branch (3278:25): [True: 0, False: 0]
  ------------------
 3279|      0|      return XML_ERROR_NO_MEMORY;
 3280|  14.3k|  }
 3281|  2.95M|  nDefaultAtts = elementType->nDefaultAtts;
 3282|       |
 3283|       |  /* get the attributes from the tokenizer */
 3284|  2.95M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.95M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3285|       |
 3286|       |  /* Detect and prevent integer overflow */
 3287|  2.95M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3287:7): [True: 0, False: 2.95M]
  ------------------
 3288|      0|    return XML_ERROR_NO_MEMORY;
 3289|      0|  }
 3290|       |
 3291|  2.95M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3291:7): [True: 391, False: 2.95M]
  ------------------
 3292|    391|    int oldAttsSize = parser->m_attsSize;
 3293|    391|    ATTRIBUTE *temp;
 3294|       |#ifdef XML_ATTR_INFO
 3295|       |    XML_AttrInfo *temp2;
 3296|       |#endif
 3297|       |
 3298|       |    /* Detect and prevent integer overflow */
 3299|    391|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  243|    391|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3299:9): [True: 0, False: 391]
  ------------------
 3300|    391|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  243|    391|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:12): [True: 0, False: 391]
  ------------------
 3301|      0|      return XML_ERROR_NO_MEMORY;
 3302|      0|    }
 3303|       |
 3304|    391|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  243|    391|#define INIT_ATTS_SIZE 16
  ------------------
 3305|       |
 3306|       |    /* Detect and prevent integer overflow.
 3307|       |     * The preprocessor guard addresses the "always false" warning
 3308|       |     * from -Wtype-limits on platforms where
 3309|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3310|       |#if UINT_MAX >= SIZE_MAX
 3311|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3312|       |      parser->m_attsSize = oldAttsSize;
 3313|       |      return XML_ERROR_NO_MEMORY;
 3314|       |    }
 3315|       |#endif
 3316|       |
 3317|    391|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  714|    391|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3318|    391|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3319|    391|    if (temp == NULL) {
  ------------------
  |  Branch (3319:9): [True: 0, False: 391]
  ------------------
 3320|      0|      parser->m_attsSize = oldAttsSize;
 3321|      0|      return XML_ERROR_NO_MEMORY;
 3322|      0|    }
 3323|    391|    parser->m_atts = temp;
 3324|       |#ifdef XML_ATTR_INFO
 3325|       |    /* Detect and prevent integer overflow.
 3326|       |     * The preprocessor guard addresses the "always false" warning
 3327|       |     * from -Wtype-limits on platforms where
 3328|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3329|       |#  if UINT_MAX >= SIZE_MAX
 3330|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3331|       |      parser->m_attsSize = oldAttsSize;
 3332|       |      return XML_ERROR_NO_MEMORY;
 3333|       |    }
 3334|       |#  endif
 3335|       |
 3336|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3337|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3338|       |    if (temp2 == NULL) {
 3339|       |      parser->m_attsSize = oldAttsSize;
 3340|       |      return XML_ERROR_NO_MEMORY;
 3341|       |    }
 3342|       |    parser->m_attInfo = temp2;
 3343|       |#endif
 3344|    391|    if (n > oldAttsSize)
  ------------------
  |  Branch (3344:9): [True: 373, False: 18]
  ------------------
 3345|    373|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    373|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3346|    391|  }
 3347|       |
 3348|  2.95M|  appAtts = (const XML_Char **)parser->m_atts;
 3349|  2.97M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3349:15): [True: 19.6k, False: 2.95M]
  ------------------
 3350|  19.6k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3351|       |#ifdef XML_ATTR_INFO
 3352|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3353|       |#endif
 3354|       |    /* add the name and value to the attribute list */
 3355|  19.6k|    ATTRIBUTE_ID *attId
 3356|  19.6k|        = getAttributeId(parser, enc, currAtt->name,
 3357|  19.6k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  19.6k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3358|  19.6k|    if (! attId)
  ------------------
  |  Branch (3358:9): [True: 0, False: 19.6k]
  ------------------
 3359|      0|      return XML_ERROR_NO_MEMORY;
 3360|       |#ifdef XML_ATTR_INFO
 3361|       |    currAttInfo->nameStart
 3362|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3363|       |    currAttInfo->nameEnd
 3364|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3365|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3366|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3367|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3368|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3369|       |#endif
 3370|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3371|       |       namespace processing is turned on and different prefixes for the same
 3372|       |       namespace are used. For this case we have a check further down.
 3373|       |    */
 3374|  19.6k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3374:9): [True: 447, False: 19.1k]
  ------------------
 3375|    447|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3375:11): [True: 446, False: 1]
  ------------------
 3376|    446|        parser->m_eventPtr = parser->m_atts[i].name;
 3377|    447|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3378|    447|    }
 3379|  19.1k|    (attId->name)[-1] = 1;
 3380|  19.1k|    appAtts[attIndex++] = attId->name;
 3381|  19.1k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3381:9): [True: 10.6k, False: 8.49k]
  ------------------
 3382|  10.6k|      enum XML_Error result;
 3383|  10.6k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  10.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3384|       |
 3385|       |      /* figure out whether declared as other than CDATA */
 3386|  10.6k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3386:11): [True: 1.12k, False: 9.57k]
  ------------------
 3387|  1.12k|        int j;
 3388|  44.9k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3388:21): [True: 44.5k, False: 390]
  ------------------
 3389|  44.5k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3389:15): [True: 734, False: 43.8k]
  ------------------
 3390|    734|            isCdata = elementType->defaultAtts[j].isCdata;
 3391|    734|            break;
 3392|    734|          }
 3393|  44.5k|        }
 3394|  1.12k|      }
 3395|       |
 3396|       |      /* normalize the attribute value */
 3397|  10.6k|      result = storeAttributeValue(
 3398|  10.6k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3399|  10.6k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3400|  10.6k|      if (result)
  ------------------
  |  Branch (3400:11): [True: 220, False: 10.4k]
  ------------------
 3401|    220|        return result;
 3402|  10.4k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|  10.4k|#define poolStart(pool) ((pool)->start)
  ------------------
 3403|  10.4k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  10.4k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3404|  10.4k|    } else {
 3405|       |      /* the value did not need normalizing */
 3406|  8.49k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3407|  8.49k|                                          parser->m_atts[i].valuePtr,
 3408|  8.49k|                                          parser->m_atts[i].valueEnd);
 3409|  8.49k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3409:11): [True: 0, False: 8.49k]
  ------------------
 3410|      0|        return XML_ERROR_NO_MEMORY;
 3411|  8.49k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  8.49k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3412|  8.49k|    }
 3413|       |    /* handle prefixed attribute names */
 3414|  18.9k|    if (attId->prefix) {
  ------------------
  |  Branch (3414:9): [True: 0, False: 18.9k]
  ------------------
 3415|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3415:11): [True: 0, False: 0]
  ------------------
 3416|       |        /* deal with namespace declarations here */
 3417|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3418|      0|                                           appAtts[attIndex], bindingsPtr);
 3419|      0|        if (result)
  ------------------
  |  Branch (3419:13): [True: 0, False: 0]
  ------------------
 3420|      0|          return result;
 3421|      0|        --attIndex;
 3422|      0|      } else {
 3423|       |        /* deal with other prefixed names later */
 3424|      0|        attIndex++;
 3425|      0|        nPrefixes++;
 3426|      0|        (attId->name)[-1] = 2;
 3427|      0|      }
 3428|      0|    } else
 3429|  18.9k|      attIndex++;
 3430|  18.9k|  }
 3431|       |
 3432|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3433|  2.95M|  parser->m_nSpecifiedAtts = attIndex;
 3434|  2.95M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3434:7): [True: 502, False: 2.95M]
  |  Branch (3434:29): [True: 294, False: 208]
  ------------------
 3435|    488|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3435:17): [True: 488, False: 0]
  ------------------
 3436|    488|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3436:11): [True: 294, False: 194]
  ------------------
 3437|    294|        parser->m_idAttIndex = i;
 3438|    294|        break;
 3439|    294|      }
 3440|    294|  } else
 3441|  2.95M|    parser->m_idAttIndex = -1;
 3442|       |
 3443|       |  /* do attribute defaulting */
 3444|  3.02M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3444:15): [True: 67.8k, False: 2.95M]
  ------------------
 3445|  67.8k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3446|  67.8k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3446:9): [True: 66.8k, False: 965]
  |  Branch (3446:33): [True: 1.03k, False: 65.7k]
  ------------------
 3447|  1.03k|      if (da->id->prefix) {
  ------------------
  |  Branch (3447:11): [True: 0, False: 1.03k]
  ------------------
 3448|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3448:13): [True: 0, False: 0]
  ------------------
 3449|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3450|      0|                                             da->value, bindingsPtr);
 3451|      0|          if (result)
  ------------------
  |  Branch (3451:15): [True: 0, False: 0]
  ------------------
 3452|      0|            return result;
 3453|      0|        } else {
 3454|      0|          (da->id->name)[-1] = 2;
 3455|      0|          nPrefixes++;
 3456|      0|          appAtts[attIndex++] = da->id->name;
 3457|      0|          appAtts[attIndex++] = da->value;
 3458|      0|        }
 3459|  1.03k|      } else {
 3460|  1.03k|        (da->id->name)[-1] = 1;
 3461|  1.03k|        appAtts[attIndex++] = da->id->name;
 3462|  1.03k|        appAtts[attIndex++] = da->value;
 3463|  1.03k|      }
 3464|  1.03k|    }
 3465|  67.8k|  }
 3466|  2.95M|  appAtts[attIndex] = 0;
 3467|       |
 3468|       |  /* expand prefixed attribute names, check for duplicates,
 3469|       |     and clear flags that say whether attributes were specified */
 3470|  2.95M|  i = 0;
 3471|  2.95M|  if (nPrefixes) {
  ------------------
  |  Branch (3471:7): [True: 0, False: 2.95M]
  ------------------
 3472|      0|    int j; /* hash table index */
 3473|      0|    unsigned long version = parser->m_nsAttsVersion;
 3474|       |
 3475|       |    /* Detect and prevent invalid shift */
 3476|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3476:9): [True: 0, False: 0]
  ------------------
 3477|      0|      return XML_ERROR_NO_MEMORY;
 3478|      0|    }
 3479|       |
 3480|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3481|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3482|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3483|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3483:9): [True: 0, False: 0]
  ------------------
 3484|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3485|      0|      NS_ATT *temp;
 3486|       |      /* hash table size must also be a power of 2 and >= 8 */
 3487|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3487:14): [True: 0, False: 0]
  ------------------
 3488|      0|        ;
 3489|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3489:11): [True: 0, False: 0]
  ------------------
 3490|      0|        parser->m_nsAttsPower = 3;
 3491|       |
 3492|       |      /* Detect and prevent invalid shift */
 3493|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3493:11): [True: 0, False: 0]
  ------------------
 3494|       |        /* Restore actual size of memory in m_nsAtts */
 3495|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3496|      0|        return XML_ERROR_NO_MEMORY;
 3497|      0|      }
 3498|       |
 3499|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3500|       |
 3501|       |      /* Detect and prevent integer overflow.
 3502|       |       * The preprocessor guard addresses the "always false" warning
 3503|       |       * from -Wtype-limits on platforms where
 3504|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3505|       |#if UINT_MAX >= SIZE_MAX
 3506|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3507|       |        /* Restore actual size of memory in m_nsAtts */
 3508|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3509|       |        return XML_ERROR_NO_MEMORY;
 3510|       |      }
 3511|       |#endif
 3512|       |
 3513|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3514|      0|                               nsAttsSize * sizeof(NS_ATT));
 3515|      0|      if (! temp) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 0]
  ------------------
 3516|       |        /* Restore actual size of memory in m_nsAtts */
 3517|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3518|      0|        return XML_ERROR_NO_MEMORY;
 3519|      0|      }
 3520|      0|      parser->m_nsAtts = temp;
 3521|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3522|      0|    }
 3523|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3524|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3524:9): [True: 0, False: 0]
  ------------------
 3525|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  244|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3526|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3526:28): [True: 0, False: 0]
  ------------------
 3527|      0|        parser->m_nsAtts[--j].version = version;
 3528|      0|    }
 3529|      0|    parser->m_nsAttsVersion = --version;
 3530|       |
 3531|       |    /* expand prefixed names and check for duplicates */
 3532|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3532:12): [True: 0, False: 0]
  ------------------
 3533|      0|      const XML_Char *s = appAtts[i];
 3534|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3534:11): [True: 0, False: 0]
  ------------------
 3535|      0|        ATTRIBUTE_ID *id;
 3536|      0|        const BINDING *b;
 3537|      0|        unsigned long uriHash;
 3538|      0|        struct siphash sip_state;
 3539|      0|        struct sipkey sip_key;
 3540|       |
 3541|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3542|      0|        sip24_init(&sip_state, &sip_key);
 3543|       |
 3544|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3545|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3546|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3546:13): [True: 0, False: 0]
  |  Branch (3546:21): [True: 0, False: 0]
  ------------------
 3547|       |          /* This code is walking through the appAtts array, dealing
 3548|       |           * with (in this case) a prefixed attribute name.  To be in
 3549|       |           * the array, the attribute must have already been bound, so
 3550|       |           * has to have passed through the hash table lookup once
 3551|       |           * already.  That implies that an entry for it already
 3552|       |           * exists, so the lookup above will return a pointer to
 3553|       |           * already allocated memory.  There is no opportunaity for
 3554|       |           * the allocator to fail, so the condition above cannot be
 3555|       |           * fulfilled.
 3556|       |           *
 3557|       |           * Since it is difficult to be certain that the above
 3558|       |           * analysis is complete, we retain the test and merely
 3559|       |           * remove the code from coverage tests.
 3560|       |           */
 3561|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3562|      0|        }
 3563|      0|        b = id->prefix->binding;
 3564|      0|        if (! b)
  ------------------
  |  Branch (3564:13): [True: 0, False: 0]
  ------------------
 3565|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3566|       |
 3567|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3567:21): [True: 0, False: 0]
  ------------------
 3568|      0|          const XML_Char c = b->uri[j];
 3569|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3569:15): [True: 0, False: 0]
  ------------------
 3570|      0|            return XML_ERROR_NO_MEMORY;
 3571|      0|        }
 3572|       |
 3573|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3574|       |
 3575|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3575:16): [True: 0, False: 0]
  ------------------
 3576|      0|          ;
 3577|       |
 3578|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3579|       |
 3580|      0|        do { /* copies null terminator */
 3581|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3581:15): [True: 0, False: 0]
  ------------------
 3582|      0|            return XML_ERROR_NO_MEMORY;
 3583|      0|        } while (*s++);
  ------------------
  |  Branch (3583:18): [True: 0, False: 0]
  ------------------
 3584|       |
 3585|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3586|       |
 3587|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3588|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3589|       |          */
 3590|      0|          unsigned char step = 0;
 3591|      0|          unsigned long mask = nsAttsSize - 1;
 3592|      0|          j = uriHash & mask; /* index into hash table */
 3593|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3593:18): [True: 0, False: 0]
  ------------------
 3594|       |            /* for speed we compare stored hash values first */
 3595|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3595:17): [True: 0, False: 0]
  ------------------
 3596|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3597|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3598|       |              /* s1 is null terminated, but not s2 */
 3599|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3599:22): [True: 0, False: 0]
  |  Branch (3599:36): [True: 0, False: 0]
  ------------------
 3600|      0|                ;
 3601|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3601:19): [True: 0, False: 0]
  ------------------
 3602|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3603|      0|            }
 3604|      0|            if (! step)
  ------------------
  |  Branch (3604:17): [True: 0, False: 0]
  ------------------
 3605|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  234|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3606|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3606:13): [True: 0, False: 0]
  ------------------
 3607|      0|          }
 3608|      0|        }
 3609|       |
 3610|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3610:13): [True: 0, False: 0]
  ------------------
 3611|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3612|      0|          s = b->prefix->name;
 3613|      0|          do {
 3614|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3614:17): [True: 0, False: 0]
  ------------------
 3615|      0|              return XML_ERROR_NO_MEMORY;
 3616|      0|          } while (*s++);
  ------------------
  |  Branch (3616:20): [True: 0, False: 0]
  ------------------
 3617|      0|        }
 3618|       |
 3619|       |        /* store expanded name in attribute list */
 3620|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3621|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3622|      0|        appAtts[i] = s;
 3623|       |
 3624|       |        /* fill empty slot with new version, uriName and hash value */
 3625|      0|        parser->m_nsAtts[j].version = version;
 3626|      0|        parser->m_nsAtts[j].hash = uriHash;
 3627|      0|        parser->m_nsAtts[j].uriName = s;
 3628|       |
 3629|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3629:13): [True: 0, False: 0]
  ------------------
 3630|      0|          i += 2;
 3631|      0|          break;
 3632|      0|        }
 3633|      0|      } else                     /* not prefixed */
 3634|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3635|      0|    }
 3636|      0|  }
 3637|       |  /* clear flags for the remaining attributes */
 3638|  2.97M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3638:10): [True: 18.9k, False: 2.95M]
  ------------------
 3639|  18.9k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3640|  2.95M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3640:32): [True: 0, False: 2.95M]
  ------------------
 3641|      0|    binding->attId->name[-1] = 0;
 3642|       |
 3643|  2.95M|  if (! parser->m_ns)
  ------------------
  |  Branch (3643:7): [True: 2.95M, False: 0]
  ------------------
 3644|  2.95M|    return XML_ERROR_NONE;
 3645|       |
 3646|       |  /* expand the element type name */
 3647|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3647:7): [True: 0, False: 0]
  ------------------
 3648|      0|    binding = elementType->prefix->binding;
 3649|      0|    if (! binding)
  ------------------
  |  Branch (3649:9): [True: 0, False: 0]
  ------------------
 3650|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3651|      0|    localPart = tagNamePtr->str;
 3652|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3652:12): [True: 0, False: 0]
  ------------------
 3653|      0|      ;
 3654|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3654:14): [True: 0, False: 0]
  ------------------
 3655|      0|    binding = dtd->defaultPrefix.binding;
 3656|      0|    localPart = tagNamePtr->str;
 3657|      0|  } else
 3658|      0|    return XML_ERROR_NONE;
 3659|      0|  prefixLen = 0;
 3660|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3660:7): [True: 0, False: 0]
  |  Branch (3660:32): [True: 0, False: 0]
  ------------------
 3661|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3661:12): [True: 0, False: 0]
  ------------------
 3662|      0|      ; /* prefixLen includes null terminator */
 3663|      0|  }
 3664|      0|  tagNamePtr->localPart = localPart;
 3665|      0|  tagNamePtr->uriLen = binding->uriLen;
 3666|      0|  tagNamePtr->prefix = binding->prefix->name;
 3667|      0|  tagNamePtr->prefixLen = prefixLen;
 3668|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3668:15): [True: 0, False: 0]
  ------------------
 3669|      0|    ; /* i includes null terminator */
 3670|       |
 3671|       |  /* Detect and prevent integer overflow */
 3672|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3672:7): [True: 0, False: 0]
  ------------------
 3673|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3673:10): [True: 0, False: 0]
  ------------------
 3674|      0|    return XML_ERROR_NO_MEMORY;
 3675|      0|  }
 3676|       |
 3677|      0|  n = i + binding->uriLen + prefixLen;
 3678|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3678:7): [True: 0, False: 0]
  ------------------
 3679|      0|    TAG *p;
 3680|       |
 3681|       |    /* Detect and prevent integer overflow */
 3682|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3682:9): [True: 0, False: 0]
  ------------------
 3683|      0|      return XML_ERROR_NO_MEMORY;
 3684|      0|    }
 3685|       |    /* Detect and prevent integer overflow.
 3686|       |     * The preprocessor guard addresses the "always false" warning
 3687|       |     * from -Wtype-limits on platforms where
 3688|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3689|       |#if UINT_MAX >= SIZE_MAX
 3690|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3691|       |      return XML_ERROR_NO_MEMORY;
 3692|       |    }
 3693|       |#endif
 3694|       |
 3695|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3696|      0|    if (! uri)
  ------------------
  |  Branch (3696:9): [True: 0, False: 0]
  ------------------
 3697|      0|      return XML_ERROR_NO_MEMORY;
 3698|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
 3699|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3700|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3700:34): [True: 0, False: 0]
  ------------------
 3701|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3701:11): [True: 0, False: 0]
  ------------------
 3702|      0|        p->name.str = uri;
 3703|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3704|      0|    binding->uri = uri;
 3705|      0|  }
 3706|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3707|      0|  uri = binding->uri + binding->uriLen;
 3708|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3709|       |  /* we always have a namespace separator between localPart and prefix */
 3710|      0|  if (prefixLen) {
  ------------------
  |  Branch (3710:7): [True: 0, False: 0]
  ------------------
 3711|      0|    uri += i - 1;
 3712|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3713|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3714|      0|  }
 3715|      0|  tagNamePtr->str = binding->uri;
 3716|      0|  return XML_ERROR_NONE;
 3717|      0|}
xmlparse.c:setElementTypePrefix:
 6446|  7.09k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6447|  7.09k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6448|  7.09k|  const XML_Char *name;
 6449|  96.3k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6449:34): [True: 93.3k, False: 2.99k]
  ------------------
 6450|  93.3k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|  93.3k|#  define XML_T(x) x
  ------------------
  |  Branch (6450:9): [True: 4.10k, False: 89.2k]
  ------------------
 6451|  4.10k|      PREFIX *prefix;
 6452|  4.10k|      const XML_Char *s;
 6453|  74.4k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6453:35): [True: 70.3k, False: 4.10k]
  ------------------
 6454|  70.3k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  602|  70.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 112, False: 70.2k]
  |  |  |  Branch (602:35): [True: 0, False: 112]
  |  |  ------------------
  |  |  603|  70.3k|       ? 0                                                                     \
  |  |  604|  70.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6454:13): [True: 0, False: 70.3k]
  ------------------
 6455|      0|          return 0;
 6456|  70.3k|      }
 6457|  4.10k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  4.10k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 11, False: 4.09k]
  |  |  |  Branch (602:35): [True: 0, False: 11]
  |  |  ------------------
  |  |  603|  4.10k|       ? 0                                                                     \
  |  |  604|  4.10k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6457:11): [True: 0, False: 4.10k]
  ------------------
 6458|      0|        return 0;
 6459|  4.10k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  595|  4.10k|#define poolStart(pool) ((pool)->start)
  ------------------
 6460|  4.10k|                                sizeof(PREFIX));
 6461|  4.10k|      if (! prefix)
  ------------------
  |  Branch (6461:11): [True: 0, False: 4.10k]
  ------------------
 6462|      0|        return 0;
 6463|  4.10k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|  4.10k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6463:11): [True: 3.51k, False: 595]
  ------------------
 6464|  3.51k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.51k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6465|    595|      else
 6466|    595|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    595|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6467|  4.10k|      elementType->prefix = prefix;
 6468|  4.10k|      break;
 6469|  4.10k|    }
 6470|  93.3k|  }
 6471|  7.09k|  return 1;
 6472|  7.09k|}
xmlparse.c:freeBindings:
 3223|  9.41k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3224|  9.41k|  while (bindings) {
  ------------------
  |  Branch (3224:10): [True: 0, False: 9.41k]
  ------------------
 3225|      0|    BINDING *b = bindings;
 3226|       |
 3227|       |    /* m_startNamespaceDeclHandler will have been called for this
 3228|       |     * binding in addBindings(), so call the end handler now.
 3229|       |     */
 3230|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3230:9): [True: 0, False: 0]
  ------------------
 3231|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3232|       |
 3233|      0|    bindings = bindings->nextTagBinding;
 3234|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3235|      0|    parser->m_freeBindingList = b;
 3236|      0|    b->prefix->binding = b->prevPrefixBinding;
 3237|      0|  }
 3238|  9.41k|}
xmlparse.c:epilogProcessor:
 5646|    150|                const char **nextPtr) {
 5647|    150|  parser->m_processor = epilogProcessor;
 5648|    150|  parser->m_eventPtr = s;
 5649|  1.31k|  for (;;) {
 5650|  1.31k|    const char *next = NULL;
 5651|  1.31k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.31k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.31k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5652|  1.31k|#ifdef XML_DTD
 5653|  1.31k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5653:9): [True: 0, False: 1.31k]
  ------------------
 5654|  1.31k|                                  XML_ACCOUNT_DIRECT)) {
 5655|      0|      accountingOnAbort(parser);
 5656|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5657|      0|    }
 5658|  1.31k|#endif
 5659|  1.31k|    parser->m_eventEndPtr = next;
 5660|  1.31k|    switch (tok) {
 5661|       |    /* report partial linebreak - it might be the last token */
 5662|      3|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      3|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5662:5): [True: 3, False: 1.31k]
  ------------------
 5663|      3|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5663:11): [True: 0, False: 3]
  ------------------
 5664|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5665|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5665:13): [True: 0, False: 0]
  ------------------
 5666|      0|          return XML_ERROR_ABORTED;
 5667|      0|      }
 5668|      3|      *nextPtr = next;
 5669|      3|      return XML_ERROR_NONE;
 5670|     68|    case XML_TOK_NONE:
  ------------------
  |  |   51|     68|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5670:5): [True: 68, False: 1.25k]
  ------------------
 5671|     68|      *nextPtr = s;
 5672|     68|      return XML_ERROR_NONE;
 5673|    527|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    527|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5673:5): [True: 527, False: 792]
  ------------------
 5674|    527|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5674:11): [True: 0, False: 527]
  ------------------
 5675|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5676|    527|      break;
 5677|    318|    case XML_TOK_PI:
  ------------------
  |  |   76|    318|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5677:5): [True: 318, False: 1.00k]
  ------------------
 5678|    318|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5678:11): [True: 0, False: 318]
  ------------------
 5679|      0|        return XML_ERROR_NO_MEMORY;
 5680|    318|      break;
 5681|    324|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    324|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5681:5): [True: 324, False: 995]
  ------------------
 5682|    324|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5682:11): [True: 0, False: 324]
  ------------------
 5683|      0|        return XML_ERROR_NO_MEMORY;
 5684|    324|      break;
 5685|    324|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5685:5): [True: 20, False: 1.29k]
  ------------------
 5686|     20|      parser->m_eventPtr = next;
 5687|     20|      return XML_ERROR_INVALID_TOKEN;
 5688|      3|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5688:5): [True: 3, False: 1.31k]
  ------------------
 5689|      3|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5689:11): [True: 3, False: 0]
  ------------------
 5690|      3|        *nextPtr = s;
 5691|      3|        return XML_ERROR_NONE;
 5692|      3|      }
 5693|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5694|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5694:5): [True: 1, False: 1.31k]
  ------------------
 5695|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5695:11): [True: 1, False: 0]
  ------------------
 5696|      1|        *nextPtr = s;
 5697|      1|        return XML_ERROR_NONE;
 5698|      1|      }
 5699|      0|      return XML_ERROR_PARTIAL_CHAR;
 5700|     55|    default:
  ------------------
  |  Branch (5700:5): [True: 55, False: 1.26k]
  ------------------
 5701|     55|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5702|  1.31k|    }
 5703|  1.16k|    parser->m_eventPtr = s = next;
 5704|  1.16k|    switch (parser->m_parsingStatus.parsing) {
 5705|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5705:5): [True: 0, False: 1.16k]
  ------------------
 5706|      0|      *nextPtr = next;
 5707|      0|      return XML_ERROR_NONE;
 5708|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5708:5): [True: 0, False: 1.16k]
  ------------------
 5709|      0|      return XML_ERROR_ABORTED;
 5710|  1.16k|    default:;
  ------------------
  |  Branch (5710:5): [True: 1.16k, False: 0]
  ------------------
 5711|  1.16k|    }
 5712|  1.16k|  }
 5713|    150|}
xmlparse.c:doCdataSection:
 4026|  39.0k|               enum XML_Account account) {
 4027|  39.0k|  const char *s = *startPtr;
 4028|  39.0k|  const char **eventPP;
 4029|  39.0k|  const char **eventEndPP;
 4030|  39.0k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4030:7): [True: 1.54k, False: 37.5k]
  ------------------
 4031|  1.54k|    eventPP = &parser->m_eventPtr;
 4032|  1.54k|    *eventPP = s;
 4033|  1.54k|    eventEndPP = &parser->m_eventEndPtr;
 4034|  37.5k|  } else {
 4035|  37.5k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4036|  37.5k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4037|  37.5k|  }
 4038|  39.0k|  *eventPP = s;
 4039|  39.0k|  *startPtr = NULL;
 4040|       |
 4041|  1.86M|  for (;;) {
 4042|  1.86M|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4043|  1.86M|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|  1.86M|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.86M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4044|  1.86M|#ifdef XML_DTD
 4045|  1.86M|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4045:9): [True: 1, False: 1.86M]
  ------------------
 4046|      1|      accountingOnAbort(parser);
 4047|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4048|      1|    }
 4049|       |#else
 4050|       |    UNUSED_P(account);
 4051|       |#endif
 4052|  1.86M|    *eventEndPP = next;
 4053|  1.86M|    switch (tok) {
 4054|  38.2k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  38.2k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4054:5): [True: 38.2k, False: 1.82M]
  ------------------
 4055|  38.2k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4055:11): [True: 0, False: 38.2k]
  ------------------
 4056|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4057|       |      /* BEGIN disabled code */
 4058|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4059|  38.2k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4059:16): [Folded - Ignored]
  |  Branch (4059:23): [True: 0, False: 0]
  ------------------
 4060|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4061|      0|                                       0);
 4062|       |      /* END disabled code */
 4063|  38.2k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4063:16): [True: 0, False: 38.2k]
  ------------------
 4064|      0|        reportDefault(parser, enc, s, next);
 4065|  38.2k|      *startPtr = next;
 4066|  38.2k|      *nextPtr = next;
 4067|  38.2k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4067:11): [True: 0, False: 38.2k]
  ------------------
 4068|      0|        return XML_ERROR_ABORTED;
 4069|  38.2k|      else
 4070|  38.2k|        return XML_ERROR_NONE;
 4071|  57.2k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  57.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4071:5): [True: 57.2k, False: 1.80M]
  ------------------
 4072|  57.2k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4072:11): [True: 0, False: 57.2k]
  ------------------
 4073|      0|        XML_Char c = 0xA;
 4074|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4075|  57.2k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4075:18): [True: 0, False: 57.2k]
  ------------------
 4076|      0|        reportDefault(parser, enc, s, next);
 4077|  57.2k|      break;
 4078|  1.76M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  1.76M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4078:5): [True: 1.76M, False: 96.3k]
  ------------------
 4079|  1.76M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4080|  1.76M|      if (charDataHandler) {
  ------------------
  |  Branch (4080:11): [True: 0, False: 1.76M]
  ------------------
 4081|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4082|      0|          for (;;) {
 4083|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4084|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4085|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4086|      0|            *eventEndPP = next;
 4087|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4088|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4089|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4089:17): [True: 0, False: 0]
  ------------------
 4090|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4090:20): [True: 0, False: 0]
  ------------------
 4091|      0|              break;
 4092|      0|            *eventPP = s;
 4093|      0|          }
 4094|      0|        } else
 4095|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4096|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4097|  1.76M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4097:18): [True: 0, False: 1.76M]
  ------------------
 4098|      0|        reportDefault(parser, enc, s, next);
 4099|  1.76M|    } break;
 4100|    164|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    164|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4100:5): [True: 164, False: 1.86M]
  ------------------
 4101|    164|      *eventPP = next;
 4102|    164|      return XML_ERROR_INVALID_TOKEN;
 4103|    138|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    138|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4103:5): [True: 138, False: 1.86M]
  ------------------
 4104|    138|      if (haveMore) {
  ------------------
  |  Branch (4104:11): [True: 138, False: 0]
  ------------------
 4105|    138|        *nextPtr = s;
 4106|    138|        return XML_ERROR_NONE;
 4107|    138|      }
 4108|      0|      return XML_ERROR_PARTIAL_CHAR;
 4109|     92|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4109:5): [True: 92, False: 1.86M]
  ------------------
 4110|    541|    case XML_TOK_NONE:
  ------------------
  |  |   51|    541|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4110:5): [True: 449, False: 1.86M]
  ------------------
 4111|    541|      if (haveMore) {
  ------------------
  |  Branch (4111:11): [True: 481, False: 60]
  ------------------
 4112|    481|        *nextPtr = s;
 4113|    481|        return XML_ERROR_NONE;
 4114|    481|      }
 4115|     60|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4116|      0|    default:
  ------------------
  |  Branch (4116:5): [True: 0, False: 1.86M]
  ------------------
 4117|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4118|       |       * explicit case, so this default case will never be executed.
 4119|       |       * We retain it as a safety net and exclude it from the coverage
 4120|       |       * statistics.
 4121|       |       *
 4122|       |       * LCOV_EXCL_START
 4123|       |       */
 4124|      0|      *eventPP = next;
 4125|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4126|       |      /* LCOV_EXCL_STOP */
 4127|  1.86M|    }
 4128|       |
 4129|  1.82M|    *eventPP = s = next;
 4130|  1.82M|    switch (parser->m_parsingStatus.parsing) {
 4131|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4131:5): [True: 0, False: 1.82M]
  ------------------
 4132|      0|      *nextPtr = next;
 4133|      0|      return XML_ERROR_NONE;
 4134|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4134:5): [True: 0, False: 1.82M]
  ------------------
 4135|      0|      return XML_ERROR_ABORTED;
 4136|  1.82M|    default:;
  ------------------
  |  Branch (4136:5): [True: 1.82M, False: 0]
  ------------------
 4137|  1.82M|    }
 4138|  1.82M|  }
 4139|       |  /* not reached */
 4140|  39.0k|}
xmlparse.c:storeRawNames:
 2571|  7.06k|storeRawNames(XML_Parser parser) {
 2572|  7.06k|  TAG *tag = parser->m_tagStack;
 2573|  40.2k|  while (tag) {
  ------------------
  |  Branch (2573:10): [True: 33.1k, False: 7.06k]
  ------------------
 2574|  33.1k|    int bufSize;
 2575|  33.1k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2576|  33.1k|    size_t rawNameLen;
 2577|  33.1k|    char *rawNameBuf = tag->buf + nameLen;
 2578|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2579|       |       at the first entry that has already been copied; everything
 2580|       |       below it in the stack is already been accounted for in a
 2581|       |       previous call to this function.
 2582|       |    */
 2583|  33.1k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2583:9): [True: 0, False: 33.1k]
  ------------------
 2584|      0|      break;
 2585|       |    /* For re-use purposes we need to ensure that the
 2586|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2587|       |    */
 2588|  33.1k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  196|  33.1k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2589|       |    /* Detect and prevent integer overflow. */
 2590|  33.1k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2590:9): [True: 0, False: 33.1k]
  ------------------
 2591|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2592|  33.1k|    bufSize = nameLen + (int)rawNameLen;
 2593|  33.1k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2593:9): [True: 469, False: 32.6k]
  ------------------
 2594|    469|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|    469|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2595|    469|      if (temp == NULL)
  ------------------
  |  Branch (2595:11): [True: 0, False: 469]
  ------------------
 2596|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2597|       |      /* if tag->name.str points to tag->buf (only when namespace
 2598|       |         processing is off) then we have to update it
 2599|       |      */
 2600|    469|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2600:11): [True: 469, False: 0]
  ------------------
 2601|    469|        tag->name.str = (XML_Char *)temp;
 2602|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2603|       |         then update it as well, since it will always point into tag->buf
 2604|       |      */
 2605|    469|      if (tag->name.localPart)
  ------------------
  |  Branch (2605:11): [True: 0, False: 469]
  ------------------
 2606|      0|        tag->name.localPart
 2607|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2608|    469|      tag->buf = temp;
 2609|    469|      tag->bufEnd = temp + bufSize;
 2610|    469|      rawNameBuf = temp + nameLen;
 2611|    469|    }
 2612|  33.1k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2613|  33.1k|    tag->rawName = rawNameBuf;
 2614|  33.1k|    tag = tag->parent;
 2615|  33.1k|  }
 2616|  7.06k|  return XML_TRUE;
  ------------------
  |  |   55|  7.06k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2617|  7.06k|}
xmlparse.c:getElementType:
 7614|  8.95k|               const char *end) {
 7615|  8.95k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7616|  8.95k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7617|  8.95k|  ELEMENT_TYPE *ret;
 7618|       |
 7619|  8.95k|  if (! name)
  ------------------
  |  Branch (7619:7): [True: 0, False: 8.95k]
  ------------------
 7620|      0|    return NULL;
 7621|  8.95k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7622|  8.95k|                               sizeof(ELEMENT_TYPE));
 7623|  8.95k|  if (! ret)
  ------------------
  |  Branch (7623:7): [True: 0, False: 8.95k]
  ------------------
 7624|      0|    return NULL;
 7625|  8.95k|  if (ret->name != name)
  ------------------
  |  Branch (7625:7): [True: 1.85k, False: 7.09k]
  ------------------
 7626|  1.85k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  1.85k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7627|  7.09k|  else {
 7628|  7.09k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.09k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7629|  7.09k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7629:9): [True: 0, False: 7.09k]
  ------------------
 7630|      0|      return NULL;
 7631|  7.09k|  }
 7632|  8.95k|  return ret;
 7633|  8.95k|}
xmlparse.c:getAttributeId:
 6476|  53.4k|               const char *end) {
 6477|  53.4k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6478|  53.4k|  ATTRIBUTE_ID *id;
 6479|  53.4k|  const XML_Char *name;
 6480|  53.4k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  53.4k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 261, False: 53.1k]
  |  |  |  Branch (602:35): [True: 0, False: 261]
  |  |  ------------------
  |  |  603|  53.4k|       ? 0                                                                     \
  |  |  604|  53.4k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6480:7): [True: 0, False: 53.4k]
  ------------------
 6481|      0|    return NULL;
 6482|  53.4k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6483|  53.4k|  if (! name)
  ------------------
  |  Branch (6483:7): [True: 0, False: 53.4k]
  ------------------
 6484|      0|    return NULL;
 6485|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6486|  53.4k|  ++name;
 6487|  53.4k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6488|  53.4k|                              sizeof(ATTRIBUTE_ID));
 6489|  53.4k|  if (! id)
  ------------------
  |  Branch (6489:7): [True: 0, False: 53.4k]
  ------------------
 6490|      0|    return NULL;
 6491|  53.4k|  if (id->name != name)
  ------------------
  |  Branch (6491:7): [True: 45.9k, False: 7.42k]
  ------------------
 6492|  45.9k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  45.9k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6493|  7.42k|  else {
 6494|  7.42k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.42k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6495|  7.42k|    if (! parser->m_ns)
  ------------------
  |  Branch (6495:9): [True: 7.42k, False: 0]
  ------------------
 6496|  7.42k|      ;
 6497|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6497:14): [True: 0, False: 0]
  |  Branch (6497:43): [True: 0, False: 0]
  ------------------
 6498|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:17): [True: 0, False: 0]
  |  Branch (6498:46): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  ------------------
 6500|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:18): [True: 0, False: 0]
  |  Branch (6500:44): [True: 0, False: 0]
  ------------------
 6501|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:11): [True: 0, False: 0]
  ------------------
 6502|      0|        id->prefix = &dtd->defaultPrefix;
 6503|      0|      else
 6504|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6505|      0|                                      sizeof(PREFIX));
 6506|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6507|      0|    } else {
 6508|      0|      int i;
 6509|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6509:19): [True: 0, False: 0]
  ------------------
 6510|       |        /* attributes without prefix are *not* in the default namespace */
 6511|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6511:13): [True: 0, False: 0]
  ------------------
 6512|      0|          int j;
 6513|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6513:23): [True: 0, False: 0]
  ------------------
 6514|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6514:17): [True: 0, False: 0]
  ------------------
 6515|      0|              return NULL;
 6516|      0|          }
 6517|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6517:15): [True: 0, False: 0]
  ------------------
 6518|      0|            return NULL;
 6519|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6520|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6521|      0|          if (! id->prefix)
  ------------------
  |  Branch (6521:15): [True: 0, False: 0]
  ------------------
 6522|      0|            return NULL;
 6523|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6523:15): [True: 0, False: 0]
  ------------------
 6524|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6525|      0|          else
 6526|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6527|      0|          break;
 6528|      0|        }
 6529|      0|      }
 6530|      0|    }
 6531|  7.42k|  }
 6532|  53.4k|  return id;
 6533|  53.4k|}
xmlparse.c:poolAppend:
 7220|  4.36M|           const char *end) {
 7221|  4.36M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7221:7): [True: 19.3k, False: 4.34M]
  |  Branch (7221:22): [True: 0, False: 19.3k]
  ------------------
 7222|      0|    return NULL;
 7223|  4.37M|  for (;;) {
 7224|  4.37M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|  4.37M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  4.37M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7225|  4.37M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7226|  4.37M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7226:9): [True: 4.36M, False: 10.8k]
  ------------------
 7227|  4.37M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7227:12): [True: 0, False: 10.8k]
  ------------------
 7228|  4.36M|      break;
 7229|  10.8k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7229:9): [True: 0, False: 10.8k]
  ------------------
 7230|      0|      return NULL;
 7231|  10.8k|  }
 7232|  4.36M|  return pool->start;
 7233|  4.36M|}
xmlparse.c:defineAttribute:
 6386|  32.6k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6387|  32.6k|  DEFAULT_ATTRIBUTE *att;
 6388|  32.6k|  if (value || isId) {
  ------------------
  |  Branch (6388:7): [True: 8.51k, False: 24.1k]
  |  Branch (6388:16): [True: 1.21k, False: 22.9k]
  ------------------
 6389|       |    /* The handling of default attributes gets messed up if we have
 6390|       |       a default which duplicates a non-default. */
 6391|  9.72k|    int i;
 6392|  55.5k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6392:17): [True: 53.1k, False: 2.41k]
  ------------------
 6393|  53.1k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6393:11): [True: 7.31k, False: 45.8k]
  ------------------
 6394|  7.31k|        return 1;
 6395|  2.41k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6395:9): [True: 672, False: 1.74k]
  |  Branch (6395:17): [True: 171, False: 501]
  |  Branch (6395:34): [True: 171, False: 0]
  ------------------
 6396|    171|      type->idAtt = attId;
 6397|  2.41k|  }
 6398|  25.3k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6398:7): [True: 996, False: 24.3k]
  ------------------
 6399|    996|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6399:9): [True: 760, False: 236]
  ------------------
 6400|    760|      type->allocDefaultAtts = 8;
 6401|    760|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  713|    760|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6402|    760|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6403|    760|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6403:11): [True: 0, False: 760]
  ------------------
 6404|      0|        type->allocDefaultAtts = 0;
 6405|      0|        return 0;
 6406|      0|      }
 6407|    760|    } else {
 6408|    236|      DEFAULT_ATTRIBUTE *temp;
 6409|       |
 6410|       |      /* Detect and prevent integer overflow */
 6411|    236|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6411:11): [True: 0, False: 236]
  ------------------
 6412|      0|        return 0;
 6413|      0|      }
 6414|       |
 6415|    236|      int count = type->allocDefaultAtts * 2;
 6416|       |
 6417|       |      /* Detect and prevent integer overflow.
 6418|       |       * The preprocessor guard addresses the "always false" warning
 6419|       |       * from -Wtype-limits on platforms where
 6420|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6421|       |#if UINT_MAX >= SIZE_MAX
 6422|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6423|       |        return 0;
 6424|       |      }
 6425|       |#endif
 6426|       |
 6427|    236|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  714|    236|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6428|    236|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6429|    236|      if (temp == NULL)
  ------------------
  |  Branch (6429:11): [True: 0, False: 236]
  ------------------
 6430|      0|        return 0;
 6431|    236|      type->allocDefaultAtts = count;
 6432|    236|      type->defaultAtts = temp;
 6433|    236|    }
 6434|    996|  }
 6435|  25.3k|  att = type->defaultAtts + type->nDefaultAtts;
 6436|  25.3k|  att->id = attId;
 6437|  25.3k|  att->value = value;
 6438|  25.3k|  att->isCdata = isCdata;
 6439|  25.3k|  if (! isCdata)
  ------------------
  |  Branch (6439:7): [True: 25.2k, False: 117]
  ------------------
 6440|  25.2k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  25.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6441|  25.3k|  type->nDefaultAtts += 1;
 6442|  25.3k|  return 1;
 6443|  25.3k|}
xmlparse.c:poolGrow:
 7321|  45.4k|poolGrow(STRING_POOL *pool) {
 7322|  45.4k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7322:7): [True: 18.3k, False: 27.1k]
  ------------------
 7323|  18.3k|    if (pool->start == 0) {
  ------------------
  |  Branch (7323:9): [True: 14.7k, False: 3.62k]
  ------------------
 7324|  14.7k|      pool->blocks = pool->freeBlocks;
 7325|  14.7k|      pool->freeBlocks = pool->freeBlocks->next;
 7326|  14.7k|      pool->blocks->next = NULL;
 7327|  14.7k|      pool->start = pool->blocks->s;
 7328|  14.7k|      pool->end = pool->start + pool->blocks->size;
 7329|  14.7k|      pool->ptr = pool->start;
 7330|  14.7k|      return XML_TRUE;
  ------------------
  |  |   55|  14.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7331|  14.7k|    }
 7332|  3.62k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7332:9): [True: 3.34k, False: 282]
  ------------------
 7333|  3.34k|      BLOCK *tem = pool->freeBlocks->next;
 7334|  3.34k|      pool->freeBlocks->next = pool->blocks;
 7335|  3.34k|      pool->blocks = pool->freeBlocks;
 7336|  3.34k|      pool->freeBlocks = tem;
 7337|  3.34k|      memcpy(pool->blocks->s, pool->start,
 7338|  3.34k|             (pool->end - pool->start) * sizeof(XML_Char));
 7339|  3.34k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7340|  3.34k|      pool->start = pool->blocks->s;
 7341|  3.34k|      pool->end = pool->start + pool->blocks->size;
 7342|  3.34k|      return XML_TRUE;
  ------------------
  |  |   55|  3.34k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7343|  3.34k|    }
 7344|  3.62k|  }
 7345|  27.3k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7345:7): [True: 10.0k, False: 17.3k]
  |  Branch (7345:23): [True: 7.97k, False: 2.06k]
  ------------------
 7346|  7.97k|    BLOCK *temp;
 7347|  7.97k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7348|  7.97k|    size_t bytesToAllocate;
 7349|       |
 7350|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7351|       |             to avoid dangling pointers: */
 7352|  7.97k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7353|       |
 7354|  7.97k|    if (blockSize < 0) {
  ------------------
  |  Branch (7354:9): [True: 0, False: 7.97k]
  ------------------
 7355|       |      /* This condition traps a situation where either more than
 7356|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7357|       |       * readily testable, since it is unlikely that an average
 7358|       |       * machine will have that much memory, so we exclude it from the
 7359|       |       * coverage statistics.
 7360|       |       */
 7361|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7362|      0|    }
 7363|       |
 7364|  7.97k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7365|  7.97k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7365:9): [True: 0, False: 7.97k]
  ------------------
 7366|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7367|       |
 7368|  7.97k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7369|  7.97k|                                           (unsigned)bytesToAllocate);
 7370|  7.97k|    if (temp == NULL)
  ------------------
  |  Branch (7370:9): [True: 0, False: 7.97k]
  ------------------
 7371|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7372|  7.97k|    pool->blocks = temp;
 7373|  7.97k|    pool->blocks->size = blockSize;
 7374|  7.97k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7375|  7.97k|    pool->start = pool->blocks->s;
 7376|  7.97k|    pool->end = pool->start + blockSize;
 7377|  19.4k|  } else {
 7378|  19.4k|    BLOCK *tem;
 7379|  19.4k|    int blockSize = (int)(pool->end - pool->start);
 7380|  19.4k|    size_t bytesToAllocate;
 7381|       |
 7382|  19.4k|    if (blockSize < 0) {
  ------------------
  |  Branch (7382:9): [True: 0, False: 19.4k]
  ------------------
 7383|       |      /* This condition traps a situation where either more than
 7384|       |       * INT_MAX bytes have already been allocated (which is prevented
 7385|       |       * by various pieces of program logic, not least this one, never
 7386|       |       * mind the unlikelihood of actually having that much memory) or
 7387|       |       * the pool control fields have been corrupted (which could
 7388|       |       * conceivably happen in an extremely buggy user handler
 7389|       |       * function).  Either way it isn't readily testable, so we
 7390|       |       * exclude it from the coverage statistics.
 7391|       |       */
 7392|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7393|      0|    }
 7394|       |
 7395|  19.4k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  245|  19.4k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7395:9): [True: 19.0k, False: 358]
  ------------------
 7396|  19.0k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  245|  19.0k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7397|    358|    else {
 7398|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7399|    358|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7399:11): [True: 0, False: 358]
  ------------------
 7400|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7401|      0|      }
 7402|    358|      blockSize *= 2;
 7403|    358|    }
 7404|       |
 7405|  19.4k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7406|  19.4k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7406:9): [True: 0, False: 19.4k]
  ------------------
 7407|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7408|       |
 7409|  19.4k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7410|  19.4k|    if (! tem)
  ------------------
  |  Branch (7410:9): [True: 0, False: 19.4k]
  ------------------
 7411|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7412|  19.4k|    tem->size = blockSize;
 7413|  19.4k|    tem->next = pool->blocks;
 7414|  19.4k|    pool->blocks = tem;
 7415|  19.4k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7415:9): [True: 1.77k, False: 17.6k]
  ------------------
 7416|  1.77k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7417|  19.4k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7418|  19.4k|    pool->start = tem->s;
 7419|  19.4k|    pool->end = tem->s + blockSize;
 7420|  19.4k|  }
 7421|  27.3k|  return XML_TRUE;
  ------------------
  |  |   55|  27.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7422|  27.3k|}
xmlparse.c:poolBytesToAllocateFor:
 7293|  27.3k|poolBytesToAllocateFor(int blockSize) {
 7294|       |  /* Unprotected math would be:
 7295|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7296|       |  **
 7297|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7298|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7299|       |  ** on top has no chance of making us accept a small non-negative number
 7300|       |  */
 7301|  27.3k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7302|       |
 7303|  27.3k|  if (blockSize <= 0)
  ------------------
  |  Branch (7303:7): [True: 0, False: 27.3k]
  ------------------
 7304|      0|    return 0;
 7305|       |
 7306|  27.3k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7306:7): [True: 0, False: 27.3k]
  ------------------
 7307|      0|    return 0;
 7308|       |
 7309|  27.3k|  {
 7310|  27.3k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7311|  27.3k|    const int bytesToAllocate
 7312|  27.3k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7313|  27.3k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7313:9): [True: 0, False: 27.3k]
  ------------------
 7314|      0|      return 0;
 7315|       |
 7316|  27.3k|    return (size_t)bytesToAllocate;
 7317|  27.3k|  }
 7318|  27.3k|}
xmlparse.c:storeAttributeValue:
 5871|  19.2k|                    enum XML_Account account) {
 5872|  19.2k|  enum XML_Error result
 5873|  19.2k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5874|  19.2k|  if (result)
  ------------------
  |  Branch (5874:7): [True: 234, False: 18.9k]
  ------------------
 5875|    234|    return result;
 5876|  18.9k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  596|  27.7k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (596:26): [True: 3.20k, False: 5.53k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  598|  3.20k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5876:7): [True: 8.74k, False: 10.2k]
  |  Branch (5876:40): [True: 601, False: 2.60k]
  ------------------
 5877|    601|    poolChop(pool);
  ------------------
  |  |  597|    601|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5878|  18.9k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  602|  18.9k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.36k, False: 17.6k]
  |  |  |  Branch (602:35): [True: 0, False: 1.36k]
  |  |  ------------------
  |  |  603|  18.9k|       ? 0                                                                     \
  |  |  604|  18.9k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5878:7): [True: 0, False: 18.9k]
  ------------------
 5879|      0|    return XML_ERROR_NO_MEMORY;
 5880|  18.9k|  return XML_ERROR_NONE;
 5881|  18.9k|}
xmlparse.c:appendAttributeValue:
 5886|   420k|                     enum XML_Account account) {
 5887|   420k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5888|       |#ifndef XML_DTD
 5889|       |  UNUSED_P(account);
 5890|       |#endif
 5891|       |
 5892|  20.0M|  for (;;) {
 5893|  20.0M|    const char *next
 5894|  20.0M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5895|  20.0M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  20.0M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  20.0M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5896|  20.0M|#ifdef XML_DTD
 5897|  20.0M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5897:9): [True: 34, False: 20.0M]
  ------------------
 5898|     34|      accountingOnAbort(parser);
 5899|     34|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5900|     34|    }
 5901|  20.0M|#endif
 5902|  20.0M|    switch (tok) {
 5903|   420k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   420k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5903:5): [True: 420k, False: 19.6M]
  ------------------
 5904|   420k|      return XML_ERROR_NONE;
 5905|     11|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5905:5): [True: 11, False: 20.0M]
  ------------------
 5906|     11|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5906:11): [True: 6, False: 5]
  ------------------
 5907|      6|        parser->m_eventPtr = next;
 5908|     11|      return XML_ERROR_INVALID_TOKEN;
 5909|      5|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5909:5): [True: 5, False: 20.0M]
  ------------------
 5910|      5|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5910:11): [True: 4, False: 1]
  ------------------
 5911|      4|        parser->m_eventPtr = ptr;
 5912|      5|      return XML_ERROR_INVALID_TOKEN;
 5913|  20.9k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  20.9k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5913:5): [True: 20.9k, False: 20.0M]
  ------------------
 5914|  20.9k|      XML_Char buf[XML_ENCODE_MAX];
 5915|  20.9k|      int i;
 5916|  20.9k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  20.9k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5917|  20.9k|      if (n < 0) {
  ------------------
  |  Branch (5917:11): [True: 32, False: 20.9k]
  ------------------
 5918|     32|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5918:13): [True: 31, False: 1]
  ------------------
 5919|     31|          parser->m_eventPtr = ptr;
 5920|     32|        return XML_ERROR_BAD_CHAR_REF;
 5921|     32|      }
 5922|  20.9k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5922:11): [True: 551, False: 20.3k]
  |  Branch (5922:24): [True: 294, False: 257]
  ------------------
 5923|  20.9k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|    294|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|    260|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5923:15): [True: 34, False: 260]
  |  Branch (5923:40): [True: 66, False: 194]
  ------------------
 5924|    100|        break;
 5925|  20.8k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  20.8k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5926|       |      /* The XmlEncode() functions can never return 0 here.  That
 5927|       |       * error return happens if the code point passed in is either
 5928|       |       * negative or greater than or equal to 0x110000.  The
 5929|       |       * XmlCharRefNumber() functions will all return a number
 5930|       |       * strictly less than 0x110000 or a negative value if an error
 5931|       |       * occurred.  The negative value is intercepted above, so
 5932|       |       * XmlEncode() is never passed a value it might return an
 5933|       |       * error for.
 5934|       |       */
 5935|  65.0k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5935:19): [True: 44.2k, False: 20.8k]
  ------------------
 5936|  44.2k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  602|  44.2k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 404, False: 43.8k]
  |  |  |  Branch (602:35): [True: 0, False: 404]
  |  |  ------------------
  |  |  603|  44.2k|       ? 0                                                                     \
  |  |  604|  44.2k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5936:13): [True: 0, False: 44.2k]
  ------------------
 5937|      0|          return XML_ERROR_NO_MEMORY;
 5938|  44.2k|      }
 5939|  20.8k|    } break;
 5940|  3.67M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  3.67M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5940:5): [True: 3.67M, False: 16.4M]
  ------------------
 5941|  3.67M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5941:11): [True: 0, False: 3.67M]
  ------------------
 5942|      0|        return XML_ERROR_NO_MEMORY;
 5943|  3.67M|      break;
 5944|  3.67M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.36k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5944:5): [True: 1.36k, False: 20.0M]
  ------------------
 5945|  1.36k|      next = ptr + enc->minBytesPerChar;
 5946|       |      /* fall through */
 5947|   625k|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|   625k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5947:5): [True: 624k, False: 19.4M]
  ------------------
 5948|  15.5M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  15.5M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5948:5): [True: 14.9M, False: 5.16M]
  ------------------
 5949|  15.5M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|  1.33M|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|  1.33M|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5949:11): [True: 1.33M, False: 14.2M]
  |  Branch (5949:25): [True: 2.07k, False: 1.33M]
  |  Branch (5949:50): [True: 937k, False: 393k]
  ------------------
 5950|   940k|        break;
 5951|  14.6M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  602|  14.6M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 2.09k, False: 14.6M]
  |  |  |  Branch (602:35): [True: 0, False: 2.09k]
  |  |  ------------------
  |  |  603|  14.6M|       ? 0                                                                     \
  |  |  604|  14.6M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5951:11): [True: 0, False: 14.6M]
  ------------------
 5952|      0|        return XML_ERROR_NO_MEMORY;
 5953|  14.6M|      break;
 5954|  14.6M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   416k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5954:5): [True: 416k, False: 19.6M]
  ------------------
 5955|   416k|      const XML_Char *name;
 5956|   416k|      ENTITY *entity;
 5957|   416k|      char checkEntityDecl;
 5958|   416k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   416k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5959|   416k|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5960|   416k|      if (ch) {
  ------------------
  |  Branch (5960:11): [True: 13.8k, False: 402k]
  ------------------
 5961|  13.8k|#ifdef XML_DTD
 5962|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5963|       |         *       so there is no amplification and hence recording without
 5964|       |         *       protection. */
 5965|  13.8k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5966|  13.8k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5967|  13.8k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5968|  13.8k|#endif /* XML_DTD */
 5969|  13.8k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  602|  13.8k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 210, False: 13.6k]
  |  |  |  Branch (602:35): [True: 0, False: 210]
  |  |  ------------------
  |  |  603|  13.8k|       ? 0                                                                     \
  |  |  604|  13.8k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5969:13): [True: 0, False: 13.8k]
  ------------------
 5970|      0|          return XML_ERROR_NO_MEMORY;
 5971|  13.8k|        break;
 5972|  13.8k|      }
 5973|   402k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5974|   402k|                             ptr + enc->minBytesPerChar,
 5975|   402k|                             next - enc->minBytesPerChar);
 5976|   402k|      if (! name)
  ------------------
  |  Branch (5976:11): [True: 0, False: 402k]
  ------------------
 5977|      0|        return XML_ERROR_NO_MEMORY;
 5978|   402k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5979|   402k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  599|   402k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5980|       |      /* First, determine if a check for an existing declaration is needed;
 5981|       |         if yes, check that the entity exists, and that it is internal.
 5982|       |      */
 5983|   402k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5983:11): [True: 15.4k, False: 387k]
  ------------------
 5984|  15.4k|        checkEntityDecl =
 5985|  15.4k|#ifdef XML_DTD
 5986|  15.4k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5986:13): [True: 15.4k, False: 0]
  ------------------
 5987|  15.4k|#endif /* XML_DTD */
 5988|  15.4k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5988:13): [True: 15.4k, False: 0]
  |  Branch (5988:14): [True: 685, False: 14.7k]
  ------------------
 5989|  15.4k|                             : ! dtd->hasParamEntityRefs);
 5990|   387k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5991|   387k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5991:27): [True: 384k, False: 2.10k]
  |  Branch (5991:56): [True: 0, False: 2.10k]
  ------------------
 5992|   402k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5992:11): [True: 400k, False: 2.10k]
  ------------------
 5993|   400k|        if (! entity)
  ------------------
  |  Branch (5993:13): [True: 143, False: 400k]
  ------------------
 5994|    143|          return XML_ERROR_UNDEFINED_ENTITY;
 5995|   400k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5995:18): [True: 0, False: 400k]
  ------------------
 5996|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5997|   400k|      } else if (! entity) {
  ------------------
  |  Branch (5997:18): [True: 802, False: 1.29k]
  ------------------
 5998|       |        /* Cannot report skipped entity here - see comments on
 5999|       |           parser->m_skippedEntityHandler.
 6000|       |        if (parser->m_skippedEntityHandler)
 6001|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6002|       |        */
 6003|       |        /* Cannot call the default handler because this would be
 6004|       |           out of sync with the call to the startElementHandler.
 6005|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6006|       |          reportDefault(parser, enc, ptr, next);
 6007|       |        */
 6008|    802|        break;
 6009|    802|      }
 6010|   401k|      if (entity->open) {
  ------------------
  |  Branch (6010:11): [True: 5, False: 401k]
  ------------------
 6011|      5|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6011:13): [True: 0, False: 5]
  ------------------
 6012|       |          /* It does not appear that this line can be executed.
 6013|       |           *
 6014|       |           * The "if (entity->open)" check catches recursive entity
 6015|       |           * definitions.  In order to be called with an open
 6016|       |           * entity, it must have gone through this code before and
 6017|       |           * been through the recursive call to
 6018|       |           * appendAttributeValue() some lines below.  That call
 6019|       |           * sets the local encoding ("enc") to the parser's
 6020|       |           * internal encoding (internal_utf8 or internal_utf16),
 6021|       |           * which can never be the same as the principle encoding.
 6022|       |           * It doesn't appear there is another code path that gets
 6023|       |           * here with entity->open being TRUE.
 6024|       |           *
 6025|       |           * Since it is not certain that this logic is watertight,
 6026|       |           * we keep the line and merely exclude it from coverage
 6027|       |           * tests.
 6028|       |           */
 6029|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6030|      0|        }
 6031|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6032|      5|      }
 6033|   401k|      if (entity->notation) {
  ------------------
  |  Branch (6033:11): [True: 2, False: 401k]
  ------------------
 6034|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6034:13): [True: 1, False: 1]
  ------------------
 6035|      1|          parser->m_eventPtr = ptr;
 6036|      2|        return XML_ERROR_BINARY_ENTITY_REF;
 6037|      2|      }
 6038|   401k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6038:11): [True: 2, False: 401k]
  ------------------
 6039|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6039:13): [True: 1, False: 1]
  ------------------
 6040|      1|          parser->m_eventPtr = ptr;
 6041|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6042|   401k|      } else {
 6043|   401k|        enum XML_Error result;
 6044|   401k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6045|   401k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   401k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6046|   401k|#ifdef XML_DTD
 6047|   401k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6048|   401k|#endif
 6049|   401k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6050|   401k|                                      isCdata, (const char *)entity->textPtr,
 6051|   401k|                                      (const char *)textEnd, pool,
 6052|   401k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6053|   401k|#ifdef XML_DTD
 6054|   401k|        entityTrackingOnClose(parser, entity, __LINE__);
 6055|   401k|#endif
 6056|   401k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   401k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6057|   401k|        if (result)
  ------------------
  |  Branch (6057:13): [True: 65, False: 401k]
  ------------------
 6058|     65|          return result;
 6059|   401k|      }
 6060|   401k|    } break;
 6061|   401k|    default:
  ------------------
  |  Branch (6061:5): [True: 0, False: 20.0M]
  ------------------
 6062|       |      /* The only token returned by XmlAttributeValueTok() that does
 6063|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6064|       |       * Getting that would require an entity name to contain an
 6065|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6066|       |       * tokenisers will have already recognised and rejected such
 6067|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6068|       |       * default case should be retained as a safety net, but the code
 6069|       |       * excluded from coverage tests.
 6070|       |       *
 6071|       |       * LCOV_EXCL_START
 6072|       |       */
 6073|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6073:11): [True: 0, False: 0]
  ------------------
 6074|      0|        parser->m_eventPtr = ptr;
 6075|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6076|       |      /* LCOV_EXCL_STOP */
 6077|  20.0M|    }
 6078|  19.6M|    ptr = next;
 6079|  19.6M|  }
 6080|       |  /* not reached */
 6081|   420k|}
xmlparse.c:storeEntityValue:
 6086|  8.08k|                 enum XML_Account account) {
 6087|  8.08k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6088|  8.08k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6089|  8.08k|  enum XML_Error result = XML_ERROR_NONE;
 6090|  8.08k|#ifdef XML_DTD
 6091|  8.08k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6092|  8.08k|  parser->m_prologState.inEntityValue = 1;
 6093|       |#else
 6094|       |  UNUSED_P(account);
 6095|       |#endif /* XML_DTD */
 6096|       |  /* never return Null for the value argument in EntityDeclHandler,
 6097|       |     since this would indicate an external entity; therefore we
 6098|       |     have to make sure that entityValuePool.start is not null */
 6099|  8.08k|  if (! pool->blocks) {
  ------------------
  |  Branch (6099:7): [True: 2.38k, False: 5.69k]
  ------------------
 6100|  2.38k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6100:9): [True: 0, False: 2.38k]
  ------------------
 6101|      0|      return XML_ERROR_NO_MEMORY;
 6102|  2.38k|  }
 6103|       |
 6104|   852k|  for (;;) {
 6105|   852k|    const char *next
 6106|   852k|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6107|   852k|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|   852k|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   852k|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6108|       |
 6109|   852k|#ifdef XML_DTD
 6110|   852k|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6110:9): [True: 0, False: 852k]
  ------------------
 6111|   852k|                                  account)) {
 6112|      0|      accountingOnAbort(parser);
 6113|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6114|      0|      goto endEntityValue;
 6115|      0|    }
 6116|   852k|#endif
 6117|       |
 6118|   852k|    switch (tok) {
 6119|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6119:5): [True: 2, False: 852k]
  ------------------
 6120|      2|#ifdef XML_DTD
 6121|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6121:11): [True: 0, False: 2]
  |  Branch (6121:38): [True: 0, False: 2]
  ------------------
 6122|      0|        const XML_Char *name;
 6123|      0|        ENTITY *entity;
 6124|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6125|      0|                               entityTextPtr + enc->minBytesPerChar,
 6126|      0|                               next - enc->minBytesPerChar);
 6127|      0|        if (! name) {
  ------------------
  |  Branch (6127:13): [True: 0, False: 0]
  ------------------
 6128|      0|          result = XML_ERROR_NO_MEMORY;
 6129|      0|          goto endEntityValue;
 6130|      0|        }
 6131|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6132|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6133|      0|        if (! entity) {
  ------------------
  |  Branch (6133:13): [True: 0, False: 0]
  ------------------
 6134|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6135|       |          /* cannot report skipped entity here - see comments on
 6136|       |             parser->m_skippedEntityHandler
 6137|       |          if (parser->m_skippedEntityHandler)
 6138|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6139|       |          */
 6140|      0|          dtd->keepProcessing = dtd->standalone;
 6141|      0|          goto endEntityValue;
 6142|      0|        }
 6143|      0|        if (entity->open) {
  ------------------
  |  Branch (6143:13): [True: 0, False: 0]
  ------------------
 6144|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6144:15): [True: 0, False: 0]
  ------------------
 6145|      0|            parser->m_eventPtr = entityTextPtr;
 6146|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6147|      0|          goto endEntityValue;
 6148|      0|        }
 6149|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6149:13): [True: 0, False: 0]
  ------------------
 6150|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6150:15): [True: 0, False: 0]
  ------------------
 6151|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6152|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6153|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6154|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6154:17): [True: 0, False: 0]
  ------------------
 6155|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6156|      0|                    entity->systemId, entity->publicId)) {
 6157|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6158|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6159|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6160|      0|              goto endEntityValue;
 6161|      0|            }
 6162|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6163|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6164|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6164:17): [True: 0, False: 0]
  ------------------
 6165|      0|              dtd->keepProcessing = dtd->standalone;
 6166|      0|          } else
 6167|      0|            dtd->keepProcessing = dtd->standalone;
 6168|      0|        } else {
 6169|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6170|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6171|      0|          result = storeEntityValue(
 6172|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6173|      0|              (const char *)(entity->textPtr + entity->textLen),
 6174|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6175|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6176|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6177|      0|          if (result)
  ------------------
  |  Branch (6177:15): [True: 0, False: 0]
  ------------------
 6178|      0|            goto endEntityValue;
 6179|      0|        }
 6180|      0|        break;
 6181|      0|      }
 6182|      2|#endif /* XML_DTD */
 6183|       |      /* In the internal subset, PE references are not legal
 6184|       |         within markup declarations, e.g entity values in this case. */
 6185|      2|      parser->m_eventPtr = entityTextPtr;
 6186|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6187|      2|      goto endEntityValue;
 6188|  8.01k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  8.01k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6188:5): [True: 8.01k, False: 844k]
  ------------------
 6189|  8.01k|      result = XML_ERROR_NONE;
 6190|  8.01k|      goto endEntityValue;
 6191|  13.0k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  13.0k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6191:5): [True: 13.0k, False: 838k]
  ------------------
 6192|  99.1k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  99.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6192:5): [True: 86.0k, False: 766k]
  ------------------
 6193|  99.1k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6193:11): [True: 0, False: 99.1k]
  ------------------
 6194|      0|        result = XML_ERROR_NO_MEMORY;
 6195|      0|        goto endEntityValue;
 6196|      0|      }
 6197|  99.1k|      break;
 6198|  99.1k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.03k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6198:5): [True: 1.03k, False: 851k]
  ------------------
 6199|  1.03k|      next = entityTextPtr + enc->minBytesPerChar;
 6200|       |      /* fall through */
 6201|   742k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   742k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6201:5): [True: 741k, False: 110k]
  ------------------
 6202|   742k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6202:11): [True: 56, False: 742k]
  |  Branch (6202:37): [True: 0, False: 56]
  ------------------
 6203|      0|        result = XML_ERROR_NO_MEMORY;
 6204|      0|        goto endEntityValue;
 6205|      0|      }
 6206|   742k|      *(pool->ptr)++ = 0xA;
 6207|   742k|      break;
 6208|  2.65k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  2.65k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6208:5): [True: 2.65k, False: 849k]
  ------------------
 6209|  2.65k|      XML_Char buf[XML_ENCODE_MAX];
 6210|  2.65k|      int i;
 6211|  2.65k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  2.65k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6212|  2.65k|      if (n < 0) {
  ------------------
  |  Branch (6212:11): [True: 3, False: 2.64k]
  ------------------
 6213|      3|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6213:13): [True: 3, False: 0]
  ------------------
 6214|      3|          parser->m_eventPtr = entityTextPtr;
 6215|      3|        result = XML_ERROR_BAD_CHAR_REF;
 6216|      3|        goto endEntityValue;
 6217|      3|      }
 6218|  2.64k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  2.64k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6219|       |      /* The XmlEncode() functions can never return 0 here.  That
 6220|       |       * error return happens if the code point passed in is either
 6221|       |       * negative or greater than or equal to 0x110000.  The
 6222|       |       * XmlCharRefNumber() functions will all return a number
 6223|       |       * strictly less than 0x110000 or a negative value if an error
 6224|       |       * occurred.  The negative value is intercepted above, so
 6225|       |       * XmlEncode() is never passed a value it might return an
 6226|       |       * error for.
 6227|       |       */
 6228|  9.44k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6228:19): [True: 6.79k, False: 2.64k]
  ------------------
 6229|  6.79k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6229:13): [True: 11, False: 6.78k]
  |  Branch (6229:39): [True: 0, False: 11]
  ------------------
 6230|      0|          result = XML_ERROR_NO_MEMORY;
 6231|      0|          goto endEntityValue;
 6232|      0|        }
 6233|  6.79k|        *(pool->ptr)++ = buf[i];
 6234|  6.79k|      }
 6235|  2.64k|    } break;
 6236|  2.64k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6236:5): [True: 47, False: 852k]
  ------------------
 6237|     47|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6237:11): [True: 47, False: 0]
  ------------------
 6238|     47|        parser->m_eventPtr = entityTextPtr;
 6239|     47|      result = XML_ERROR_INVALID_TOKEN;
 6240|     47|      goto endEntityValue;
 6241|     14|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6241:5): [True: 14, False: 852k]
  ------------------
 6242|     14|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6242:11): [True: 14, False: 0]
  ------------------
 6243|     14|        parser->m_eventPtr = next;
 6244|     14|      result = XML_ERROR_INVALID_TOKEN;
 6245|     14|      goto endEntityValue;
 6246|      0|    default:
  ------------------
  |  Branch (6246:5): [True: 0, False: 852k]
  ------------------
 6247|       |      /* This default case should be unnecessary -- all the tokens
 6248|       |       * that XmlEntityValueTok() can return have their own explicit
 6249|       |       * cases -- but should be retained for safety.  We do however
 6250|       |       * exclude it from the coverage statistics.
 6251|       |       *
 6252|       |       * LCOV_EXCL_START
 6253|       |       */
 6254|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6254:11): [True: 0, False: 0]
  ------------------
 6255|      0|        parser->m_eventPtr = entityTextPtr;
 6256|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6257|      0|      goto endEntityValue;
 6258|       |      /* LCOV_EXCL_STOP */
 6259|   852k|    }
 6260|   843k|    entityTextPtr = next;
 6261|   843k|  }
 6262|  8.08k|endEntityValue:
 6263|  8.08k|#ifdef XML_DTD
 6264|  8.08k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6265|  8.08k|#endif /* XML_DTD */
 6266|  8.08k|  return result;
 6267|  8.08k|}
xmlparse.c:processInternalEntity:
 5716|  78.7k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5717|  78.7k|  const char *textStart, *textEnd;
 5718|  78.7k|  const char *next;
 5719|  78.7k|  enum XML_Error result;
 5720|  78.7k|  OPEN_INTERNAL_ENTITY *openEntity;
 5721|       |
 5722|  78.7k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5722:7): [True: 77.1k, False: 1.60k]
  ------------------
 5723|  77.1k|    openEntity = parser->m_freeInternalEntities;
 5724|  77.1k|    parser->m_freeInternalEntities = openEntity->next;
 5725|  77.1k|  } else {
 5726|  1.60k|    openEntity
 5727|  1.60k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  713|  1.60k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5728|  1.60k|    if (! openEntity)
  ------------------
  |  Branch (5728:9): [True: 0, False: 1.60k]
  ------------------
 5729|      0|      return XML_ERROR_NO_MEMORY;
 5730|  1.60k|  }
 5731|  78.7k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|  78.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5732|  78.7k|#ifdef XML_DTD
 5733|  78.7k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5734|  78.7k|#endif
 5735|  78.7k|  entity->processed = 0;
 5736|  78.7k|  openEntity->next = parser->m_openInternalEntities;
 5737|  78.7k|  parser->m_openInternalEntities = openEntity;
 5738|  78.7k|  openEntity->entity = entity;
 5739|  78.7k|  openEntity->startTagLevel = parser->m_tagLevel;
 5740|  78.7k|  openEntity->betweenDecl = betweenDecl;
 5741|  78.7k|  openEntity->internalEventPtr = NULL;
 5742|  78.7k|  openEntity->internalEventEndPtr = NULL;
 5743|  78.7k|  textStart = (const char *)entity->textPtr;
 5744|  78.7k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5745|       |  /* Set a safe default value in case 'next' does not get set */
 5746|  78.7k|  next = textStart;
 5747|       |
 5748|  78.7k|#ifdef XML_DTD
 5749|  78.7k|  if (entity->is_param) {
  ------------------
  |  Branch (5749:7): [True: 0, False: 78.7k]
  ------------------
 5750|      0|    int tok
 5751|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5752|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5753|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5754|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5755|      0|  } else
 5756|  78.7k|#endif /* XML_DTD */
 5757|  78.7k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5758|  78.7k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|  78.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5759|  78.7k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5760|       |
 5761|  78.7k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5761:7): [True: 78.0k, False: 711]
  ------------------
 5762|  78.0k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5762:9): [True: 0, False: 78.0k]
  |  Branch (5762:28): [True: 0, False: 0]
  ------------------
 5763|      0|      entity->processed = (int)(next - textStart);
 5764|      0|      parser->m_processor = internalEntityProcessor;
 5765|  78.0k|    } else {
 5766|  78.0k|#ifdef XML_DTD
 5767|  78.0k|      entityTrackingOnClose(parser, entity, __LINE__);
 5768|  78.0k|#endif /* XML_DTD */
 5769|  78.0k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|  78.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5770|  78.0k|      parser->m_openInternalEntities = openEntity->next;
 5771|       |      /* put openEntity back in list of free instances */
 5772|  78.0k|      openEntity->next = parser->m_freeInternalEntities;
 5773|  78.0k|      parser->m_freeInternalEntities = openEntity;
 5774|  78.0k|    }
 5775|  78.0k|  }
 5776|  78.7k|  return result;
 5777|  78.7k|}
xmlparse.c:entityTrackingOnOpen:
 7827|   480k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7828|   480k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7829|   480k|  assert(! rootParser->m_parentParser);
 7830|       |
 7831|   480k|  rootParser->m_entity_stats.countEverOpened++;
 7832|   480k|  rootParser->m_entity_stats.currentDepth++;
 7833|   480k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7833:7): [True: 2.23k, False: 478k]
  ------------------
 7834|   480k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7835|  2.23k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7836|  2.23k|  }
 7837|       |
 7838|   480k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7839|   480k|}
xmlparse.c:entityTrackingReportStats:
 7804|   959k|                          const char *action, int sourceLine) {
 7805|   959k|  assert(! rootParser->m_parentParser);
 7806|   959k|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7806:7): [True: 959k, False: 0]
  ------------------
 7807|   959k|    return;
 7808|       |
 7809|       |#  if defined(XML_UNICODE)
 7810|       |  const char *const entityName = "[..]";
 7811|       |#  else
 7812|      0|  const char *const entityName = entity->name;
 7813|      0|#  endif
 7814|       |
 7815|      0|  fprintf(
 7816|      0|      stderr,
 7817|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7818|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7819|      0|      rootParser->m_entity_stats.currentDepth,
 7820|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7821|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7822|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7822:7): [True: 0, False: 0]
  ------------------
 7823|      0|      sourceLine);
 7824|      0|}
xmlparse.c:entityTrackingOnClose:
 7842|   479k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7843|   479k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7844|   479k|  assert(! rootParser->m_parentParser);
 7845|       |
 7846|   479k|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7847|   479k|  rootParser->m_entity_stats.currentDepth--;
 7848|   479k|}
xmlparse.c:reportProcessingInstruction:
 6292|  12.9k|                            const char *start, const char *end) {
 6293|  12.9k|  const XML_Char *target;
 6294|  12.9k|  XML_Char *data;
 6295|  12.9k|  const char *tem;
 6296|  12.9k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6296:7): [True: 12.9k, False: 0]
  ------------------
 6297|  12.9k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6297:9): [True: 0, False: 12.9k]
  ------------------
 6298|      0|      reportDefault(parser, enc, start, end);
 6299|  12.9k|    return 1;
 6300|  12.9k|  }
 6301|      0|  start += enc->minBytesPerChar * 2;
 6302|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6303|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6304|      0|  if (! target)
  ------------------
  |  Branch (6304:7): [True: 0, False: 0]
  ------------------
 6305|      0|    return 0;
 6306|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6307|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6308|      0|                         end - enc->minBytesPerChar * 2);
 6309|      0|  if (! data)
  ------------------
  |  Branch (6309:7): [True: 0, False: 0]
  ------------------
 6310|      0|    return 0;
 6311|      0|  normalizeLines(data);
 6312|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6313|      0|  poolClear(&parser->m_tempPool);
 6314|      0|  return 1;
 6315|      0|}
xmlparse.c:reportComment:
 6319|  1.96k|              const char *end) {
 6320|  1.96k|  XML_Char *data;
 6321|  1.96k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6321:7): [True: 1.96k, False: 0]
  ------------------
 6322|  1.96k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6322:9): [True: 0, False: 1.96k]
  ------------------
 6323|      0|      reportDefault(parser, enc, start, end);
 6324|  1.96k|    return 1;
 6325|  1.96k|  }
 6326|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6327|      0|                         start + enc->minBytesPerChar * 4,
 6328|      0|                         end - enc->minBytesPerChar * 3);
 6329|      0|  if (! data)
  ------------------
  |  Branch (6329:7): [True: 0, False: 0]
  ------------------
 6330|      0|    return 0;
 6331|      0|  normalizeLines(data);
 6332|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6333|      0|  poolClear(&parser->m_tempPool);
 6334|      0|  return 1;
 6335|      0|}
xmlparse.c:getDebugLevel:
 8390|  39.1k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8391|  39.1k|  const char *const valueOrNull = getenv(variableName);
 8392|  39.1k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8392:7): [True: 39.1k, False: 0]
  ------------------
 8393|  39.1k|    return defaultDebugLevel;
 8394|  39.1k|  }
 8395|      0|  const char *const value = valueOrNull;
 8396|       |
 8397|      0|  errno = 0;
 8398|      0|  char *afterValue = NULL;
 8399|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8400|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8400:7): [True: 0, False: 0]
  |  Branch (8400:23): [True: 0, False: 0]
  |  Branch (8400:48): [True: 0, False: 0]
  ------------------
 8401|      0|    errno = 0;
 8402|      0|    return defaultDebugLevel;
 8403|      0|  }
 8404|       |
 8405|      0|  return debugLevel;
 8406|      0|}
xmlparse.c:destroyBindings:
 1428|  2.96M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1429|  2.96M|  for (;;) {
 1430|  2.96M|    BINDING *b = bindings;
 1431|  2.96M|    if (! b)
  ------------------
  |  Branch (1431:9): [True: 2.96M, False: 0]
  ------------------
 1432|  2.96M|      break;
 1433|      0|    bindings = b->nextTagBinding;
 1434|      0|    FREE(parser, b->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1435|      0|    FREE(parser, b);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|  }
 1437|  2.96M|}
xmlparse.c:startParsing:
  953|  19.5k|startParsing(XML_Parser parser) {
  954|       |  /* hash functions must be initialized before setContext() is called */
  955|  19.5k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (955:7): [True: 0, False: 19.5k]
  ------------------
  956|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  957|  19.5k|  if (parser->m_ns) {
  ------------------
  |  Branch (957:7): [True: 0, False: 19.5k]
  ------------------
  958|       |    /* implicit context only set for root parser, since child
  959|       |       parsers (i.e. external entity parsers) will inherit it
  960|       |    */
  961|      0|    return setContext(parser, implicitContext);
  962|      0|  }
  963|  19.5k|  return XML_TRUE;
  ------------------
  |  |   55|  19.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  964|  19.5k|}
xmlparse.c:dtdDestroy:
 6788|  19.5k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6789|  19.5k|  HASH_TABLE_ITER iter;
 6790|  19.5k|  hashTableIterInit(&iter, &(p->elementTypes));
 6791|  41.0k|  for (;;) {
 6792|  41.0k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6793|  41.0k|    if (! e)
  ------------------
  |  Branch (6793:9): [True: 19.5k, False: 21.4k]
  ------------------
 6794|  19.5k|      break;
 6795|  21.4k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6795:9): [True: 760, False: 20.6k]
  ------------------
 6796|    760|      ms->free_fcn(e->defaultAtts);
 6797|  21.4k|  }
 6798|  19.5k|  hashTableDestroy(&(p->generalEntities));
 6799|  19.5k|#ifdef XML_DTD
 6800|  19.5k|  hashTableDestroy(&(p->paramEntities));
 6801|  19.5k|#endif /* XML_DTD */
 6802|  19.5k|  hashTableDestroy(&(p->elementTypes));
 6803|  19.5k|  hashTableDestroy(&(p->attributeIds));
 6804|  19.5k|  hashTableDestroy(&(p->prefixes));
 6805|  19.5k|  poolDestroy(&(p->pool));
 6806|  19.5k|  poolDestroy(&(p->entityValuePool));
 6807|  19.5k|  if (isDocEntity) {
  ------------------
  |  Branch (6807:7): [True: 19.5k, False: 0]
  ------------------
 6808|  19.5k|    ms->free_fcn(p->scaffIndex);
 6809|  19.5k|    ms->free_fcn(p->scaffold);
 6810|  19.5k|  }
 6811|  19.5k|  ms->free_fcn(p);
 6812|  19.5k|}
xmlparse.c:hashTableDestroy:
 7141|  97.9k|hashTableDestroy(HASH_TABLE *table) {
 7142|  97.9k|  size_t i;
 7143|  1.21M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7143:15): [True: 1.11M, False: 97.9k]
  ------------------
 7144|  1.11M|    table->mem->free_fcn(table->v[i]);
 7145|  97.9k|  table->mem->free_fcn(table->v);
 7146|  97.9k|}
xmlparse.c:poolClear:
 7184|  2.97M|poolClear(STRING_POOL *pool) {
 7185|  2.97M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7185:7): [True: 446k, False: 2.53M]
  ------------------
 7186|   446k|    pool->freeBlocks = pool->blocks;
 7187|  2.53M|  else {
 7188|  2.53M|    BLOCK *p = pool->blocks;
 7189|  2.53M|    while (p) {
  ------------------
  |  Branch (7189:12): [True: 3.08k, False: 2.53M]
  ------------------
 7190|  3.08k|      BLOCK *tem = p->next;
 7191|  3.08k|      p->next = pool->freeBlocks;
 7192|  3.08k|      pool->freeBlocks = p;
 7193|  3.08k|      p = tem;
 7194|  3.08k|    }
 7195|  2.53M|  }
 7196|  2.97M|  pool->blocks = NULL;
 7197|  2.97M|  pool->start = NULL;
 7198|  2.97M|  pool->ptr = NULL;
 7199|  2.97M|  pool->end = NULL;
 7200|  2.97M|}
xmlparse.c:poolDestroy:
 7203|  78.3k|poolDestroy(STRING_POOL *pool) {
 7204|  78.3k|  BLOCK *p = pool->blocks;
 7205|  95.3k|  while (p) {
  ------------------
  |  Branch (7205:10): [True: 16.9k, False: 78.3k]
  ------------------
 7206|  16.9k|    BLOCK *tem = p->next;
 7207|  16.9k|    pool->mem->free_fcn(p);
 7208|  16.9k|    p = tem;
 7209|  16.9k|  }
 7210|  78.3k|  p = pool->freeBlocks;
 7211|  80.8k|  while (p) {
  ------------------
  |  Branch (7211:10): [True: 2.44k, False: 78.3k]
  ------------------
 7212|  2.44k|    BLOCK *tem = p->next;
 7213|  2.44k|    pool->mem->free_fcn(p);
 7214|  2.44k|    p = tem;
 7215|  2.44k|  }
 7216|  78.3k|}
xmlparse.c:poolCopyString:
 7236|  14.3k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7237|  2.60M|  do {
 7238|  2.60M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  602|  2.60M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 7.80k, False: 2.59M]
  |  |  |  Branch (602:35): [True: 0, False: 7.80k]
  |  |  ------------------
  |  |  603|  2.60M|       ? 0                                                                     \
  |  |  604|  2.60M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7238:9): [True: 0, False: 2.60M]
  ------------------
 7239|      0|      return NULL;
 7240|  2.60M|  } while (*s++);
  ------------------
  |  Branch (7240:12): [True: 2.59M, False: 14.3k]
  ------------------
 7241|  14.3k|  s = pool->start;
 7242|  14.3k|  poolFinish(pool);
  ------------------
  |  |  600|  14.3k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7243|  14.3k|  return s;
 7244|  14.3k|}
xmlparse.c:copyString:
 7636|  19.5k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7637|  19.5k|  size_t charsRequired = 0;
 7638|  19.5k|  XML_Char *result;
 7639|       |
 7640|       |  /* First determine how long the string is */
 7641|   176k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7641:10): [True: 156k, False: 19.5k]
  ------------------
 7642|   156k|    charsRequired++;
 7643|   156k|  }
 7644|       |  /* Include the terminator */
 7645|  19.5k|  charsRequired++;
 7646|       |
 7647|       |  /* Now allocate space for the copy */
 7648|  19.5k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7649|  19.5k|  if (result == NULL)
  ------------------
  |  Branch (7649:7): [True: 0, False: 19.5k]
  ------------------
 7650|      0|    return NULL;
 7651|       |  /* Copy the original into place */
 7652|  19.5k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7653|  19.5k|  return result;
 7654|  19.5k|}

XmlPrologStateInit:
 1237|  19.5k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.5k|  state->handler = prolog0;
 1239|  19.5k|#ifdef XML_DTD
 1240|  19.5k|  state->documentEntity = 1;
 1241|  19.5k|  state->includeLevel = 0;
 1242|  19.5k|  state->inEntityValue = 0;
 1243|  19.5k|#endif /* XML_DTD */
 1244|  19.5k|}
xmlrole.c:prolog0:
  142|  23.4k|        const ENCODING *enc) {
  143|  23.4k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 293, False: 23.1k]
  ------------------
  144|    500|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    500|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 500, False: 22.9k]
  ------------------
  145|    500|    state->handler = prolog1;
  146|    500|    return XML_ROLE_NONE;
  147|    314|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    314|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 314, False: 23.0k]
  ------------------
  148|    314|    state->handler = prolog1;
  149|    314|    return XML_ROLE_XML_DECL;
  150|    334|  case XML_TOK_PI:
  ------------------
  |  |   76|    334|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 334, False: 23.0k]
  ------------------
  151|    334|    state->handler = prolog1;
  152|    334|    return XML_ROLE_PI;
  153|     39|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     39|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 39, False: 23.3k]
  ------------------
  154|     39|    state->handler = prolog1;
  155|     39|    return XML_ROLE_COMMENT;
  156|  7.14k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  7.14k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 7.14k, False: 16.2k]
  ------------------
  157|  7.14k|    return XML_ROLE_NONE;
  158|  5.70k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.70k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.70k, False: 17.7k]
  ------------------
  159|  5.70k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.70k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 103, False: 5.59k]
  ------------------
  160|  5.70k|                              KW_DOCTYPE))
  161|    103|      break;
  162|  5.59k|    state->handler = doctype0;
  163|  5.59k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.07k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.07k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.07k, False: 14.3k]
  ------------------
  165|  9.07k|    state->handler = error;
  166|  9.07k|    return XML_ROLE_INSTANCE_START;
  167|  23.4k|  }
  168|    396|  return common(state, tok);
  169|  23.4k|}
xmlrole.c:prolog1:
  173|  5.57k|        const ENCODING *enc) {
  174|  5.57k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 9, False: 5.56k]
  ------------------
  175|    498|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    498|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 498, False: 5.07k]
  ------------------
  176|    498|    return XML_ROLE_NONE;
  177|  4.33k|  case XML_TOK_PI:
  ------------------
  |  |   76|  4.33k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 4.33k, False: 1.23k]
  ------------------
  178|  4.33k|    return XML_ROLE_PI;
  179|    416|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    416|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 416, False: 5.15k]
  ------------------
  180|    416|    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.57k]
  ------------------
  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|    266|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    266|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 266, False: 5.30k]
  ------------------
  191|    266|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    266|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 262]
  ------------------
  192|    266|                              KW_DOCTYPE))
  193|      4|      break;
  194|    262|    state->handler = doctype0;
  195|    262|    return XML_ROLE_DOCTYPE_NONE;
  196|     48|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     48|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 48, False: 5.52k]
  ------------------
  197|     48|    state->handler = error;
  198|     48|    return XML_ROLE_INSTANCE_START;
  199|  5.57k|  }
  200|     13|  return common(state, tok);
  201|  5.57k|}
xmlrole.c:doctype0:
  225|  11.6k|         const ENCODING *enc) {
  226|  11.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.6k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.6k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.6k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.6k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 11, False: 11.6k]
  ------------------
  230|  5.85k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.85k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.85k, False: 5.84k]
  ------------------
  231|  5.85k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.83k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.83k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.83k, False: 5.86k]
  ------------------
  233|  5.83k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.83k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.6k]
  ------------------
  234|  5.83k|    state->handler = doctype1;
  235|  5.83k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.6k|  }
  237|     11|  return common(state, tok);
  238|  11.6k|}
xmlrole.c:doctype1:
  242|  7.08k|         const ENCODING *enc) {
  243|  7.08k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 3, False: 7.08k]
  ------------------
  244|  1.26k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.26k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.26k, False: 5.81k]
  ------------------
  245|  1.26k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.99k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.99k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.99k, False: 2.08k]
  ------------------
  247|  4.99k|    state->handler = internalSubset;
  248|  4.99k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     43|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     43|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 43, False: 7.04k]
  ------------------
  250|     43|    state->handler = prolog2;
  251|     43|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    775|  case XML_TOK_NAME:
  ------------------
  |  |   85|    775|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 775, False: 6.30k]
  ------------------
  253|    775|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    775|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 19, False: 756]
  |  |  ------------------
  ------------------
  254|     19|      state->handler = doctype3;
  255|     19|      return XML_ROLE_DOCTYPE_NONE;
  256|     19|    }
  257|    756|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    756|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 733, False: 23]
  |  |  ------------------
  ------------------
  258|    733|      state->handler = doctype2;
  259|    733|      return XML_ROLE_DOCTYPE_NONE;
  260|    733|    }
  261|     23|    break;
  262|  7.08k|  }
  263|     26|  return common(state, tok);
  264|  7.08k|}
xmlrole.c:internalSubset:
  335|  39.6k|               const ENCODING *enc) {
  336|  39.6k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 75, False: 39.5k]
  ------------------
  337|  3.34k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.34k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 3.34k, False: 36.3k]
  ------------------
  338|  3.34k|    return XML_ROLE_NONE;
  339|  28.9k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  28.9k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 28.9k, False: 10.6k]
  ------------------
  340|  28.9k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  28.9k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13.2k, False: 15.7k]
  |  |  ------------------
  ------------------
  341|  28.9k|                            KW_ENTITY)) {
  342|  13.2k|      state->handler = entity0;
  343|  13.2k|      return XML_ROLE_ENTITY_NONE;
  344|  13.2k|    }
  345|  15.7k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  15.7k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8.98k, False: 6.72k]
  |  |  ------------------
  ------------------
  346|  15.7k|                            KW_ATTLIST)) {
  347|  8.98k|      state->handler = attlist0;
  348|  8.98k|      return XML_ROLE_ATTLIST_NONE;
  349|  8.98k|    }
  350|  6.72k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  6.72k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 5.47k, False: 1.24k]
  |  |  ------------------
  ------------------
  351|  6.72k|                            KW_ELEMENT)) {
  352|  5.47k|      state->handler = element0;
  353|  5.47k|      return XML_ROLE_ELEMENT_NONE;
  354|  5.47k|    }
  355|  1.24k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.24k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.21k, False: 32]
  |  |  ------------------
  ------------------
  356|  1.24k|                            KW_NOTATION)) {
  357|  1.21k|      state->handler = notation0;
  358|  1.21k|      return XML_ROLE_NOTATION_NONE;
  359|  1.21k|    }
  360|     32|    break;
  361|  1.35k|  case XML_TOK_PI:
  ------------------
  |  |   76|  1.35k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 1.35k, False: 38.3k]
  ------------------
  362|  1.35k|    return XML_ROLE_PI;
  363|    273|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    273|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 273, False: 39.3k]
  ------------------
  364|    273|    return XML_ROLE_COMMENT;
  365|  3.47k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.47k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.47k, False: 36.1k]
  ------------------
  366|  3.47k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.16k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.16k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.16k, False: 37.4k]
  ------------------
  368|  2.16k|    state->handler = doctype5;
  369|  2.16k|    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: 39.6k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  39.6k|  }
  373|    107|  return common(state, tok);
  374|  39.6k|}
xmlrole.c:entity0:
  417|  26.5k|        const ENCODING *enc) {
  418|  26.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  26.5k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  26.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  26.5k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  26.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  26.5k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  26.5k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 15, False: 26.4k]
  ------------------
  422|  13.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  13.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 13.2k, False: 13.2k]
  ------------------
  423|  13.2k|    return XML_ROLE_ENTITY_NONE;
  424|  2.48k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  2.48k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 2.48k, False: 24.0k]
  ------------------
  425|  2.48k|    state->handler = entity1;
  426|  2.48k|    return XML_ROLE_ENTITY_NONE;
  427|  10.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 10.7k, False: 15.7k]
  ------------------
  428|  10.7k|    state->handler = entity2;
  429|  10.7k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  26.5k|  }
  431|     15|  return common(state, tok);
  432|  26.5k|}
xmlrole.c:entity1:
  436|  4.94k|        const ENCODING *enc) {
  437|  4.94k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.94k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  4.94k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.94k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  4.94k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.94k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  4.94k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 48, False: 4.90k]
  ------------------
  441|  2.47k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.47k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 2.47k, False: 2.47k]
  ------------------
  442|  2.47k|    return XML_ROLE_ENTITY_NONE;
  443|  2.42k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.42k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 2.42k, False: 2.52k]
  ------------------
  444|  2.42k|    state->handler = entity7;
  445|  2.42k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  4.94k|  }
  447|     48|  return common(state, tok);
  448|  4.94k|}
xmlrole.c:entity7:
  544|  4.82k|        const ENCODING *enc) {
  545|  4.82k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 11, False: 4.80k]
  ------------------
  546|  2.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 2.41k, False: 2.40k]
  ------------------
  547|  2.41k|    return XML_ROLE_ENTITY_NONE;
  548|  1.10k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.10k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.10k, False: 3.71k]
  ------------------
  549|  1.10k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.10k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 405, False: 700]
  |  |  ------------------
  ------------------
  550|    405|      state->handler = entity9;
  551|    405|      return XML_ROLE_ENTITY_NONE;
  552|    405|    }
  553|    700|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    700|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 696, False: 4]
  |  |  ------------------
  ------------------
  554|    696|      state->handler = entity8;
  555|    696|      return XML_ROLE_ENTITY_NONE;
  556|    696|    }
  557|      4|    break;
  558|  1.28k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.28k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 1.28k, False: 3.53k]
  ------------------
  559|  1.28k|    state->handler = declClose;
  560|  1.28k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  1.28k|    return XML_ROLE_ENTITY_VALUE;
  562|  4.82k|  }
  563|     15|  return common(state, tok);
  564|  4.82k|}
xmlrole.c:entity9:
  584|  2.17k|        const ENCODING *enc) {
  585|  2.17k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.17k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  2.17k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.17k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  2.17k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.17k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  2.17k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 6, False: 2.16k]
  ------------------
  589|  1.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.08k, False: 1.08k]
  ------------------
  590|  1.08k|    return XML_ROLE_ENTITY_NONE;
  591|  1.07k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.07k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.07k, False: 1.09k]
  ------------------
  592|  1.07k|    state->handler = entity10;
  593|  1.07k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  2.17k|  }
  595|      6|  return common(state, tok);
  596|  2.17k|}
xmlrole.c:entity10:
  600|  1.45k|         const ENCODING *enc) {
  601|  1.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  1.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  1.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  1.45k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 1, False: 1.45k]
  ------------------
  605|    386|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    386|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 386, False: 1.07k]
  ------------------
  606|    386|    return XML_ROLE_ENTITY_NONE;
  607|  1.07k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.07k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.07k, False: 387]
  ------------------
  608|  1.07k|    setTopLevel(state);
  ------------------
  |  |  116|  1.07k|    ((state)->handler                                                          \
  |  |  117|  1.07k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.07k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.07k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  1.45k|  }
  611|      1|  return common(state, tok);
  612|  1.45k|}
xmlrole.c:entity8:
  568|  1.38k|        const ENCODING *enc) {
  569|  1.38k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.38k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  1.38k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.38k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  1.38k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.38k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  1.38k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 3, False: 1.38k]
  ------------------
  573|    695|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    695|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 695, False: 692]
  ------------------
  574|    695|    return XML_ROLE_ENTITY_NONE;
  575|    689|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    689|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 689, False: 698]
  ------------------
  576|    689|    state->handler = entity9;
  577|    689|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  1.38k|  }
  579|      3|  return common(state, tok);
  580|  1.38k|}
xmlrole.c:declClose:
 1178|  15.0k|          const ENCODING *enc) {
 1179|  15.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  15.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  15.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  15.0k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 143, False: 14.9k]
  ------------------
 1183|    940|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    940|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 940, False: 14.1k]
  ------------------
 1184|    940|    return state->role_none;
 1185|  13.9k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  13.9k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 13.9k, False: 1.08k]
  ------------------
 1186|  13.9k|    setTopLevel(state);
  ------------------
  |  |  116|  13.9k|    ((state)->handler                                                          \
  |  |  117|  13.9k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 13.9k, False: 0]
  |  |  ------------------
  ------------------
 1187|  13.9k|    return state->role_none;
 1188|  15.0k|  }
 1189|    143|  return common(state, tok);
 1190|  15.0k|}
xmlrole.c:entity2:
  452|  21.4k|        const ENCODING *enc) {
  453|  21.4k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 4, False: 21.4k]
  ------------------
  454|  10.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 10.7k, False: 10.6k]
  ------------------
  455|  10.7k|    return XML_ROLE_ENTITY_NONE;
  456|  3.55k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.55k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 3.55k, False: 17.8k]
  ------------------
  457|  3.55k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  3.55k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.13k, False: 2.42k]
  |  |  ------------------
  ------------------
  458|  1.13k|      state->handler = entity4;
  459|  1.13k|      return XML_ROLE_ENTITY_NONE;
  460|  1.13k|    }
  461|  2.42k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  2.42k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.41k, False: 5]
  |  |  ------------------
  ------------------
  462|  2.41k|      state->handler = entity3;
  463|  2.41k|      return XML_ROLE_ENTITY_NONE;
  464|  2.41k|    }
  465|      5|    break;
  466|  7.12k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  7.12k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 7.12k, False: 14.3k]
  ------------------
  467|  7.12k|    state->handler = declClose;
  468|  7.12k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  7.12k|    return XML_ROLE_ENTITY_VALUE;
  470|  21.4k|  }
  471|      9|  return common(state, tok);
  472|  21.4k|}
xmlrole.c:entity4:
  492|  7.02k|        const ENCODING *enc) {
  493|  7.02k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.02k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  7.02k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.02k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  7.02k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.02k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  7.02k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 7.01k]
  ------------------
  497|  3.52k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.52k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 3.52k, False: 3.50k]
  ------------------
  498|  3.52k|    return XML_ROLE_ENTITY_NONE;
  499|  3.49k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  3.49k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 3.49k, False: 3.53k]
  ------------------
  500|  3.49k|    state->handler = entity5;
  501|  3.49k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  7.02k|  }
  503|      8|  return common(state, tok);
  504|  7.02k|}
xmlrole.c:entity5:
  508|  4.71k|        const ENCODING *enc) {
  509|  4.71k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 4.71k]
  ------------------
  510|  1.23k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.23k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.23k, False: 3.48k]
  ------------------
  511|  1.23k|    return XML_ROLE_ENTITY_NONE;
  512|  2.93k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.93k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 2.93k, False: 1.78k]
  ------------------
  513|  2.93k|    setTopLevel(state);
  ------------------
  |  |  116|  2.93k|    ((state)->handler                                                          \
  |  |  117|  2.93k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 2.93k, False: 0]
  |  |  ------------------
  ------------------
  514|  2.93k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    549|  case XML_TOK_NAME:
  ------------------
  |  |   85|    549|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 549, False: 4.16k]
  ------------------
  516|    549|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    549|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 545, False: 4]
  |  |  ------------------
  ------------------
  517|    545|      state->handler = entity6;
  518|    545|      return XML_ROLE_ENTITY_NONE;
  519|    545|    }
  520|      4|    break;
  521|  4.71k|  }
  522|      5|  return common(state, tok);
  523|  4.71k|}
xmlrole.c:entity6:
  527|  1.08k|        const ENCODING *enc) {
  528|  1.08k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.08k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.08k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.08k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.08k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.08k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.08k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 2, False: 1.08k]
  ------------------
  532|    544|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    544|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 544, False: 543]
  ------------------
  533|    544|    return XML_ROLE_ENTITY_NONE;
  534|    541|  case XML_TOK_NAME:
  ------------------
  |  |   85|    541|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 541, False: 546]
  ------------------
  535|    541|    state->handler = declClose;
  536|    541|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    541|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.08k|  }
  539|      2|  return common(state, tok);
  540|  1.08k|}
xmlrole.c:entity3:
  476|  4.82k|        const ENCODING *enc) {
  477|  4.82k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.82k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  4.82k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.82k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  4.82k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.82k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  4.82k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 1, False: 4.82k]
  ------------------
  481|  2.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 2.41k, False: 2.41k]
  ------------------
  482|  2.41k|    return XML_ROLE_ENTITY_NONE;
  483|  2.41k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.41k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 2.41k, False: 2.41k]
  ------------------
  484|  2.41k|    state->handler = entity4;
  485|  2.41k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  4.82k|  }
  487|      1|  return common(state, tok);
  488|  4.82k|}
xmlrole.c:attlist0:
  705|  17.9k|         const ENCODING *enc) {
  706|  17.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  17.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  17.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.9k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  17.9k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 18, False: 17.9k]
  ------------------
  710|  8.98k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.98k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 8.98k, False: 8.96k]
  ------------------
  711|  8.98k|    return XML_ROLE_ATTLIST_NONE;
  712|  8.95k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.95k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 8.95k, False: 9.00k]
  ------------------
  713|  8.95k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  8.95k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 17.9k]
  ------------------
  714|  8.95k|    state->handler = attlist1;
  715|  8.95k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  17.9k|  }
  717|     18|  return common(state, tok);
  718|  17.9k|}
xmlrole.c:attlist1:
  722|  76.0k|         const ENCODING *enc) {
  723|  76.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  76.0k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  76.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  76.0k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  76.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  76.0k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  76.0k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 42, False: 75.9k]
  ------------------
  727|  34.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  34.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 34.0k, False: 42.0k]
  ------------------
  728|  34.0k|    return XML_ROLE_ATTLIST_NONE;
  729|  8.22k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  8.22k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 8.22k, False: 67.8k]
  ------------------
  730|  8.22k|    setTopLevel(state);
  ------------------
  |  |  116|  8.22k|    ((state)->handler                                                          \
  |  |  117|  8.22k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 8.22k, False: 0]
  |  |  ------------------
  ------------------
  731|  8.22k|    return XML_ROLE_ATTLIST_NONE;
  732|  33.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  33.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 33.7k, False: 42.2k]
  ------------------
  733|  33.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  33.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 76.0k]
  ------------------
  734|  33.7k|    state->handler = attlist2;
  735|  33.7k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  76.0k|  }
  737|     42|  return common(state, tok);
  738|  76.0k|}
xmlrole.c:attlist2:
  742|  67.4k|         const ENCODING *enc) {
  743|  67.4k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 23, False: 67.4k]
  ------------------
  744|  33.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  33.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 33.7k, False: 33.7k]
  ------------------
  745|  33.7k|    return XML_ROLE_ATTLIST_NONE;
  746|  9.43k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  9.43k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 9.43k, False: 58.0k]
  ------------------
  747|  9.43k|    static const char *const types[] = {
  748|  9.43k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  9.43k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  9.43k|    };
  751|  9.43k|    int i;
  752|  30.9k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 30.5k, False: 402]
  ------------------
  753|  30.5k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  30.5k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 9.03k, False: 21.4k]
  |  |  ------------------
  ------------------
  754|  9.03k|        state->handler = attlist8;
  755|  9.03k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  9.03k|      }
  757|  9.43k|  }
  758|    402|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    402|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 349, False: 53]
  |  |  ------------------
  ------------------
  759|    349|      state->handler = attlist5;
  760|    349|      return XML_ROLE_ATTLIST_NONE;
  761|    349|    }
  762|     53|    break;
  763|  24.2k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  24.2k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 24.2k, False: 43.2k]
  ------------------
  764|  24.2k|    state->handler = attlist3;
  765|  24.2k|    return XML_ROLE_ATTLIST_NONE;
  766|  67.4k|  }
  767|     76|  return common(state, tok);
  768|  67.4k|}
xmlrole.c:attlist8:
  861|  66.7k|         const ENCODING *enc) {
  862|  66.7k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 22, False: 66.7k]
  ------------------
  863|  33.3k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  33.3k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 33.3k, False: 33.3k]
  ------------------
  864|  33.3k|    return XML_ROLE_ATTLIST_NONE;
  865|  25.2k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  25.2k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 25.2k, False: 41.4k]
  ------------------
  866|  25.2k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  25.2k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 22.9k, False: 2.35k]
  |  |  ------------------
  ------------------
  867|  25.2k|                            KW_IMPLIED)) {
  868|  22.9k|      state->handler = attlist1;
  869|  22.9k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  22.9k|    }
  871|  2.35k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.35k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.41k, False: 932]
  |  |  ------------------
  ------------------
  872|  2.35k|                            KW_REQUIRED)) {
  873|  1.41k|      state->handler = attlist1;
  874|  1.41k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  1.41k|    }
  876|    932|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    932|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 923, False: 9]
  |  |  ------------------
  ------------------
  877|    932|                            KW_FIXED)) {
  878|    923|      state->handler = attlist9;
  879|    923|      return XML_ROLE_ATTLIST_NONE;
  880|    923|    }
  881|      9|    break;
  882|  8.04k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  8.04k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 8.04k, False: 58.6k]
  ------------------
  883|  8.04k|    state->handler = attlist1;
  884|  8.04k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  66.7k|  }
  886|     31|  return common(state, tok);
  887|  66.7k|}
xmlrole.c:attlist9:
  891|  1.83k|         const ENCODING *enc) {
  892|  1.83k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.83k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  1.83k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.83k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  1.83k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.83k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  1.83k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 23, False: 1.81k]
  ------------------
  896|    923|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    923|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 923, False: 911]
  ------------------
  897|    923|    return XML_ROLE_ATTLIST_NONE;
  898|    888|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    888|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 888, False: 946]
  ------------------
  899|    888|    state->handler = attlist1;
  900|    888|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  1.83k|  }
  902|     23|  return common(state, tok);
  903|  1.83k|}
xmlrole.c:attlist5:
  809|    694|         const ENCODING *enc) {
  810|    694|  UNUSED_P(ptr);
  ------------------
  |  |  135|    694|#  define UNUSED_P(p) (void)p
  ------------------
  811|    694|  UNUSED_P(end);
  ------------------
  |  |  135|    694|#  define UNUSED_P(p) (void)p
  ------------------
  812|    694|  UNUSED_P(enc);
  ------------------
  |  |  135|    694|#  define UNUSED_P(p) (void)p
  ------------------
  813|    694|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 693]
  ------------------
  814|    348|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    348|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 348, False: 346]
  ------------------
  815|    348|    return XML_ROLE_ATTLIST_NONE;
  816|    345|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    345|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 345, False: 349]
  ------------------
  817|    345|    state->handler = attlist6;
  818|    345|    return XML_ROLE_ATTLIST_NONE;
  819|    694|  }
  820|      1|  return common(state, tok);
  821|    694|}
xmlrole.c:attlist6:
  825|  1.18k|         const ENCODING *enc) {
  826|  1.18k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.18k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.18k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.18k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.18k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.18k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 7, False: 1.17k]
  ------------------
  830|    276|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    276|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 276, False: 906]
  ------------------
  831|    276|    return XML_ROLE_ATTLIST_NONE;
  832|    899|  case XML_TOK_NAME:
  ------------------
  |  |   85|    899|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 899, False: 283]
  ------------------
  833|    899|    state->handler = attlist7;
  834|    899|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.18k|  }
  836|      7|  return common(state, tok);
  837|  1.18k|}
xmlrole.c:attlist7:
  841|  1.15k|         const ENCODING *enc) {
  842|  1.15k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.15k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.15k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.15k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.15k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.15k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.15k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 2, False: 1.15k]
  ------------------
  846|    268|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    268|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 268, False: 891]
  ------------------
  847|    268|    return XML_ROLE_ATTLIST_NONE;
  848|    310|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    310|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 310, False: 849]
  ------------------
  849|    310|    state->handler = attlist8;
  850|    310|    return XML_ROLE_ATTLIST_NONE;
  851|    579|  case XML_TOK_OR:
  ------------------
  |  |   88|    579|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 579, False: 580]
  ------------------
  852|    579|    state->handler = attlist6;
  853|    579|    return XML_ROLE_ATTLIST_NONE;
  854|  1.15k|  }
  855|      2|  return common(state, tok);
  856|  1.15k|}
xmlrole.c:attlist3:
  772|  29.0k|         const ENCODING *enc) {
  773|  29.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  29.0k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  29.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  29.0k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  29.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  29.0k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  29.0k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 6, False: 29.0k]
  ------------------
  777|  1.11k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.11k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 1.11k, False: 27.9k]
  ------------------
  778|  1.11k|    return XML_ROLE_ATTLIST_NONE;
  779|  2.60k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  2.60k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 2.60k, False: 26.4k]
  ------------------
  780|  27.9k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  27.9k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 25.3k, False: 3.72k]
  ------------------
  781|  27.9k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  27.9k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 29.0k]
  ------------------
  782|  27.9k|    state->handler = attlist4;
  783|  27.9k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  29.0k|  }
  785|      6|  return common(state, tok);
  786|  29.0k|}
xmlrole.c:attlist4:
  790|  28.3k|         const ENCODING *enc) {
  791|  28.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  28.3k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  28.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  28.3k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  28.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  28.3k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  28.3k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 5, False: 28.3k]
  ------------------
  795|    476|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    476|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 476, False: 27.9k]
  ------------------
  796|    476|    return XML_ROLE_ATTLIST_NONE;
  797|  24.0k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  24.0k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 24.0k, False: 4.31k]
  ------------------
  798|  24.0k|    state->handler = attlist8;
  799|  24.0k|    return XML_ROLE_ATTLIST_NONE;
  800|  3.83k|  case XML_TOK_OR:
  ------------------
  |  |   88|  3.83k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 3.83k, False: 24.5k]
  ------------------
  801|  3.83k|    state->handler = attlist3;
  802|  3.83k|    return XML_ROLE_ATTLIST_NONE;
  803|  28.3k|  }
  804|      5|  return common(state, tok);
  805|  28.3k|}
xmlrole.c:element0:
  907|  10.9k|         const ENCODING *enc) {
  908|  10.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  10.9k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  10.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  10.9k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  10.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.9k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  10.9k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 5, False: 10.9k]
  ------------------
  912|  5.47k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.47k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 5.47k, False: 5.46k]
  ------------------
  913|  5.47k|    return XML_ROLE_ELEMENT_NONE;
  914|  5.46k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.46k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 5.46k, False: 5.47k]
  ------------------
  915|  5.46k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.46k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 10.9k]
  ------------------
  916|  5.46k|    state->handler = element1;
  917|  5.46k|    return XML_ROLE_ELEMENT_NAME;
  918|  10.9k|  }
  919|      5|  return common(state, tok);
  920|  10.9k|}
xmlrole.c:element1:
  924|  10.9k|         const ENCODING *enc) {
  925|  10.9k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 3, False: 10.9k]
  ------------------
  926|  5.46k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.46k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 5.46k, False: 5.45k]
  ------------------
  927|  5.46k|    return XML_ROLE_ELEMENT_NONE;
  928|     76|  case XML_TOK_NAME:
  ------------------
  |  |   85|     76|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 76, False: 10.8k]
  ------------------
  929|     76|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|     76|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 18, False: 58]
  |  |  ------------------
  ------------------
  930|     18|      state->handler = declClose;
  931|     18|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     18|      return XML_ROLE_CONTENT_EMPTY;
  933|     18|    }
  934|     58|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     58|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 52, False: 6]
  |  |  ------------------
  ------------------
  935|     52|      state->handler = declClose;
  936|     52|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     52|      return XML_ROLE_CONTENT_ANY;
  938|     52|    }
  939|      6|    break;
  940|  5.37k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  5.37k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 5.37k, False: 5.53k]
  ------------------
  941|  5.37k|    state->handler = element2;
  942|  5.37k|    state->level = 1;
  943|  5.37k|    return XML_ROLE_GROUP_OPEN;
  944|  10.9k|  }
  945|      9|  return common(state, tok);
  946|  10.9k|}
xmlrole.c:element2:
  950|  5.43k|         const ENCODING *enc) {
  951|  5.43k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 4, False: 5.43k]
  ------------------
  952|     71|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     71|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 71, False: 5.36k]
  ------------------
  953|     71|    return XML_ROLE_ELEMENT_NONE;
  954|  1.71k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  1.71k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 1.71k, False: 3.72k]
  ------------------
  955|  1.71k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.71k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.70k, False: 6]
  |  |  ------------------
  ------------------
  956|  1.71k|                            KW_PCDATA)) {
  957|  1.70k|      state->handler = element3;
  958|  1.70k|      return XML_ROLE_CONTENT_PCDATA;
  959|  1.70k|    }
  960|      6|    break;
  961|    345|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    345|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 345, False: 5.09k]
  ------------------
  962|    345|    state->level = 2;
  963|    345|    state->handler = element6;
  964|    345|    return XML_ROLE_GROUP_OPEN;
  965|    779|  case XML_TOK_NAME:
  ------------------
  |  |   85|    779|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 779, False: 4.65k]
  ------------------
  966|    779|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    779|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 5.43k]
  ------------------
  967|    779|    state->handler = element7;
  968|    779|    return XML_ROLE_CONTENT_ELEMENT;
  969|     25|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|     25|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 25, False: 5.41k]
  ------------------
  970|     25|    state->handler = element7;
  971|     25|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|  1.60k|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|  1.60k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 1.60k, False: 3.83k]
  ------------------
  973|  1.60k|    state->handler = element7;
  974|  1.60k|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    898|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    898|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 898, False: 4.54k]
  ------------------
  976|    898|    state->handler = element7;
  977|    898|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  5.43k|  }
  979|     10|  return common(state, tok);
  980|  5.43k|}
xmlrole.c:element3:
  984|  2.35k|         const ENCODING *enc) {
  985|  2.35k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  2.35k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  2.35k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  2.35k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 8, False: 2.34k]
  ------------------
  989|    660|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    660|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 660, False: 1.69k]
  ------------------
  990|    660|    return XML_ROLE_ELEMENT_NONE;
  991|    681|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    681|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 681, False: 1.67k]
  ------------------
  992|    681|    state->handler = declClose;
  993|    681|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    681|    return XML_ROLE_GROUP_CLOSE;
  995|    154|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    154|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 154, False: 2.20k]
  ------------------
  996|    154|    state->handler = declClose;
  997|    154|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    154|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    853|  case XML_TOK_OR:
  ------------------
  |  |   88|    853|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 853, False: 1.50k]
  ------------------
 1000|    853|    state->handler = element4;
 1001|    853|    return XML_ROLE_ELEMENT_NONE;
 1002|  2.35k|  }
 1003|      8|  return common(state, tok);
 1004|  2.35k|}
xmlrole.c:element4:
 1008|  2.24k|         const ENCODING *enc) {
 1009|  2.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  2.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  2.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  2.24k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 18, False: 2.22k]
  ------------------
 1013|    297|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    297|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 297, False: 1.94k]
  ------------------
 1014|    297|    return XML_ROLE_ELEMENT_NONE;
 1015|  1.92k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.92k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 1.92k, False: 315]
  ------------------
 1016|  1.92k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.92k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 2.24k]
  ------------------
 1017|  1.92k|    state->handler = element5;
 1018|  1.92k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  2.24k|  }
 1020|     18|  return common(state, tok);
 1021|  2.24k|}
xmlrole.c:element5:
 1025|  2.25k|         const ENCODING *enc) {
 1026|  2.25k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  2.25k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  2.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  2.25k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 2, False: 2.25k]
  ------------------
 1030|    338|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    338|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 338, False: 1.91k]
  ------------------
 1031|    338|    return XML_ROLE_ELEMENT_NONE;
 1032|    799|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    799|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 799, False: 1.45k]
  ------------------
 1033|    799|    state->handler = declClose;
 1034|    799|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    799|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|  1.11k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.11k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 1.11k, False: 1.13k]
  ------------------
 1037|  1.11k|    state->handler = element4;
 1038|  1.11k|    return XML_ROLE_ELEMENT_NONE;
 1039|  2.25k|  }
 1040|      2|  return common(state, tok);
 1041|  2.25k|}
xmlrole.c:element6:
 1045|  3.59M|         const ENCODING *enc) {
 1046|  3.59M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.59M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  3.59M|  UNUSED_P(end);
  ------------------
  |  |  135|  3.59M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  3.59M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.59M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  3.59M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 42, False: 3.59M]
  ------------------
 1050|  25.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  25.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 25.6k, False: 3.57M]
  ------------------
 1051|  25.6k|    return XML_ROLE_ELEMENT_NONE;
 1052|  3.55M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.55M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 3.55M, False: 45.7k]
  ------------------
 1053|  3.55M|    state->level += 1;
 1054|  3.55M|    return XML_ROLE_GROUP_OPEN;
 1055|  17.6k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  17.6k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 17.6k, False: 3.57M]
  ------------------
 1056|  17.6k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  17.6k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 3.59M]
  ------------------
 1057|  17.6k|    state->handler = element7;
 1058|  17.6k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|    329|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    329|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 329, False: 3.59M]
  ------------------
 1060|    329|    state->handler = element7;
 1061|    329|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|  1.77k|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|  1.77k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 1.77k, False: 3.59M]
  ------------------
 1063|  1.77k|    state->handler = element7;
 1064|  1.77k|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|    315|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    315|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 315, False: 3.59M]
  ------------------
 1066|    315|    state->handler = element7;
 1067|    315|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  3.59M|  }
 1069|     42|  return common(state, tok);
 1070|  3.59M|}
xmlrole.c:element7:
 1074|  71.2k|         const ENCODING *enc) {
 1075|  71.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  71.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|  71.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  71.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|  71.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  71.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|  71.2k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 53, False: 71.1k]
  ------------------
 1079|  4.37k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.37k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 4.37k, False: 66.8k]
  ------------------
 1080|  4.37k|    return XML_ROLE_ELEMENT_NONE;
 1081|  11.4k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  11.4k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 11.4k, False: 59.8k]
  ------------------
 1082|  11.4k|    state->level -= 1;
 1083|  11.4k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 2.68k, False: 8.72k]
  ------------------
 1084|  2.68k|      state->handler = declClose;
 1085|  2.68k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  2.68k|    }
 1087|  11.4k|    return XML_ROLE_GROUP_CLOSE;
 1088|  1.25k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.25k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 1.25k, False: 69.9k]
  ------------------
 1089|  1.25k|    state->level -= 1;
 1090|  1.25k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 297, False: 960]
  ------------------
 1091|    297|      state->handler = declClose;
 1092|    297|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    297|    }
 1094|  1.25k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  11.6k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  11.6k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 11.6k, False: 59.5k]
  ------------------
 1096|  11.6k|    state->level -= 1;
 1097|  11.6k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 251, False: 11.3k]
  ------------------
 1098|    251|      state->handler = declClose;
 1099|    251|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    251|    }
 1101|  11.6k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  22.5k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  22.5k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 22.5k, False: 48.6k]
  ------------------
 1103|  22.5k|    state->level -= 1;
 1104|  22.5k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 30, False: 22.5k]
  ------------------
 1105|     30|      state->handler = declClose;
 1106|     30|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|     30|    }
 1108|  22.5k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  14.6k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  14.6k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 14.6k, False: 56.5k]
  ------------------
 1110|  14.6k|    state->handler = element6;
 1111|  14.6k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  5.23k|  case XML_TOK_OR:
  ------------------
  |  |   88|  5.23k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 5.23k, False: 65.9k]
  ------------------
 1113|  5.23k|    state->handler = element6;
 1114|  5.23k|    return XML_ROLE_GROUP_CHOICE;
 1115|  71.2k|  }
 1116|     53|  return common(state, tok);
 1117|  71.2k|}
xmlrole.c:notation0:
  616|  2.41k|          const ENCODING *enc) {
  617|  2.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.41k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  2.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.41k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  2.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.41k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  2.41k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 1, False: 2.41k]
  ------------------
  621|  1.21k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.21k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.21k, False: 1.20k]
  ------------------
  622|  1.21k|    return XML_ROLE_NOTATION_NONE;
  623|  1.20k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.20k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.20k, False: 1.21k]
  ------------------
  624|  1.20k|    state->handler = notation1;
  625|  1.20k|    return XML_ROLE_NOTATION_NAME;
  626|  2.41k|  }
  627|      1|  return common(state, tok);
  628|  2.41k|}
xmlrole.c:notation1:
  632|  2.39k|          const ENCODING *enc) {
  633|  2.39k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 4, False: 2.39k]
  ------------------
  634|  1.20k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.20k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.20k, False: 1.19k]
  ------------------
  635|  1.20k|    return XML_ROLE_NOTATION_NONE;
  636|  1.19k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.19k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.19k, False: 1.20k]
  ------------------
  637|  1.19k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.19k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 39, False: 1.15k]
  |  |  ------------------
  ------------------
  638|     39|      state->handler = notation3;
  639|     39|      return XML_ROLE_NOTATION_NONE;
  640|     39|    }
  641|  1.15k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.15k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.15k, False: 3]
  |  |  ------------------
  ------------------
  642|  1.15k|      state->handler = notation2;
  643|  1.15k|      return XML_ROLE_NOTATION_NONE;
  644|  1.15k|    }
  645|      3|    break;
  646|  2.39k|  }
  647|      7|  return common(state, tok);
  648|  2.39k|}
xmlrole.c:notation3:
  668|     75|          const ENCODING *enc) {
  669|     75|  UNUSED_P(ptr);
  ------------------
  |  |  135|     75|#  define UNUSED_P(p) (void)p
  ------------------
  670|     75|  UNUSED_P(end);
  ------------------
  |  |  135|     75|#  define UNUSED_P(p) (void)p
  ------------------
  671|     75|  UNUSED_P(enc);
  ------------------
  |  |  135|     75|#  define UNUSED_P(p) (void)p
  ------------------
  672|     75|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 3, False: 72]
  ------------------
  673|     39|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     39|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 39, False: 36]
  ------------------
  674|     39|    return XML_ROLE_NOTATION_NONE;
  675|     33|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     33|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 33, False: 42]
  ------------------
  676|     33|    state->handler = declClose;
  677|     33|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|     33|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|     75|  }
  680|      3|  return common(state, tok);
  681|     75|}
xmlrole.c:notation2:
  652|  2.29k|          const ENCODING *enc) {
  653|  2.29k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.29k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.29k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.29k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 3, False: 2.29k]
  ------------------
  657|  1.14k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.14k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.14k, False: 1.14k]
  ------------------
  658|  1.14k|    return XML_ROLE_NOTATION_NONE;
  659|  1.14k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.14k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.14k, False: 1.15k]
  ------------------
  660|  1.14k|    state->handler = notation4;
  661|  1.14k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.29k|  }
  663|      3|  return common(state, tok);
  664|  2.29k|}
xmlrole.c:notation4:
  685|  1.89k|          const ENCODING *enc) {
  686|  1.89k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.89k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  1.89k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.89k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  1.89k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.89k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  1.89k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 2, False: 1.89k]
  ------------------
  690|    762|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    762|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 762, False: 1.13k]
  ------------------
  691|    762|    return XML_ROLE_NOTATION_NONE;
  692|    395|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    395|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 395, False: 1.50k]
  ------------------
  693|    395|    state->handler = declClose;
  694|    395|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    395|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    738|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    738|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 738, False: 1.15k]
  ------------------
  697|    738|    setTopLevel(state);
  ------------------
  |  |  116|    738|    ((state)->handler                                                          \
  |  |  117|    738|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 738, False: 0]
  |  |  ------------------
  ------------------
  698|    738|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  1.89k|  }
  700|      2|  return common(state, tok);
  701|  1.89k|}
xmlrole.c:doctype5:
  319|  2.18k|         const ENCODING *enc) {
  320|  2.18k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.18k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.18k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.18k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 7, False: 2.17k]
  ------------------
  324|     22|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     22|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 22, False: 2.16k]
  ------------------
  325|     22|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.15k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.15k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.15k, False: 29]
  ------------------
  327|  2.15k|    state->handler = prolog2;
  328|  2.15k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.18k|  }
  330|      7|  return common(state, tok);
  331|  2.18k|}
xmlrole.c:prolog2:
  205|  3.12k|        const ENCODING *enc) {
  206|  3.12k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.12k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.12k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.12k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.12k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.12k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.12k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 17, False: 3.11k]
  ------------------
  210|    426|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    426|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 426, False: 2.70k]
  ------------------
  211|    426|    return XML_ROLE_NONE;
  212|    334|  case XML_TOK_PI:
  ------------------
  |  |   76|    334|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 334, False: 2.79k]
  ------------------
  213|    334|    return XML_ROLE_PI;
  214|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 194, False: 2.93k]
  ------------------
  215|    194|    return XML_ROLE_COMMENT;
  216|  2.15k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.15k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.15k, False: 971]
  ------------------
  217|  2.15k|    state->handler = error;
  218|  2.15k|    return XML_ROLE_INSTANCE_START;
  219|  3.12k|  }
  220|     17|  return common(state, tok);
  221|  3.12k|}
xmlrole.c:doctype3:
  284|    612|         const ENCODING *enc) {
  285|    612|  UNUSED_P(ptr);
  ------------------
  |  |  135|    612|#  define UNUSED_P(p) (void)p
  ------------------
  286|    612|  UNUSED_P(end);
  ------------------
  |  |  135|    612|#  define UNUSED_P(p) (void)p
  ------------------
  287|    612|  UNUSED_P(enc);
  ------------------
  |  |  135|    612|#  define UNUSED_P(p) (void)p
  ------------------
  288|    612|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 176, False: 436]
  ------------------
  289|    388|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    388|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 388, False: 224]
  ------------------
  290|    388|    return XML_ROLE_DOCTYPE_NONE;
  291|     48|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     48|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 48, False: 564]
  ------------------
  292|     48|    state->handler = doctype4;
  293|     48|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    612|  }
  295|    176|  return common(state, tok);
  296|    612|}
xmlrole.c:doctype4:
  300|     59|         const ENCODING *enc) {
  301|     59|  UNUSED_P(ptr);
  ------------------
  |  |  135|     59|#  define UNUSED_P(p) (void)p
  ------------------
  302|     59|  UNUSED_P(end);
  ------------------
  |  |  135|     59|#  define UNUSED_P(p) (void)p
  ------------------
  303|     59|  UNUSED_P(enc);
  ------------------
  |  |  135|     59|#  define UNUSED_P(p) (void)p
  ------------------
  304|     59|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 12, False: 47]
  ------------------
  305|     24|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     24|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 24, False: 35]
  ------------------
  306|     24|    return XML_ROLE_DOCTYPE_NONE;
  307|     12|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|     12|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 12, False: 47]
  ------------------
  308|     12|    state->handler = internalSubset;
  309|     12|    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: 48]
  ------------------
  311|     11|    state->handler = prolog2;
  312|     11|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     59|  }
  314|     12|  return common(state, tok);
  315|     59|}
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: 7, False: 1.45k]
  ------------------
  273|    732|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    732|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 732, False: 726]
  ------------------
  274|    732|    return XML_ROLE_DOCTYPE_NONE;
  275|    719|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    719|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 719, False: 739]
  ------------------
  276|    719|    state->handler = doctype3;
  277|    719|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.45k|  }
  279|      7|  return common(state, tok);
  280|  1.45k|}
xmlrole.c:common:
 1225|  1.40k|common(PROLOG_STATE *state, int tok) {
 1226|  1.40k|#ifdef XML_DTD
 1227|  1.40k|  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.40k]
  |  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.40k|  state->handler = error;
 1233|  1.40k|  return XML_ROLE_ERROR;
 1234|  1.40k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  6.93M|                                           const char **fromLimRef) {
  328|  6.93M|  const char *fromLim = *fromLimRef;
  329|  6.93M|  size_t walked = 0;
  330|  11.1M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 11.1M, False: 5.25k]
  ------------------
  331|  11.1M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  11.1M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 132k, False: 11.0M]
  ------------------
  333|  11.1M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   132k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 132k, False: 323]
  ------------------
  335|   132k|        fromLim += 4 - 1;
  336|   132k|        break;
  337|   132k|      } else {
  338|    323|        walked = 0;
  339|    323|      }
  340|  11.0M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 1.89M, False: 9.15M]
  ------------------
  341|  11.0M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  1.89M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 1.89M, False: 1.18k]
  ------------------
  343|  1.89M|        fromLim += 3 - 1;
  344|  1.89M|        break;
  345|  1.89M|      } else {
  346|  1.18k|        walked = 0;
  347|  1.18k|      }
  348|  9.15M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 63.6k, False: 9.09M]
  ------------------
  349|  9.15M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  63.6k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 63.4k, False: 215]
  ------------------
  351|  63.4k|        fromLim += 2 - 1;
  352|  63.4k|        break;
  353|  63.4k|      } else {
  354|    215|        walked = 0;
  355|    215|      }
  356|  9.09M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 4.84M, False: 4.25M]
  ------------------
  357|  9.09M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  4.84M|      break;
  359|  4.84M|    }
  360|  11.1M|  }
  361|  6.93M|  *fromLimRef = fromLim;
  362|  6.93M|}
XmlUtf8Encode:
 1255|  23.4k|XmlUtf8Encode(int c, char *buf) {
 1256|  23.4k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  23.4k|    min2 = 0x80,
 1259|  23.4k|    min3 = 0x800,
 1260|  23.4k|    min4 = 0x10000
 1261|  23.4k|  };
 1262|       |
 1263|  23.4k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 23.4k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  23.4k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 1.76k, False: 21.6k]
  ------------------
 1266|  1.76k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  1.76k|    return 1;
 1268|  1.76k|  }
 1269|  21.6k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 16.7k, False: 4.94k]
  ------------------
 1270|  16.7k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  16.7k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  16.7k|    return 2;
 1273|  16.7k|  }
 1274|  4.94k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 3.95k, False: 987]
  ------------------
 1275|  3.95k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  3.95k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  3.95k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  3.95k|    return 3;
 1279|  3.95k|  }
 1280|    987|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 987, False: 0]
  ------------------
 1281|    987|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|    987|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|    987|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|    987|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|    987|    return 4;
 1286|    987|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|    987|}
xmltok.c:checkCharRefNumber:
 1231|  29.8k|checkCharRefNumber(int result) {
 1232|  29.8k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 22.4k, False: 7.40k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 29.8k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 29.8k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 29.8k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 29.8k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 29.8k]
  ------------------
 1238|     25|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 10, False: 29.8k]
  ------------------
 1239|     28|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 29.8k]
  ------------------
 1240|     31|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 29.8k]
  ------------------
 1241|     31|    return -1;
 1242|  6.09k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 6.09k, False: 23.7k]
  ------------------
 1243|  6.09k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 125, False: 5.97k]
  ------------------
 1244|    125|      return -1;
 1245|  5.97k|    break;
 1246|  5.97k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.28k, False: 28.5k]
  ------------------
 1247|  1.28k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 1.27k]
  |  Branch (1247:29): [True: 8, False: 1.26k]
  ------------------
 1248|     11|      return -1;
 1249|  1.26k|    break;
 1250|  29.8k|  }
 1251|  29.6k|  return result;
 1252|  29.8k|}
xmltok.c:utf8_toUtf8:
  366|  6.93M|            char **toP, const char *toLim) {
  367|  6.93M|  bool input_incomplete = false;
  368|  6.93M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  6.93M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  6.93M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  6.93M|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.93M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  6.93M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 12.6k, False: 6.92M]
  ------------------
  375|  12.6k|    fromLim = *fromP + bytesStorable;
  376|  12.6k|    output_exhausted = true;
  377|  12.6k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  6.93M|  {
  381|  6.93M|    const char *const fromLimBefore = fromLim;
  382|  6.93M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  6.93M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.72k, False: 6.93M]
  ------------------
  384|  1.72k|      input_incomplete = true;
  385|  1.72k|    }
  386|  6.93M|  }
  387|       |
  388|  6.93M|  {
  389|  6.93M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  6.93M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  6.93M|    *fromP += bytesToCopy;
  392|  6.93M|    *toP += bytesToCopy;
  393|  6.93M|  }
  394|       |
  395|  6.93M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 12.6k, False: 6.92M]
  ------------------
  396|  12.6k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  6.92M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 6.92M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  6.92M|  else
  400|  6.92M|    return XML_CONVERT_COMPLETED;
  401|  6.93M|}
xmltok.c:utf8_isName2:
  140|  96.1k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  96.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  96.1k|#  define UNUSED_P(p) (void)p
  ------------------
  142|  96.1k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  96.1k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  96.1k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  96.1k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  96.1k|}
xmltok.c:utf8_isName3:
  146|   577k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|   577k|  UNUSED_P(enc);
  ------------------
  |  |  135|   577k|#  define UNUSED_P(p) (void)p
  ------------------
  148|   577k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|   577k|  (namingBitmap                                                                \
  |  |   97|   577k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|   577k|         << 3)                                                                 \
  |  |   99|   577k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|   577k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|   577k|}
xmltok.c:isNever:
  133|    111|isNever(const ENCODING *enc, const char *p) {
  134|    111|  UNUSED_P(enc);
  ------------------
  |  |  135|    111|#  define UNUSED_P(p) (void)p
  ------------------
  135|    111|  UNUSED_P(p);
  ------------------
  |  |  135|    111|#  define UNUSED_P(p) (void)p
  ------------------
  136|    111|  return 0;
  137|    111|}
xmltok.c:utf8_isNmstrt2:
  154|  85.8k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|  85.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  85.8k|#  define UNUSED_P(p) (void)p
  ------------------
  156|  85.8k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|  85.8k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  85.8k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  85.8k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|  85.8k|}
xmltok.c:utf8_isNmstrt3:
  160|  4.00k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  4.00k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.00k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  4.00k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  4.00k|  (namingBitmap                                                                \
  |  |   97|  4.00k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  4.00k|         << 3)                                                                 \
  |  |   99|  4.00k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  4.00k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  4.00k|}
xmltok.c:utf8_isInvalid2:
  168|   250k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   250k|  UNUSED_P(enc);
  ------------------
  |  |  135|   250k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   250k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   250k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 27, False: 250k]
  |  |  |  Branch (113:19): [True: 84, False: 250k]
  |  |  |  Branch (113:43): [True: 68, False: 250k]
  |  |  ------------------
  ------------------
  171|   250k|}
xmltok.c:utf8_isInvalid3:
  174|  22.6M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  22.6M|  UNUSED_P(enc);
  ------------------
  |  |  135|  22.6M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  22.6M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  22.6M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 74, False: 22.6M]
  |  |  ------------------
  |  |  117|  22.6M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 46, False: 22.6M]
  |  |  |  Branch (117:8): [True: 103k, False: 22.5M]
  |  |  |  Branch (117:24): [True: 3.81k, False: 100k]
  |  |  ------------------
  |  |  118|  22.6M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  22.6M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 47, False: 22.6M]
  |  |  |  Branch (119:8): [True: 1.02M, False: 21.6M]
  |  |  ------------------
  |  |  120|  22.6M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 10, False: 1.02M]
  |  |  |  Branch (120:31): [True: 9, False: 1.02M]
  |  |  ------------------
  |  |  121|  22.6M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 18, False: 21.6M]
  |  |  ------------------
  |  |  122|  21.6M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 10, False: 21.6M]
  |  |  |  Branch (122:22): [True: 336k, False: 21.2M]
  |  |  ------------------
  ------------------
  177|  22.6M|}
xmltok.c:utf8_isInvalid4:
  180|  50.5k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  50.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  50.5k|#  define UNUSED_P(p) (void)p
  ------------------
  182|  50.5k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  50.5k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 133, False: 50.4k]
  |  |  |  Branch (125:28): [True: 66, False: 50.3k]
  |  |  |  Branch (125:55): [True: 11, False: 50.3k]
  |  |  ------------------
  |  |  126|  50.5k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 10, False: 50.3k]
  |  |  ------------------
  |  |  127|  50.5k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 52, False: 50.2k]
  |  |  |  Branch (127:8): [True: 2.80k, False: 47.5k]
  |  |  ------------------
  |  |  128|  50.3k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 12, False: 2.79k]
  |  |  |  Branch (128:31): [True: 14, False: 2.78k]
  |  |  ------------------
  |  |  129|  50.3k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 6, False: 47.5k]
  |  |  ------------------
  |  |  130|  47.5k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 20, False: 47.5k]
  |  |  |  Branch (130:22): [True: 7.38k, False: 40.1k]
  |  |  ------------------
  ------------------
  183|  50.5k|}
xmltok.c:unicode_byte_type:
  595|   140M|unicode_byte_type(char hi, char lo) {
  596|   140M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 139M, False: 791k]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   100k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 100k, False: 140M]
  ------------------
  599|   408k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 307k, False: 139M]
  ------------------
  600|   512k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 103k, False: 140M]
  ------------------
  601|   674k|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 162k, False: 139M]
  ------------------
  602|   674k|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     92|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 92, False: 140M]
  ------------------
  605|    195|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 103, False: 140M]
  ------------------
  606|    295|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 100, False: 140M]
  ------------------
  607|    390|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 95, False: 140M]
  ------------------
  608|    390|    return BT_TRAIL;
  609|   116k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 116k, False: 140M]
  ------------------
  610|   116k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 116k, False: 186]
  ------------------
  611|    174|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 174, False: 116k]
  ------------------
  612|    186|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 12, False: 116k]
  ------------------
  613|    186|      return BT_NONXML;
  614|   116k|    }
  615|   116k|    break;
  616|   140M|  }
  617|   139M|  return BT_NONASCII;
  618|   140M|}
xmltok.c:little2_toUtf8:
  623|   224k|      char **toP, const char *toLim) {                                         \
  624|   224k|    const char *from = *fromP;                                                 \
  625|   224k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   224k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   224k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  16.5M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 16.3M, False: 221k]
  ------------------
  628|  16.3M|      int plane;                                                               \
  629|  16.3M|      unsigned char lo2;                                                       \
  630|  16.3M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  16.3M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  16.3M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  16.3M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  16.3M|      switch (hi) {                                                            \
  633|   296k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 296k, False: 16.0M]
  ------------------
  634|   296k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 274k, False: 22.0k]
  ------------------
  635|   274k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 367, False: 274k]
  ------------------
  636|    367|            *fromP = from;                                                     \
  637|    367|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    367|          }                                                                    \
  639|   274k|          *(*toP)++ = lo;                                                      \
  640|   274k|          break;                                                               \
  641|   274k|        }                                                                      \
  642|   296k|        /* fall through */                                                     \
  643|   296k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.16k, False: 16.3M]
  ------------------
  644|  30.9k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 1.65k, False: 16.3M]
  ------------------
  645|  34.0k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 3.09k, False: 16.3M]
  ------------------
  646|  35.7k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 1.76k, False: 16.3M]
  ------------------
  647|  40.5k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 4.81k, False: 16.3M]
  ------------------
  648|  81.1k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 40.5k, False: 16.2M]
  ------------------
  649|  84.2k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 3.14k, False: 16.3M]
  ------------------
  650|  84.2k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 248, False: 84.0k]
  ------------------
  651|    248|          *fromP = from;                                                       \
  652|    248|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    248|        }                                                                      \
  654|  84.2k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  84.0k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  84.0k|        break;                                                                 \
  657|  15.8M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 15.8M, False: 462k]
  ------------------
  658|  15.8M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.85k, False: 15.8M]
  ------------------
  659|  1.85k|          *fromP = from;                                                       \
  660|  1.85k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.85k|        }                                                                      \
  662|  15.8M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  15.8M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  15.8M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  15.8M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  15.8M|        break;                                                                 \
  667|  15.8M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 13.5k, False: 16.3M]
  ------------------
  668|  88.0k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 74.5k, False: 16.2M]
  ------------------
  669|  97.9k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 9.82k, False: 16.3M]
  ------------------
  670|   103k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 6.09k, False: 16.3M]
  ------------------
  671|   103k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 225, False: 103k]
  ------------------
  672|    225|          *fromP = from;                                                       \
  673|    225|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    225|        }                                                                      \
  675|   103k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 103k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   103k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   103k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   103k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   103k|        from += 2;                                                             \
  683|   103k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   103k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   103k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   103k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   103k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   103k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   103k|        break;                                                                 \
  688|  16.3M|      }                                                                        \
  689|  16.3M|    }                                                                          \
  690|   224k|    *fromP = from;                                                             \
  691|   221k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 221k]
  ------------------
  692|   221k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   221k|    else                                                                       \
  694|   221k|      return XML_CONVERT_COMPLETED;                                            \
  695|   221k|  }
xmltok.c:getEncodingIndex:
 1502|  39.2k|getEncodingIndex(const char *name) {
 1503|  39.2k|  static const char *const encodingNames[] = {
 1504|  39.2k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.2k|  };
 1506|  39.2k|  int i;
 1507|  39.2k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.5k, False: 19.6k]
  ------------------
 1508|  19.5k|    return NO_ENC;
 1509|   117k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 117k, False: 40]
  ------------------
 1510|   117k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.5k, False: 98.2k]
  ------------------
 1511|  19.5k|      return i;
 1512|     40|  return UNKNOWN_ENC;
 1513|  19.6k|}
xmltok.c:streqci:
 1005|   117k|streqci(const char *s1, const char *s2) {
 1006|   607k|  for (;;) {
 1007|   607k|    char c1 = *s1++;
 1008|   607k|    char c2 = *s2++;
 1009|   607k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   607k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    160|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 160, False: 607k]
  |  Branch (1009:26): [True: 160, False: 0]
  ------------------
 1010|    160|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    160|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    160|#define ASCII_a 0x61
  ------------------
 1011|   607k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   607k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 607k]
  |  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|   607k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 98.2k, False: 509k]
  ------------------
 1018|  98.2k|      return 0;
 1019|   509k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.5k, False: 490k]
  ------------------
 1020|  19.5k|      break;
 1021|   509k|  }
 1022|  19.5k|  return 1;
 1023|   117k|}
xmltok.c:initScan:
 1531|  19.5k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.5k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.5k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.5k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.5k|  encPtr = enc->encPtr;
 1537|  19.5k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 19, False: 19.5k]
  ------------------
 1538|       |    /* only a single byte available for auto-detection */
 1539|       |#ifndef XML_DTD /* FIXME */
 1540|       |    /* a well-formed document entity must have more than one byte */
 1541|       |    if (state != XML_CONTENT_STATE)
 1542|       |      return XML_TOK_PARTIAL;
 1543|       |#endif
 1544|       |    /* so we're parsing an external text entity... */
 1545|       |    /* if UTF-16 was externally specified, then we need at least 2 bytes */
 1546|     19|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     19|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 19]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 19]
  ------------------
 1548|     19|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 19, False: 0]
  ------------------
 1549|     19|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 19]
  ------------------
 1550|     19|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     19|    }
 1552|      0|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 0, False: 0]
  ------------------
 1553|      0|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 0, False: 0]
  ------------------
 1554|      0|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 0, False: 0]
  ------------------
 1555|      0|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 0, False: 0]
  ------------------
 1556|      0|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 0, False: 0]
  |  Branch (1556:52): [True: 0, False: 0]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      0|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 0, False: 0]
  ------------------
 1560|      0|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 0, False: 0]
  ------------------
 1561|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|      0|    }
 1563|  19.5k|  } else {
 1564|  19.5k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      4|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 4, False: 19.5k]
  ------------------
 1566|      4|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      4|#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: 4]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      4|      *nextTokPtr = ptr + 2;
 1569|      4|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      4|      return XML_TOK_BOM;
  ------------------
  |  |   79|      4|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.11k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.11k, False: 14.4k]
  ------------------
 1573|  5.11k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.11k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 5.11k]
  ------------------
 1574|  5.11k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  5.11k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 5.11k]
  ------------------
 1575|  5.11k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  5.11k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.11k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.11k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      2|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 2, False: 19.5k]
  ------------------
 1580|      2|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      2|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 0, False: 2]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|      2|      *nextTokPtr = ptr + 2;
 1583|      2|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      2|      return XML_TOK_BOM;
  ------------------
  |  |   79|      2|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  7.16k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 7.16k, False: 12.4k]
  ------------------
 1586|       |      /* Maybe a UTF-8 BOM (EF BB BF) */
 1587|       |      /* If there's an explicitly specified (external) encoding
 1588|       |         of ISO-8859-1 or some flavour of UTF-16
 1589|       |         and this is an external text entity,
 1590|       |         don't look for the BOM,
 1591|       |         because it might be a legal data.
 1592|       |      */
 1593|  7.16k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  7.16k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 7.16k]
  ------------------
 1594|      0|        int e = INIT_ENC_INDEX(enc);
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1595|      0|        if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  |  Branch (1595:36): [True: 0, False: 0]
  |  Branch (1595:57): [True: 0, False: 0]
  ------------------
 1596|      0|            || e == UTF_16_ENC)
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|          break;
 1598|      0|      }
 1599|  7.16k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 7.16k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  7.16k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 7.14k, False: 27]
  ------------------
 1602|  7.14k|        *nextTokPtr = ptr + 3;
 1603|  7.14k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  7.14k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  7.14k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  7.14k|      }
 1606|     27|      break;
 1607|  7.28k|    default:
  ------------------
  |  Branch (1607:5): [True: 7.28k, False: 12.2k]
  ------------------
 1608|  7.28k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.29k, False: 998]
  ------------------
 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.29k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.5k|#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.29k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.29k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.29k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.29k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.29k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 814, False: 184]
  ------------------
 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|    814|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    814|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 814]
  ------------------
 1630|      0|          break;
 1631|    814|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    814|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    814|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    814|      }
 1634|    184|      break;
 1635|  19.5k|    }
 1636|  19.5k|  }
 1637|    211|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    211|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    211|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    211|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.5k|}
xmltok.c:big2_toUtf8:
  623|   172k|      char **toP, const char *toLim) {                                         \
  624|   172k|    const char *from = *fromP;                                                 \
  625|   172k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   172k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   172k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  36.3M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 36.1M, False: 167k]
  ------------------
  628|  36.1M|      int plane;                                                               \
  629|  36.1M|      unsigned char lo2;                                                       \
  630|  36.1M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  36.1M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  36.1M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  36.1M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  36.1M|      switch (hi) {                                                            \
  633|   342k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 342k, False: 35.8M]
  ------------------
  634|   342k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 308k, False: 33.7k]
  ------------------
  635|   308k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 602, False: 307k]
  ------------------
  636|    602|            *fromP = from;                                                     \
  637|    602|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    602|          }                                                                    \
  639|   308k|          *(*toP)++ = lo;                                                      \
  640|   307k|          break;                                                               \
  641|   308k|        }                                                                      \
  642|   342k|        /* fall through */                                                     \
  643|   342k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.66k, False: 36.1M]
  ------------------
  644|  44.2k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 2.84k, False: 36.1M]
  ------------------
  645|  49.7k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 5.58k, False: 36.1M]
  ------------------
  646|  53.0k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 3.28k, False: 36.1M]
  ------------------
  647|  54.4k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.38k, False: 36.1M]
  ------------------
  648|  57.4k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 2.93k, False: 36.1M]
  ------------------
  649|  58.7k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.31k, False: 36.1M]
  ------------------
  650|  58.7k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 279, False: 58.4k]
  ------------------
  651|    279|          *fromP = from;                                                       \
  652|    279|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    279|        }                                                                      \
  654|  58.7k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  58.4k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  58.4k|        break;                                                                 \
  657|  35.7M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 35.7M, False: 429k]
  ------------------
  658|  35.7M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.87k, False: 35.7M]
  ------------------
  659|  3.87k|          *fromP = from;                                                       \
  660|  3.87k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.87k|        }                                                                      \
  662|  35.7M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  35.7M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  35.7M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  35.7M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  35.7M|        break;                                                                 \
  667|  35.7M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 15.8k, False: 36.1M]
  ------------------
  668|  34.6k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 18.8k, False: 36.1M]
  ------------------
  669|  52.2k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 17.6k, False: 36.1M]
  ------------------
  670|  62.6k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 10.3k, False: 36.1M]
  ------------------
  671|  62.6k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 246, False: 62.3k]
  ------------------
  672|    246|          *fromP = from;                                                       \
  673|    246|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    246|        }                                                                      \
  675|  62.6k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 62.3k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  62.3k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  62.3k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  62.3k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  62.3k|        from += 2;                                                             \
  683|  62.3k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|  62.3k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|  62.3k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|  62.3k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|  62.3k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  62.3k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  62.3k|        break;                                                                 \
  688|  36.1M|      }                                                                        \
  689|  36.1M|    }                                                                          \
  690|   172k|    *fromP = from;                                                             \
  691|   167k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 167k]
  ------------------
  692|   167k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   167k|    else                                                                       \
  694|   167k|      return XML_CONVERT_COMPLETED;                                            \
  695|   167k|  }
xmltok.c:initUpdatePosition:
 1027|     20|                   POSITION *pos) {
 1028|     20|  UNUSED_P(enc);
  ------------------
  |  |  135|     20|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     20|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     20|}
xmltok.c:doParseXmlDecl:
 1155|    314|               const ENCODING **encoding, int *standalone) {
 1156|    314|  const char *val = NULL;
 1157|    314|  const char *name = NULL;
 1158|    314|  const char *nameEnd = NULL;
 1159|    314|  ptr += 5 * enc->minBytesPerChar;
 1160|    314|  end -= 2 * enc->minBytesPerChar;
 1161|    314|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 176, False: 138]
  ------------------
 1162|    314|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 16, False: 122]
  ------------------
 1163|    192|    *badPtr = ptr;
 1164|    192|    return 0;
 1165|    192|  }
 1166|    122|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    122|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 3, False: 119]
  ------------------
 1167|      3|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 3, False: 0]
  ------------------
 1168|      3|      *badPtr = name;
 1169|      3|      return 0;
 1170|      3|    }
 1171|    119|  } else {
 1172|    119|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 119, False: 0]
  ------------------
 1173|    119|      *versionPtr = val;
 1174|    119|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 119, False: 0]
  ------------------
 1175|    119|      *versionEndPtr = ptr;
 1176|    119|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 16, False: 103]
  ------------------
 1177|     16|      *badPtr = ptr;
 1178|     16|      return 0;
 1179|     16|    }
 1180|    103|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 5, False: 98]
  ------------------
 1181|      5|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 5]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      5|      return 1;
 1187|      5|    }
 1188|    103|  }
 1189|     98|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     98|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 50, False: 48]
  |  |  ------------------
  ------------------
 1190|     50|    int c = toAscii(enc, val, end);
 1191|     50|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     50|#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|     34|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     32|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 16, False: 34]
  |  Branch (1191:28): [True: 16, False: 0]
  |  Branch (1191:48): [True: 32, False: 2]
  |  Branch (1191:64): [True: 31, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     47|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 47, False: 0]
  ------------------
 1196|     47|      *encodingName = val;
 1197|     47|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 47, False: 0]
  ------------------
 1198|     47|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     47|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 7, False: 40]
  ------------------
 1200|      7|      *badPtr = ptr;
 1201|      7|      return 0;
 1202|      7|    }
 1203|     40|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 38, False: 2]
  ------------------
 1204|     38|      return 1;
 1205|     40|  }
 1206|     50|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|    100|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 8, False: 42]
  ------------------
 1207|     50|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 42]
  ------------------
 1208|      8|    *badPtr = name;
 1209|      8|    return 0;
 1210|      8|  }
 1211|     42|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     42|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 28, False: 14]
  |  |  ------------------
  ------------------
 1212|     28|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 28, False: 0]
  ------------------
 1213|     28|      *standalone = 1;
 1214|     28|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     14|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13, False: 1]
  |  |  ------------------
  ------------------
 1215|     13|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 13, False: 0]
  ------------------
 1216|     13|      *standalone = 0;
 1217|     13|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    236|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 195, False: 41]
  ------------------
 1222|    195|    ptr += enc->minBytesPerChar;
 1223|     41|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 6, False: 35]
  ------------------
 1224|      6|    *badPtr = ptr;
 1225|      6|    return 0;
 1226|      6|  }
 1227|     35|  return 1;
 1228|     41|}
xmltok.c:parsePseudoAttribute:
 1061|    480|                     const char **valPtr, const char **nextTokPtr) {
 1062|    480|  int c;
 1063|    480|  char open;
 1064|    480|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 44, False: 436]
  ------------------
 1065|     44|    *namePtr = NULL;
 1066|     44|    return 1;
 1067|     44|  }
 1068|    436|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 4, False: 432]
  ------------------
 1069|      4|    *nextTokPtr = ptr;
 1070|      4|    return 0;
 1071|      4|  }
 1072|    704|  do {
 1073|    704|    ptr += enc->minBytesPerChar;
 1074|    704|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 272, False: 432]
  ------------------
 1075|    432|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 15, False: 417]
  ------------------
 1076|     15|    *namePtr = NULL;
 1077|     15|    return 1;
 1078|     15|  }
 1079|    417|  *namePtr = ptr;
 1080|  2.63k|  for (;;) {
 1081|  2.63k|    c = toAscii(enc, ptr, end);
 1082|  2.63k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 39, False: 2.59k]
  ------------------
 1083|     39|      *nextTokPtr = ptr;
 1084|     39|      return 0;
 1085|     39|    }
 1086|  2.59k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.59k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 336, False: 2.26k]
  ------------------
 1087|    336|      *nameEndPtr = ptr;
 1088|    336|      break;
 1089|    336|    }
 1090|  2.26k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 42, False: 2.22k]
  ------------------
 1091|     42|      *nameEndPtr = ptr;
 1092|    376|      do {
 1093|    376|        ptr += enc->minBytesPerChar;
 1094|    376|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 334, False: 42]
  ------------------
 1095|     42|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     42|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 34, False: 8]
  ------------------
 1096|     34|        *nextTokPtr = ptr;
 1097|     34|        return 0;
 1098|     34|      }
 1099|      8|      break;
 1100|     42|    }
 1101|  2.22k|    ptr += enc->minBytesPerChar;
 1102|  2.22k|  }
 1103|    344|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 7, False: 337]
  ------------------
 1104|      7|    *nextTokPtr = ptr;
 1105|      7|    return 0;
 1106|      7|  }
 1107|    337|  ptr += enc->minBytesPerChar;
 1108|    337|  c = toAscii(enc, ptr, end);
 1109|    717|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 380, False: 337]
  ------------------
 1110|    380|    ptr += enc->minBytesPerChar;
 1111|    380|    c = toAscii(enc, ptr, end);
 1112|    380|  }
 1113|    337|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    674|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     95|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 95, False: 242]
  |  Branch (1113:26): [True: 33, False: 62]
  ------------------
 1114|     33|    *nextTokPtr = ptr;
 1115|     33|    return 0;
 1116|     33|  }
 1117|    304|  open = (char)c;
 1118|    304|  ptr += enc->minBytesPerChar;
 1119|    304|  *valPtr = ptr;
 1120|  2.78k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.78k|    c = toAscii(enc, ptr, end);
 1122|  2.78k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 222, False: 2.55k]
  ------------------
 1123|    222|      break;
 1124|  2.55k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.55k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    661|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.89k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    921|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 661, False: 1.89k]
  |  Branch (1124:28): [True: 660, False: 1]
  |  Branch (1124:48): [True: 921, False: 978]
  |  Branch (1124:64): [True: 698, False: 223]
  ------------------
 1125|  2.55k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.20k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    689|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  3.29k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 689, False: 512]
  |  Branch (1125:31): [True: 461, False: 228]
  |  Branch (1125:48): [True: 516, False: 224]
  ------------------
 1126|  2.55k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  3.07k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    299|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 299, False: 217]
  |  Branch (1126:32): [True: 82, False: 217]
  ------------------
 1127|     82|      *nextTokPtr = ptr;
 1128|     82|      return 0;
 1129|     82|    }
 1130|  2.55k|  }
 1131|    222|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    222|  return 1;
 1133|    304|}
xmltok.c:toAscii:
 1033|  7.93k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.93k|  char buf[1];
 1035|  7.93k|  char *p = buf;
 1036|  7.93k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.93k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.93k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 214, False: 7.72k]
  ------------------
 1038|    214|    return -1;
 1039|  7.72k|  else
 1040|  7.72k|    return buf[0];
 1041|  7.93k|}
xmltok.c:isSpace:
 1044|  4.73k|isSpace(int c) {
 1045|  4.73k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.07k, False: 1.65k]
  ------------------
 1046|    788|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 788, False: 3.94k]
  ------------------
 1047|    960|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 172, False: 4.56k]
  ------------------
 1048|  1.27k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 313, False: 4.41k]
  ------------------
 1049|  1.65k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 382, False: 4.35k]
  ------------------
 1050|  1.65k|    return 1;
 1051|  4.73k|  }
 1052|  3.07k|  return 0;
 1053|  4.73k|}

xmltok.c:normal_prologTok:
 1018|  4.00M|                  const char **nextTokPtr) {
 1019|  4.00M|  int tok;
 1020|  4.00M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.19k, False: 4.00M]
  ------------------
 1021|  1.19k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.19k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  4.00M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.00M|#  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|  4.00M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.00M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.00M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  3.20k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 3.20k, False: 4.00M]
  ------------------
 1033|  3.20k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.20k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.20k|#  define MINBPC(enc) 1
  ------------------
 1034|  11.3k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 11.3k, False: 3.99M]
  ------------------
 1035|  11.3k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.3k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.3k|#  define MINBPC(enc) 1
  ------------------
 1036|  27.2k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 27.2k, False: 3.98M]
  ------------------
 1037|  27.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  27.2k|#  define MINBPC(enc) 1
  ------------------
 1038|  27.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  27.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  27.2k|    {                                                                          \
  |  |  |  |  135|  27.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  27.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  27.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 27.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  27.2k|    }
  |  |  ------------------
  ------------------
 1039|  27.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  27.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  27.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 16, False: 27.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  20.9k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 20.9k, False: 6.30k]
  ------------------
 1041|  20.9k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  20.9k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  20.9k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.60k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.60k, False: 24.6k]
  ------------------
 1043|  2.60k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.60k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.60k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.58k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.58k, False: 24.6k]
  ------------------
 1045|  3.60k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.02k, False: 26.2k]
  ------------------
 1046|  3.60k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 27.2k]
  ------------------
 1047|  3.64k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 38, False: 27.2k]
  ------------------
 1048|  3.67k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 29, False: 27.2k]
  ------------------
 1049|  3.68k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 27.2k]
  ------------------
 1050|  3.68k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.68k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.68k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.68k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  27.2k|    }
 1053|     16|    *nextTokPtr = ptr;
 1054|     16|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
 1055|  27.2k|  }
 1056|  88.7k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 88.7k, False: 3.91M]
  ------------------
 1057|  88.7k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  88.7k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 121, False: 88.6k]
  ------------------
 1058|    121|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    121|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    121|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    121|    }
 1062|       |    /* fall through */
 1063|   142k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 54.1k, False: 3.95M]
  ------------------
 1064|   162k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 19.2k, False: 3.98M]
  ------------------
 1065|   165k|    for (;;) {
 1066|   165k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   165k|#  define MINBPC(enc) 1
  ------------------
 1067|   165k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   165k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   165k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 563, False: 165k]
  ------------------
 1068|    563|        break;
 1069|   165k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   165k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   165k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  1.36k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.36k, False: 163k]
  ------------------
 1071|  2.71k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.35k, False: 163k]
  ------------------
 1072|  2.71k|        break;
 1073|    925|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 925, False: 164k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    925|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|    925|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 916, False: 9]
  ------------------
 1076|    916|          break;
 1077|       |        /* fall through */
 1078|   161k|      default:
  ------------------
  |  Branch (1078:7): [True: 161k, False: 3.63k]
  ------------------
 1079|   161k|        *nextTokPtr = ptr;
 1080|   161k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   161k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   165k|      }
 1082|   165k|    }
 1083|    563|    *nextTokPtr = ptr;
 1084|    563|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    563|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.44k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.44k, False: 4.00M]
  ------------------
 1086|  3.44k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.44k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.44k|#  define MINBPC(enc) 1
  ------------------
 1087|  12.1k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 12.1k, False: 3.99M]
  ------------------
 1088|  12.1k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  12.1k|#  define MINBPC(enc) 1
  ------------------
 1089|  12.1k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  12.1k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.63k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.63k, False: 4.00M]
  ------------------
 1091|  2.63k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.63k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.63k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.63k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    975|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 975, False: 4.00M]
  ------------------
 1094|    975|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    975|#  define MINBPC(enc) 1
  ------------------
 1095|    975|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    975|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    975|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    975|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 972]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    972|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|    972|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 17, False: 955]
  |  |  ------------------
  ------------------
 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: 2, False: 14]
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      2|#  define MINBPC(enc) 1
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     16|    }
 1104|    969|    *nextTokPtr = ptr;
 1105|    969|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    969|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.56M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.56M, False: 438k]
  ------------------
 1107|  3.56M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.56M|#  define MINBPC(enc) 1
  ------------------
 1108|  3.56M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.56M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  63.8k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 63.8k, False: 3.94M]
  ------------------
 1110|  63.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  63.8k|#  define MINBPC(enc) 1
  ------------------
 1111|  63.8k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  63.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  63.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  63.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 19, False: 63.7k]
  ------------------
 1112|     19|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     19|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  63.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  63.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  63.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 7, False: 63.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  1.47k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 1.47k, False: 62.3k]
  ------------------
 1115|  1.47k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.47k|#  define MINBPC(enc) 1
  ------------------
 1116|  1.47k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  1.47k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  10.6k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 10.6k, False: 53.0k]
  ------------------
 1118|  10.6k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  10.6k|#  define MINBPC(enc) 1
  ------------------
 1119|  10.6k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  10.6k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  22.3k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 22.3k, False: 41.4k]
  ------------------
 1121|  22.3k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  22.3k|#  define MINBPC(enc) 1
  ------------------
 1122|  22.3k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  22.3k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    919|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 919, False: 62.8k]
  ------------------
 1124|  1.44k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 527, False: 63.2k]
  ------------------
 1125|  26.0k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 24.5k, False: 39.2k]
  ------------------
 1126|  26.6k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 639, False: 63.1k]
  ------------------
 1127|  26.9k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 229, False: 63.5k]
  ------------------
 1128|  27.4k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 532, False: 63.2k]
  ------------------
 1129|  29.2k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.85k, False: 61.9k]
  ------------------
 1130|  29.2k|      *nextTokPtr = ptr;
 1131|  29.2k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  29.2k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  63.7k|    }
 1133|      7|    *nextTokPtr = ptr;
 1134|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1135|  6.13k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 6.13k, False: 4.00M]
  ------------------
 1136|  6.13k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.13k|#  define MINBPC(enc) 1
  ------------------
 1137|  6.13k|    return XML_TOK_OR;
  ------------------
  |  |   88|  6.13k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  17.3k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 17.3k, False: 3.99M]
  ------------------
 1139|  17.3k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  17.3k|#  define MINBPC(enc) 1
  ------------------
 1140|  17.3k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  17.3k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  25.4k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 25.4k, False: 3.98M]
  ------------------
 1142|  25.4k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  25.4k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  25.4k|#  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.32k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      2|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 420, False: 4.00M]
  |  |  ------------------
  |  | 1145|    420|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 1, False: 419]
  |  |  ------------------
  |  | 1146|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    419|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    419|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    419|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 413]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      6|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      6|    }                                                                          \
  |  | 1151|    419|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    413|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    413|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 338, False: 75]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    338|      ptr += n;                                                                \
  |  | 1153|    338|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    338|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    338|      break;                                                                   \
  |  | 1155|    338|    }                                                                          \
  |  | 1156|    413|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     75|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     75|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 73, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|     73|      ptr += n;                                                                \
  |  | 1158|     73|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|     73|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|     73|      break;                                                                   \
  |  | 1160|     73|    }                                                                          \
  |  | 1161|     75|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      2|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|    709|    LEAD_CASE(3)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 224, False: 4.00M]
  |  |  ------------------
  |  | 1145|    224|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 221]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    221|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    221|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    221|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 45, False: 176]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     45|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     45|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     45|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     45|    }                                                                          \
  |  | 1151|    221|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    176|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    176|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 88, False: 88]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|     88|      ptr += n;                                                                \
  |  | 1153|     88|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|     88|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|     88|      break;                                                                   \
  |  | 1155|     88|    }                                                                          \
  |  | 1156|    176|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     88|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     88|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 73, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|     73|      ptr += n;                                                                \
  |  | 1158|     73|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|     73|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|     73|      break;                                                                   \
  |  | 1160|     73|    }                                                                          \
  |  | 1161|     88|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    138|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 55, False: 4.00M]
  |  |  ------------------
  |  | 1145|     55|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 53]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     53|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     53|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     53|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 38, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     38|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     38|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     38|    }                                                                          \
  |  | 1151|     53|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     15|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     15|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     15|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     15|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  66.2k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 66.2k, False: 3.94M]
  ------------------
 1168|   101k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 34.9k, False: 3.97M]
  ------------------
 1169|   101k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   101k|#define XML_TOK_NAME 18
  ------------------
 1170|   101k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   101k|#  define MINBPC(enc) 1
  ------------------
 1171|   101k|    break;
 1172|    256|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 256, False: 4.00M]
  ------------------
 1173|    480|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 224, False: 4.00M]
  ------------------
 1174|    756|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 276, False: 4.00M]
  ------------------
 1175|    756|#  ifdef XML_NS
 1176|    756|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 4.00M]
  ------------------
 1177|    756|#  endif
 1178|    756|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    756|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    756|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    756|#  define MINBPC(enc) 1
  ------------------
 1180|    756|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 4.00M]
  ------------------
 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|     42|  default:
  ------------------
  |  Branch (1193:3): [True: 42, False: 4.00M]
  ------------------
 1194|     42|    *nextTokPtr = ptr;
 1195|     42|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
 1196|  4.00M|  }
 1197|  2.02M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.02M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  5.79M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.92M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.02M]
  |  |  ------------------
  |  |   82|  1.92M|    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.92M|    /* fall through */                                                         \
  |  |   87|  1.92M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 90.0k, False: 1.93M]
  |  |  ------------------
  |  |   88|  1.87M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.78M, False: 237k]
  |  |  ------------------
  |  |   89|  1.89M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 14.9k, False: 2.01M]
  |  |  ------------------
  |  |   90|  1.92M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 26.0k, False: 2.00M]
  |  |  ------------------
  |  |   91|  1.92M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.04k, False: 2.02M]
  |  |  ------------------
  |  |   92|  1.92M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.92M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.92M|    break;                                                                     \
  |  |   94|  1.92M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.27k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.29k, False: 2.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.29k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 2.29k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.27k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.29k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.59k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.29k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, False: 2.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.27k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.27k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 2.27k]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|  2.29k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.27k|    break;
  |  |  ------------------
  |  |   95|  2.27k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.30k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.31k, False: 2.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.31k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.30k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.31k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.63k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.31k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.31k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.31k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|  1.31k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.30k|    break;
  |  |  ------------------
  |  |   96|  1.30k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 2.02M]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 13, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      4|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, 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|  7.10k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 7.10k, False: 2.02M]
  ------------------
 1201|  43.7k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 36.6k, False: 1.99M]
  ------------------
 1202|  44.9k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 1.13k, False: 2.02M]
  ------------------
 1203|  47.9k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 3.07k, False: 2.02M]
  ------------------
 1204|  50.5k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.61k, False: 2.02M]
  ------------------
 1205|  50.5k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 6, False: 2.02M]
  ------------------
 1206|  61.8k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 11.2k, False: 2.01M]
  ------------------
 1207|  93.2k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 31.3k, False: 1.99M]
  ------------------
 1208|   101k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 8.35k, False: 2.01M]
  ------------------
 1209|   101k|      *nextTokPtr = ptr;
 1210|   101k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.02M]
  ------------------
 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|    174|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 174, False: 2.02M]
  ------------------
 1232|    174|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    174|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 173]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    173|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    173|#  define MINBPC(enc) 1
  ------------------
 1237|    173|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    173|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    225|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 225, False: 2.02M]
  ------------------
 1239|    225|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    225|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 224]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    224|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    224|#  define MINBPC(enc) 1
  ------------------
 1244|    224|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    224|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    239|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 239, False: 2.02M]
  ------------------
 1246|    239|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    239|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 238]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    238|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    238|#  define MINBPC(enc) 1
  ------------------
 1251|    238|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    238|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     25|    default:
  ------------------
  |  Branch (1252:5): [True: 25, False: 2.02M]
  ------------------
 1253|     25|      *nextTokPtr = ptr;
 1254|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.02M|    }
 1256|  2.02M|  }
 1257|    185|  return -tok;
 1258|   102k|}
xmltok.c:normal_scanLit:
  984|  14.5k|                const char **nextTokPtr) {
  985|  12.1M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  12.1M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  12.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  12.1M|    switch (t) {
  988|  9.98k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.24k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.23k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.24k, False: 12.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.24k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.23k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.24k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.24k|    (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: 11, False: 1.23k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  1.24k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.23k|    break;
  |  |  ------------------
  |  |   61|  1.23k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.22k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.23k, False: 12.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.23k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.22k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.23k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.23k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.23k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  1.23k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.22k|    break;
  |  |  ------------------
  |  |   62|  2.50k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.49k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.50k, False: 12.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.50k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.50k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.49k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.50k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.50k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.50k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 2.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  2.50k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.49k|    break;
  |  |  ------------------
  |  |   63|  2.49k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 4, False: 12.1M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 12.1M]
  |  |  ------------------
  |  |   65|     10|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 12.1M]
  |  |  ------------------
  |  |   66|     10|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     10|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  6.04k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 6.04k, False: 12.1M]
  ------------------
  990|  17.7k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 11.7k, False: 12.1M]
  ------------------
  991|  17.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  17.7k|#  define MINBPC(enc) 1
  ------------------
  992|  17.7k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 3.26k, False: 14.4k]
  ------------------
  993|  3.26k|        break;
  994|  14.4k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  14.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  14.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  14.4k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 8, False: 14.4k]
  ------------------
  995|      8|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      8|#define XML_TOK_LITERAL 27
  ------------------
  996|  14.4k|      *nextTokPtr = ptr;
  997|  14.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  14.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  14.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  4.64k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 4.64k, False: 9.83k]
  ------------------
  999|  5.88k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.24k, False: 13.2k]
  ------------------
 1000|  8.59k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 2.71k, False: 11.7k]
  ------------------
 1001|  14.4k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 5.86k, False: 8.61k]
  ------------------
 1002|  14.4k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 4, False: 14.4k]
  ------------------
 1003|  14.4k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 10, False: 14.4k]
  ------------------
 1004|  14.4k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  14.4k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      7|      default:
  ------------------
  |  Branch (1005:7): [True: 7, False: 14.4k]
  ------------------
 1006|      7|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1007|  14.4k|      }
 1008|  12.1M|    default:
  ------------------
  |  Branch (1008:5): [True: 12.1M, False: 22.7k]
  ------------------
 1009|  12.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.1M|#  define MINBPC(enc) 1
  ------------------
 1010|  12.1M|      break;
 1011|  12.1M|    }
 1012|  12.1M|  }
 1013|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  14.5k|}
xmltok.c:normal_scanDecl:
  183|  20.9k|                 const char **nextTokPtr) {
  184|  20.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.9k|    {                                                                          \
  |  |  |  |  135|  20.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  20.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 20.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  20.9k|    }
  |  |  ------------------
  ------------------
  185|  20.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  20.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  20.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    431|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 431, False: 20.4k]
  ------------------
  187|    431|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    431|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    431|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 20.9k]
  ------------------
  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|  1.14k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.14k, False: 19.7k]
  ------------------
  192|  20.4k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 19.3k, False: 1.58k]
  ------------------
  193|  20.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  20.4k|#  define MINBPC(enc) 1
  ------------------
  194|  20.4k|    break;
  195|      3|  default:
  ------------------
  |  Branch (195:3): [True: 3, False: 20.9k]
  ------------------
  196|      3|    *nextTokPtr = ptr;
  197|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  198|  20.9k|  }
  199|   138k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   138k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   138k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   138k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|      8|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 8, False: 138k]
  ------------------
  202|      8|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|      8|    {                                                                          \
  |  |  135|      8|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|      8|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|      8|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 7]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|      8|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      7|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      7|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      7|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 2, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 6]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 6]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 6]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 2, False: 5]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|      7|      }
  212|       |      /* fall through */
  213|  8.21k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 8.21k, False: 129k]
  ------------------
  214|  15.6k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 7.40k, False: 130k]
  ------------------
  215|  20.4k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 4.79k, False: 133k]
  ------------------
  216|  20.4k|      *nextTokPtr = ptr;
  217|  20.4k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  20.4k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   106k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 106k, False: 31.9k]
  ------------------
  219|   117k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 11.5k, False: 126k]
  ------------------
  220|   117k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   117k|#  define MINBPC(enc) 1
  ------------------
  221|   117k|      break;
  222|     20|    default:
  ------------------
  |  Branch (222:5): [True: 20, False: 138k]
  ------------------
  223|     20|      *nextTokPtr = ptr;
  224|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  225|   138k|    }
  226|   138k|  }
  227|     43|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  20.4k|}
xmltok.c:normal_scanComment:
  146|    762|                    const char **nextTokPtr) {
  147|    762|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    762|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    762|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|    762|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 753, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    753|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|    753|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 10, False: 743]
  ------------------
  149|     10|      *nextTokPtr = ptr;
  150|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  151|     10|    }
  152|    743|    ptr += MINBPC(enc);
  ------------------
  |  |  242|    743|#  define MINBPC(enc) 1
  ------------------
  153|  2.67M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  2.67M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.67M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.67M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  5.32M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.68k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.67k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.68k, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.68k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 5.67k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.67k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.67k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.67k|    (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: 8, False: 5.67k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  5.67k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.67k|    break;
  |  |  ------------------
  |  |   61|  2.64M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.64M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.64M, False: 27.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.64M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.64M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.64M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.64M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.64M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.64M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 2.64M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  2.64M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.64M|    break;
  |  |  ------------------
  |  |   62|  2.64M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.82k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.82k, False: 2.66M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.82k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.82k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.82k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.82k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.82k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 6.82k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  6.82k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.82k|    break;
  |  |  ------------------
  |  |   63|  6.82k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 2.67M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 2.67M]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 2.67M]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.02k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.02k, False: 2.67M]
  ------------------
  157|  1.02k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.02k|#  define MINBPC(enc) 1
  ------------------
  158|  1.02k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.02k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.02k|    {                                                                          \
  |  |  |  |  135|  1.02k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.02k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.02k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.02k|    }
  |  |  ------------------
  ------------------
  159|  1.02k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.02k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 620, False: 405]
  |  |  ------------------
  ------------------
  160|    620|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    620|#  define MINBPC(enc) 1
  ------------------
  161|    620|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    620|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    620|    {                                                                          \
  |  |  |  |  135|    620|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    620|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|    620|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 619]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    620|    }
  |  |  ------------------
  ------------------
  162|    619|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|    619|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 16, False: 603]
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    603|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    603|#  define MINBPC(enc) 1
  ------------------
  167|    603|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    603|#define XML_TOK_COMMENT 13
  ------------------
  168|    619|        }
  169|    405|        break;
  170|  13.6k|      default:
  ------------------
  |  Branch (170:7): [True: 13.6k, False: 2.66M]
  ------------------
  171|  13.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.6k|#  define MINBPC(enc) 1
  ------------------
  172|  13.6k|        break;
  173|  2.67M|      }
  174|  2.67M|    }
  175|    743|  }
  176|     98|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     98|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    762|}
xmltok.c:normal_scanPi:
  277|  5.94k|               const char **nextTokPtr) {
  278|  5.94k|  int tok;
  279|  5.94k|  const char *target = ptr;
  280|  5.94k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.94k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.94k|    {                                                                          \
  |  |  |  |  135|  5.94k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.94k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.94k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 5.93k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  5.94k|    }
  |  |  ------------------
  ------------------
  281|  5.93k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.93k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  5.26k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.25k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 5.93k]
  |  |  ------------------
  |  |  111|  5.25k|    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.25k|    /* fall through */                                                         \
  |  |  116|  5.25k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.92k, False: 2.01k]
  |  |  ------------------
  |  |  117|  5.25k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.33k, False: 4.60k]
  |  |  ------------------
  |  |  118|  5.25k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.25k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.25k|    break;                                                                     \
  |  |  120|  5.25k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    323|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 326, False: 5.61k]
  |  |  |  |  ------------------
  |  |  |  |  100|    326|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 325]
  |  |  |  |  ------------------
  |  |  |  |  101|    323|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    325|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    650|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    325|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 324]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    324|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    324|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 323]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    325|    ptr += n;                                                                  \
  |  |  |  |  107|    323|    break;
  |  |  ------------------
  |  |  121|    339|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    330|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 339, False: 5.59k]
  |  |  |  |  ------------------
  |  |  |  |  100|    339|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 337]
  |  |  |  |  ------------------
  |  |  |  |  101|    330|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    337|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    674|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    337|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 334]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    334|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    334|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 330]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    337|    ptr += n;                                                                  \
  |  |  |  |  107|    330|    break;
  |  |  ------------------
  |  |  122|    330|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 5.92k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5, 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|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      6|  default:
  ------------------
  |  Branch (283:3): [True: 6, False: 5.93k]
  ------------------
  284|      6|    *nextTokPtr = ptr;
  285|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  286|  5.93k|  }
  287|   537k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   537k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   537k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   537k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  1.89M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   523k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 537k]
  |  |  ------------------
  |  |   82|   523k|    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|   523k|    /* fall through */                                                         \
  |  |   87|   523k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 313k, False: 224k]
  |  |  ------------------
  |  |   88|   521k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 208k, False: 328k]
  |  |  ------------------
  |  |   89|   522k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 999, False: 536k]
  |  |  ------------------
  |  |   90|   522k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 339, False: 536k]
  |  |  ------------------
  |  |   91|   523k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 675, False: 536k]
  |  |  ------------------
  |  |   92|   523k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   523k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   523k|    break;                                                                     \
  |  |   94|   523k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    356|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 371, False: 536k]
  |  |  |  |  ------------------
  |  |  |  |   71|    371|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 369]
  |  |  |  |  ------------------
  |  |  |  |   72|    356|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    369|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    738|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    369|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 363]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    363|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    363|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 7, False: 356]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    369|    ptr += n;                                                                  \
  |  |  |  |   78|    356|    break;
  |  |  ------------------
  |  |   95|  7.48k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  7.43k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7.48k, False: 529k]
  |  |  |  |  ------------------
  |  |  |  |   71|  7.48k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 7.47k]
  |  |  |  |  ------------------
  |  |  |  |   72|  7.43k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  7.47k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  14.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 7.47k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  7.47k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 35, False: 7.43k]
  |  |  |  |  ------------------
  |  |  |  |   74|     39|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     39|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     39|    }                                                                          \
  |  |  |  |   77|  7.47k|    ptr += n;                                                                  \
  |  |  |  |   78|  7.43k|    break;
  |  |  ------------------
  |  |   96|  7.43k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 28, False: 537k]
  |  |  |  |  ------------------
  |  |  |  |   71|     28|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 26]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     26|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     52|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     26|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     13|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     26|    }                                                                          \
  |  |  |  |   77|     26|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    854|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 854, False: 536k]
  ------------------
  291|  1.15k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 304, False: 536k]
  ------------------
  292|  2.39k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.23k, False: 535k]
  ------------------
  293|  2.39k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.39k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.39k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.39k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.39k|#  define MINBPC(enc) 1
  ------------------
  298|  3.09M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  3.09M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.09M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.09M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  6.10M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  7.64k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.64k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.64k, False: 3.09M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.64k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 7.64k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.64k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.64k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.64k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.64k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 7.64k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  7.64k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.64k|    break;
  |  |  ------------------
  |  |   61|  3.03M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.03M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.03M, False: 66.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.03M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 3.03M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.03M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.03M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.03M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.03M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 3.03M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  3.03M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.03M|    break;
  |  |  ------------------
  |  |   62|  3.03M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  12.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 12.2k, False: 3.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|  12.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 12.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  12.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  12.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  12.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  12.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 12.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  12.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  12.2k|    break;
  |  |  ------------------
  |  |   63|  12.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 3.09M]
  |  |  ------------------
  |  |   64|     10|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 3.09M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 3.09M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.69k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.69k, False: 3.09M]
  ------------------
  302|  3.69k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.69k|#  define MINBPC(enc) 1
  ------------------
  303|  3.69k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.69k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.69k|    {                                                                          \
  |  |  |  |  135|  3.69k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.69k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 3.69k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  3.69k|    }
  |  |  ------------------
  ------------------
  304|  3.69k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.69k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.23k, False: 1.46k]
  |  |  ------------------
  ------------------
  305|  2.23k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.23k|#  define MINBPC(enc) 1
  ------------------
  306|  2.23k|            return tok;
  307|  2.23k|          }
  308|  1.46k|          break;
  309|  42.7k|        default:
  ------------------
  |  Branch (309:9): [True: 42.7k, False: 3.05M]
  ------------------
  310|  42.7k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  42.7k|#  define MINBPC(enc) 1
  ------------------
  311|  42.7k|          break;
  312|  3.09M|        }
  313|  3.09M|      }
  314|    127|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    127|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.35k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.35k, False: 533k]
  ------------------
  316|  3.35k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.35k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 3, False: 3.35k]
  ------------------
  317|      3|        *nextTokPtr = ptr;
  318|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  319|      3|      }
  320|  3.35k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.35k|#  define MINBPC(enc) 1
  ------------------
  321|  3.35k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.35k|    {                                                                          \
  |  |  |  |  135|  3.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.35k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 31, False: 3.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     31|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     31|      }                                                                        \
  |  |  |  |  138|  3.35k|    }
  |  |  ------------------
  ------------------
  322|  3.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.32k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.30k, False: 16]
  |  |  ------------------
  ------------------
  323|  3.30k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.30k|#  define MINBPC(enc) 1
  ------------------
  324|  3.30k|        return tok;
  325|  3.30k|      }
  326|       |      /* fall through */
  327|     22|    default:
  ------------------
  |  Branch (327:5): [True: 6, False: 537k]
  ------------------
  328|     22|      *nextTokPtr = ptr;
  329|     22|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  330|   537k|    }
  331|   537k|  }
  332|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.91k|}
xmltok.c:normal_checkPiTarget:
  232|  5.75k|                      int *tokPtr) {
  233|  5.75k|  int upper = 0;
  234|  5.75k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.75k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.75k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.75k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.75k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  5.75k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 3.45k, False: 2.29k]
  ------------------
  237|  3.45k|    return 1;
  238|  2.29k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.29k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    897|  case ASCII_x:
  ------------------
  |  |   86|    897|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 897, False: 1.40k]
  ------------------
  240|    897|    break;
  241|    788|  case ASCII_X:
  ------------------
  |  |   59|    788|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 788, False: 1.50k]
  ------------------
  242|    788|    upper = 1;
  243|    788|    break;
  244|    612|  default:
  ------------------
  |  Branch (244:3): [True: 612, False: 1.68k]
  ------------------
  245|    612|    return 1;
  246|  2.29k|  }
  247|  1.68k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.68k|#  define MINBPC(enc) 1
  ------------------
  248|  1.68k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.68k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    718|  case ASCII_m:
  ------------------
  |  |   75|    718|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 718, False: 967]
  ------------------
  250|    718|    break;
  251|    400|  case ASCII_M:
  ------------------
  |  |   48|    400|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 400, False: 1.28k]
  ------------------
  252|    400|    upper = 1;
  253|    400|    break;
  254|    567|  default:
  ------------------
  |  Branch (254:3): [True: 567, False: 1.11k]
  ------------------
  255|    567|    return 1;
  256|  1.68k|  }
  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|    258|  case ASCII_l:
  ------------------
  |  |   74|    258|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 258, False: 860]
  ------------------
  260|    258|    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|    858|  default:
  ------------------
  |  Branch (264:3): [True: 858, False: 260]
  ------------------
  265|    858|    return 1;
  266|  1.11k|  }
  267|    260|  if (upper)
  ------------------
  |  Branch (267:7): [True: 5, False: 255]
  ------------------
  268|      5|    return 0;
  269|    255|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    255|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    255|  return 1;
  271|    260|}
xmltok.c:normal_scanPercent:
  924|  3.45k|                    const char **nextTokPtr) {
  925|  3.45k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.45k|    {                                                                          \
  |  |  |  |  135|  3.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.45k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 3.43k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  3.45k|    }
  |  |  ------------------
  ------------------
  926|  3.43k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.43k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.29k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.23k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.43k]
  |  |  ------------------
  |  |  111|  1.23k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  1.23k|    /* fall through */                                                         \
  |  |  116|  1.23k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 651, False: 2.78k]
  |  |  ------------------
  |  |  117|  1.23k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 579, False: 2.85k]
  |  |  ------------------
  |  |  118|  1.23k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.23k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.23k|    break;                                                                     \
  |  |  120|  1.23k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     85|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 101, False: 3.33k]
  |  |  |  |  ------------------
  |  |  |  |  100|    101|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 100]
  |  |  |  |  ------------------
  |  |  |  |  101|     85|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    100|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    200|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    100|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     88|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     88|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 85]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|    100|    ptr += n;                                                                  \
  |  |  |  |  107|     85|    break;
  |  |  ------------------
  |  |  121|    208|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    205|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 208, False: 3.22k]
  |  |  |  |  ------------------
  |  |  |  |  100|    208|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 207]
  |  |  |  |  ------------------
  |  |  |  |  101|    205|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    207|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    414|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    207|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 206]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    206|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    206|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 205]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    207|    ptr += n;                                                                  \
  |  |  |  |  107|    205|    break;
  |  |  ------------------
  |  |  122|    205|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 3.42k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, 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|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|     62|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 62, False: 3.37k]
  ------------------
  929|  1.03k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 977, False: 2.45k]
  ------------------
  930|  1.87k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 836, False: 2.60k]
  ------------------
  931|  1.87k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 3.43k]
  ------------------
  932|  1.87k|    *nextTokPtr = ptr;
  933|  1.87k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.87k|#define XML_TOK_PERCENT 22
  ------------------
  934|      4|  default:
  ------------------
  |  Branch (934:3): [True: 4, False: 3.43k]
  ------------------
  935|      4|    *nextTokPtr = ptr;
  936|      4|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  937|  3.43k|  }
  938|  4.43k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.43k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.43k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  5.37k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.48k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.43k]
  |  |  ------------------
  |  |   82|  2.48k|    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.48k|    /* fall through */                                                         \
  |  |   87|  2.48k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 451, False: 3.98k]
  |  |  ------------------
  |  |   88|    709|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 258, False: 4.17k]
  |  |  ------------------
  |  |   89|  1.00k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 292, False: 4.13k]
  |  |  ------------------
  |  |   90|  2.12k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.12k, False: 3.30k]
  |  |  ------------------
  |  |   91|  2.48k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 356, False: 4.07k]
  |  |  ------------------
  |  |   92|  2.48k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.48k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.48k|    break;                                                                     \
  |  |   94|  2.48k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    281|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 293, False: 4.13k]
  |  |  |  |  ------------------
  |  |  |  |   71|    293|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 290]
  |  |  |  |  ------------------
  |  |  |  |   72|    281|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    290|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    580|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    290|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 282]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    282|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    282|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 281]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|    290|    ptr += n;                                                                  \
  |  |  |  |   78|    281|    break;
  |  |  ------------------
  |  |   95|    281|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    237|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 249, False: 4.18k]
  |  |  |  |  ------------------
  |  |  |  |   71|    249|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 248]
  |  |  |  |  ------------------
  |  |  |  |   72|    237|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    248|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    496|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    248|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 240]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    240|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    240|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 237]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    248|    ptr += n;                                                                  \
  |  |  |  |   78|    237|    break;
  |  |  ------------------
  |  |   96|    237|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6, False: 4.42k]
  |  |  |  |  ------------------
  |  |  |  |   71|      6|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     10|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.38k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.38k, False: 3.05k]
  ------------------
  942|  1.38k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.38k|#  define MINBPC(enc) 1
  ------------------
  943|  1.38k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.38k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     20|    default:
  ------------------
  |  Branch (944:5): [True: 20, False: 4.41k]
  ------------------
  945|     20|      *nextTokPtr = ptr;
  946|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  947|  4.43k|    }
  948|  4.43k|  }
  949|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.52k|}
xmltok.c:normal_scanPoundName:
  954|  25.4k|                      const char **nextTokPtr) {
  955|  25.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.4k|    {                                                                          \
  |  |  |  |  135|  25.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 25.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  25.4k|    }
  |  |  ------------------
  ------------------
  956|  25.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  25.0k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  25.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 25.4k]
  |  |  ------------------
  |  |  111|  25.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|  25.3k|    /* fall through */                                                         \
  |  |  116|  25.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 24.9k, False: 510]
  |  |  ------------------
  |  |  117|  25.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 457, False: 24.9k]
  |  |  ------------------
  |  |  118|  25.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  25.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  25.3k|    break;                                                                     \
  |  |  120|  25.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      5|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      9|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      5|    break;
  |  |  ------------------
  |  |  121|     12|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      4|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 25.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      4|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     30|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, 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|     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|      2|  default:
  ------------------
  |  Branch (958:3): [True: 2, False: 25.4k]
  ------------------
  959|      2|    *nextTokPtr = ptr;
  960|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  961|  25.4k|  }
  962|   177k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   177k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   177k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   177k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   550k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   151k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 177k]
  |  |  ------------------
  |  |   82|   151k|    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|   151k|    /* fall through */                                                         \
  |  |   87|   151k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 96.0k, False: 81.7k]
  |  |  ------------------
  |  |   88|   150k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 54.3k, False: 123k]
  |  |  ------------------
  |  |   89|   150k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 226, False: 177k]
  |  |  ------------------
  |  |   90|   151k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 595, False: 177k]
  |  |  ------------------
  |  |   91|   151k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 405, False: 177k]
  |  |  ------------------
  |  |   92|   151k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   151k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   151k|    break;                                                                     \
  |  |   94|   151k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    581|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 594, False: 177k]
  |  |  |  |  ------------------
  |  |  |  |   71|    594|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 592]
  |  |  |  |  ------------------
  |  |  |  |   72|    581|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    592|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.18k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    592|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 583]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    583|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    583|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 581]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    592|    ptr += n;                                                                  \
  |  |  |  |   78|    581|    break;
  |  |  ------------------
  |  |   95|    581|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    244|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 278, False: 177k]
  |  |  |  |  ------------------
  |  |  |  |   71|    278|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 275]
  |  |  |  |  ------------------
  |  |  |  |   72|    244|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    275|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    550|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    275|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 260]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    260|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    260|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 16, False: 244]
  |  |  |  |  ------------------
  |  |  |  |   74|     31|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     31|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     31|    }                                                                          \
  |  |  |  |   77|    275|    ptr += n;                                                                  \
  |  |  |  |   78|    244|    break;
  |  |  ------------------
  |  |   96|    244|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 177k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 21]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 18, 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|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|     21|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  23.3k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 23.3k, False: 154k]
  ------------------
  966|  23.6k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 241, False: 177k]
  ------------------
  967|  24.3k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 744, False: 177k]
  ------------------
  968|  24.4k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 107, False: 177k]
  ------------------
  969|  24.5k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 115, False: 177k]
  ------------------
  970|  24.5k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 177k]
  ------------------
  971|  25.2k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 642, False: 177k]
  ------------------
  972|  25.2k|      *nextTokPtr = ptr;
  973|  25.2k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  25.2k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     14|    default:
  ------------------
  |  Branch (974:5): [True: 14, False: 177k]
  ------------------
  975|     14|      *nextTokPtr = ptr;
  976|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  977|   177k|    }
  978|   177k|  }
  979|     70|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     70|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  25.3k|}
xmltok.c:normal_contentTok:
  824|  34.9M|                   const char **nextTokPtr) {
  825|  34.9M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 78.8k, False: 34.9M]
  ------------------
  826|  78.8k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  78.8k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  34.9M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  34.9M|#  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|  34.9M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  34.9M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  34.9M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.99M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.99M, False: 31.9M]
  ------------------
  838|  2.99M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.99M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.99M|#  define MINBPC(enc) 1
  ------------------
  839|  84.1k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 84.1k, False: 34.8M]
  ------------------
  840|  84.1k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  84.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  84.1k|#  define MINBPC(enc) 1
  ------------------
  841|  2.21k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 2.21k, False: 34.9M]
  ------------------
  842|  2.21k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.21k|#  define MINBPC(enc) 1
  ------------------
  843|  2.21k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.21k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.21k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.21k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 20, False: 2.19k]
  ------------------
  844|     20|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     20|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  2.19k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  2.19k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 324, False: 1.87k]
  ------------------
  846|    324|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    324|#  define MINBPC(enc) 1
  ------------------
  847|  2.19k|    *nextTokPtr = ptr;
  848|  2.19k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.19k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  30.9M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 30.9M, False: 3.99M]
  ------------------
  850|  30.9M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  30.9M|#  define MINBPC(enc) 1
  ------------------
  851|  30.9M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  30.9M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  5.19k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 5.19k, False: 34.9M]
  ------------------
  853|  5.19k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.19k|#  define MINBPC(enc) 1
  ------------------
  854|  5.19k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.19k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  5.19k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 332, False: 4.86k]
  ------------------
  855|    332|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    332|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  4.86k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  4.86k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 2.33k, False: 2.52k]
  ------------------
  857|  2.33k|      break;
  858|  2.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.52k|#  define MINBPC(enc) 1
  ------------------
  859|  2.52k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.52k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.52k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 522, False: 2.00k]
  ------------------
  860|    522|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    522|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  2.00k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.00k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 1.99k, False: 5]
  ------------------
  862|  1.99k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  1.99k|#  define MINBPC(enc) 1
  ------------------
  863|  1.99k|      break;
  864|  1.99k|    }
  865|      5|    *nextTokPtr = ptr;
  866|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  867|  10.8k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.14k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.14k, False: 34.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.14k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 11, False: 1.13k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     11|#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: 13, False: 1.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|  1.13k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.11k|    break;
  |  |  ------------------
  |  |   61|  3.13k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.11k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.13k, False: 34.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.13k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 3.13k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.11k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.13k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.13k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 21, False: 3.11k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     21|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     21|    }                                                                          \
  |  |  |  |   56|  3.13k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.11k|    break;
  |  |  ------------------
  |  |   62|  3.11k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.05k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.09k, False: 34.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.09k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.05k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.08k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 32, False: 1.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     32|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     32|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     32|    }                                                                          \
  |  |  |  |   56|  1.08k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.05k|    break;
  |  |  ------------------
  |  |   63|  1.05k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 37, False: 34.9M]
  |  |  ------------------
  |  |   64|     45|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 8, False: 34.9M]
  |  |  ------------------
  |  |   65|     62|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 17, False: 34.9M]
  |  |  ------------------
  |  |   66|     62|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     62|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     62|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   909k|  default:
  ------------------
  |  Branch (868:3): [True: 909k, False: 33.9M]
  ------------------
  869|   909k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   909k|#  define MINBPC(enc) 1
  ------------------
  870|   909k|    break;
  871|  34.9M|  }
  872|  43.6M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  43.6M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  43.6M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  43.6M|  (((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|  37.3k|      LEAD_CASE(2)
  ------------------
  |  |  875|  37.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 37.3k, False: 43.6M]
  |  |  ------------------
  |  |  876|  37.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  37.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  37.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 12, False: 37.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 7, False: 37.3k]
  |  |  ------------------
  |  |  877|     19|      *nextTokPtr = ptr;                                                       \
  |  |  878|     19|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     19|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     19|    }                                                                          \
  |  |  880|  37.3k|    ptr += n;                                                                  \
  |  |  881|  37.3k|    break;
  ------------------
  883|  8.72M|      LEAD_CASE(3)
  ------------------
  |  |  875|  8.72M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 8.72M, False: 34.9M]
  |  |  ------------------
  |  |  876|  8.72M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  8.72M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  8.72M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 17, False: 8.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 8.72M]
  |  |  ------------------
  |  |  877|     20|      *nextTokPtr = ptr;                                                       \
  |  |  878|     20|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     20|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     20|    }                                                                          \
  |  |  880|  8.72M|    ptr += n;                                                                  \
  |  |  881|  8.72M|    break;
  ------------------
  884|  13.9k|      LEAD_CASE(4)
  ------------------
  |  |  875|  13.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 13.9k, False: 43.6M]
  |  |  ------------------
  |  |  876|  13.9k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  13.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  13.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 26, False: 13.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 13.9k]
  |  |  ------------------
  |  |  877|     28|      *nextTokPtr = ptr;                                                       \
  |  |  878|     28|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     28|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     28|    }                                                                          \
  |  |  880|  13.9k|    ptr += n;                                                                  \
  |  |  881|  13.9k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   296k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 296k, False: 43.3M]
  ------------------
  887|   296k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   296k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   296k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 296k, False: 260]
  |  |  ------------------
  ------------------
  888|   296k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|   296k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 276k, False: 20.4k]
  ------------------
  889|   276k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   276k|#  define MINBPC(enc) 1
  ------------------
  890|   276k|          break;
  891|   276k|        }
  892|  20.4k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  20.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  20.4k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 19.9k, False: 465]
  |  |  ------------------
  ------------------
  893|  19.9k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  19.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 19.9k, False: 17]
  ------------------
  894|  19.9k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.9k|#  define MINBPC(enc) 1
  ------------------
  895|  19.9k|            break;
  896|  19.9k|          }
  897|     17|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|     17|#  define MINBPC(enc) 1
  ------------------
  898|     17|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  899|  19.9k|        }
  900|  20.4k|      }
  901|       |      /* fall through */
  902|  14.7k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 14.0k, False: 43.6M]
  ------------------
  903|   262k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 247k, False: 43.4M]
  ------------------
  904|   262k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 17, False: 43.6M]
  ------------------
  905|   262k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 6, False: 43.6M]
  ------------------
  906|   262k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 12, False: 43.6M]
  ------------------
  907|   264k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 1.48k, False: 43.6M]
  ------------------
  908|   855k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 591k, False: 43.0M]
  ------------------
  909|   855k|      *nextTokPtr = ptr;
  910|   855k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   855k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  33.7M|    default:
  ------------------
  |  Branch (911:5): [True: 33.7M, False: 9.92M]
  ------------------
  912|  33.7M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  33.7M|#  define MINBPC(enc) 1
  ------------------
  913|  33.7M|      break;
  914|  43.6M|    }
  915|  43.6M|  }
  916|  62.9k|  *nextTokPtr = ptr;
  917|  62.9k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  62.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   918k|}
xmltok.c:normal_scanLt:
  726|  2.99M|               const char **nextTokPtr) {
  727|  2.99M|#  ifdef XML_NS
  728|  2.99M|  int hadColon;
  729|  2.99M|#  endif
  730|  2.99M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.99M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.99M|    {                                                                          \
  |  |  |  |  135|  2.99M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.99M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.99M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 2.99M]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  2.99M|    }
  |  |  ------------------
  ------------------
  731|  2.99M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.99M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.99M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  2.88M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.93M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.99M]
  |  |  ------------------
  |  |  111|  2.93M|    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.93M|    /* fall through */                                                         \
  |  |  116|  2.93M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.88M, False: 112k]
  |  |  ------------------
  |  |  117|  2.93M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 54.1k, False: 2.93M]
  |  |  ------------------
  |  |  118|  2.93M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.93M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.93M|    break;                                                                     \
  |  |  120|  2.93M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.05k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.06k, False: 2.99M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.06k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.05k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.06k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.06k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  1.06k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.05k|    break;
  |  |  ------------------
  |  |  121|  1.05k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    566|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 581, False: 2.99M]
  |  |  |  |  ------------------
  |  |  |  |  100|    581|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 579]
  |  |  |  |  ------------------
  |  |  |  |  101|    566|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    579|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.15k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    579|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 576]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    576|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    576|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 10, False: 566]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|    579|    ptr += n;                                                                  \
  |  |  |  |  107|    566|    break;
  |  |  ------------------
  |  |  122|    566|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 2.99M]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      4|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      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;
  |  |  ------------------
  ------------------
  733|  38.3k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 38.3k, False: 2.95M]
  ------------------
  734|  38.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  38.3k|#  define MINBPC(enc) 1
  ------------------
  735|  38.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  38.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  38.3k|    {                                                                          \
  |  |  |  |  135|  38.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  38.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  38.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 38.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  38.3k|    }
  |  |  ------------------
  ------------------
  736|  38.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  38.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  38.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 28, False: 38.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    331|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 331, False: 37.9k]
  ------------------
  738|    331|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    331|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    331|#  define MINBPC(enc) 1
  ------------------
  739|  37.9k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 37.9k, False: 359]
  ------------------
  740|  37.9k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  37.9k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  37.9k|#  define MINBPC(enc) 1
  ------------------
  741|  38.3k|    }
  742|     28|    *nextTokPtr = ptr;
  743|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  744|  3.34k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.34k, False: 2.99M]
  ------------------
  745|  3.34k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.34k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.34k|#  define MINBPC(enc) 1
  ------------------
  746|  14.5k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 14.5k, False: 2.97M]
  ------------------
  747|  14.5k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  14.5k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  14.5k|#  define MINBPC(enc) 1
  ------------------
  748|     39|  default:
  ------------------
  |  Branch (748:3): [True: 39, False: 2.99M]
  ------------------
  749|     39|    *nextTokPtr = ptr;
  750|     39|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
  751|  2.99M|  }
  752|  2.93M|#  ifdef XML_NS
  753|  2.93M|  hadColon = 0;
  754|  2.93M|#  endif
  755|       |  /* we have a start-tag */
  756|  3.04M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  3.04M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.04M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.04M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   308k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  98.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.04M]
  |  |  ------------------
  |  |   82|  98.8k|    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|  98.8k|    /* fall through */                                                         \
  |  |   87|  98.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 54.9k, False: 2.98M]
  |  |  ------------------
  |  |   88|  72.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 17.6k, False: 3.02M]
  |  |  ------------------
  |  |   89|  82.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 9.74k, False: 3.03M]
  |  |  ------------------
  |  |   90|  82.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 560, False: 3.04M]
  |  |  ------------------
  |  |   91|  98.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 15.9k, False: 3.02M]
  |  |  ------------------
  |  |   92|  98.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  98.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  98.8k|    break;                                                                     \
  |  |   94|  98.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    708|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 720, False: 3.04M]
  |  |  |  |  ------------------
  |  |  |  |   71|    720|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 718]
  |  |  |  |  ------------------
  |  |  |  |   72|    708|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    718|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.43k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    718|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 710]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    710|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    710|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 708]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    718|    ptr += n;                                                                  \
  |  |  |  |   78|    708|    break;
  |  |  ------------------
  |  |   95|  6.96k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  6.91k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6.96k, False: 3.03M]
  |  |  |  |  ------------------
  |  |  |  |   71|  6.96k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 6.95k]
  |  |  |  |  ------------------
  |  |  |  |   72|  6.91k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  6.95k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.95k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 6.95k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  6.95k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.95k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 38, False: 6.91k]
  |  |  |  |  ------------------
  |  |  |  |   74|     42|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     42|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     42|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     42|    }                                                                          \
  |  |  |  |   77|  6.95k|    ptr += n;                                                                  \
  |  |  |  |   78|  6.91k|    break;
  |  |  ------------------
  |  |   96|  6.91k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 3.04M]
  |  |  |  |  ------------------
  |  |  |  |   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: 7, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     13|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 3.04M]
  ------------------
  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|  8.19k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 8.19k, False: 3.03M]
  ------------------
  777|  8.95k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 762, False: 3.04M]
  ------------------
  778|  11.7k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.82k, False: 3.04M]
  ------------------
  779|  11.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.7k|#  define MINBPC(enc) 1
  ------------------
  780|  13.5k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  13.5k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  13.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  13.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  7.22k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.21k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 13.5k]
  |  |  ------------------
  |  |  111|  9.21k|    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|  9.21k|    /* fall through */                                                         \
  |  |  116|  9.21k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.56k, False: 7.96k]
  |  |  ------------------
  |  |  117|  9.21k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.64k, False: 9.87k]
  |  |  ------------------
  |  |  118|  9.21k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  9.21k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  9.21k|    break;                                                                     \
  |  |  120|  9.21k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    463|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 474, False: 13.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|    474|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 473]
  |  |  |  |  ------------------
  |  |  |  |  101|    463|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    473|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    946|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    473|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 467]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    467|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    467|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 463]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|    473|    ptr += n;                                                                  \
  |  |  |  |  107|    463|    break;
  |  |  ------------------
  |  |  121|    463|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    331|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 348, False: 13.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|    348|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 346]
  |  |  |  |  ------------------
  |  |  |  |  101|    331|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    346|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    692|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    346|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 341]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    341|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    341|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 10, False: 331]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|    346|    ptr += n;                                                                  \
  |  |  |  |  107|    331|    break;
  |  |  ------------------
  |  |  122|    331|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 13.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     20|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, 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|     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;
  |  |  ------------------
  ------------------
  783|    688|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 688, False: 12.8k]
  ------------------
  784|    688|          goto gt;
  785|    998|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 998, False: 12.5k]
  ------------------
  786|    998|          goto sol;
  787|    407|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 407, False: 13.1k]
  ------------------
  788|  1.18k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 782, False: 12.7k]
  ------------------
  789|  1.78k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 593, False: 12.9k]
  ------------------
  790|  1.78k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.78k|#  define MINBPC(enc) 1
  ------------------
  791|  1.78k|          continue;
  792|     10|        default:
  ------------------
  |  Branch (792:9): [True: 10, False: 13.5k]
  ------------------
  793|     10|          *nextTokPtr = ptr;
  794|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  795|  13.5k|        }
  796|  10.0k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  10.0k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  13.5k|      }
  798|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  11.7k|    }
  800|  2.92M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.92M, False: 119k]
  ------------------
  801|  2.92M|    gt:
  802|  2.92M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.92M|#  define MINBPC(enc) 1
  ------------------
  803|  2.92M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.92M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.13k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.13k, False: 3.04M]
  ------------------
  805|  2.13k|    sol:
  806|  2.13k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.13k|#  define MINBPC(enc) 1
  ------------------
  807|  2.13k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.13k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.13k|    {                                                                          \
  |  |  |  |  135|  2.13k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.13k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.13k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 2.12k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  2.13k|    }
  |  |  ------------------
  ------------------
  808|  2.12k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.12k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 15, False: 2.10k]
  ------------------
  809|     15|        *nextTokPtr = ptr;
  810|     15|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  811|     15|      }
  812|  2.10k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.10k|#  define MINBPC(enc) 1
  ------------------
  813|  2.10k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  2.10k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     13|    default:
  ------------------
  |  Branch (814:5): [True: 13, False: 3.04M]
  ------------------
  815|     13|      *nextTokPtr = ptr;
  816|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  817|  3.04M|    }
  818|  3.04M|  }
  819|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.93M|}
xmltok.c:normal_scanCdataSection:
  337|  37.9k|                         const char **nextTokPtr) {
  338|  37.9k|  static const char CDATA_LSQB[]
  339|  37.9k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  37.9k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  37.9k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  37.9k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  37.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  37.9k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  37.9k|#define ASCII_LSQB 0x5B
  ------------------
  340|  37.9k|  int i;
  341|  37.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  37.9k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  37.9k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  37.9k|    {                                                                          \
  |  |  135|  37.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  37.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  37.9k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 37.9k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  37.9k|    }
  ------------------
  344|   265k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   227k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 227k, False: 37.9k]
  ------------------
  345|   227k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|   227k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 13, False: 227k]
  ------------------
  346|     13|      *nextTokPtr = ptr;
  347|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  348|     13|    }
  349|   227k|  }
  350|  37.9k|  *nextTokPtr = ptr;
  351|  37.9k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  37.9k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  37.9k|}
xmltok.c:normal_scanEndTag:
  432|  14.5k|                   const char **nextTokPtr) {
  433|  14.5k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.5k|    {                                                                          \
  |  |  |  |  135|  14.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  14.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  14.5k|    }
  |  |  ------------------
  ------------------
  434|  14.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  14.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  14.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  13.6k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  13.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 14.5k]
  |  |  ------------------
  |  |  111|  13.8k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  13.8k|    /* fall through */                                                         \
  |  |  116|  13.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 12.2k, False: 2.25k]
  |  |  ------------------
  |  |  117|  13.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.59k, False: 12.9k]
  |  |  ------------------
  |  |  118|  13.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  13.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  13.8k|    break;                                                                     \
  |  |  120|  13.8k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    433|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 441, False: 14.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|    441|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 440]
  |  |  |  |  ------------------
  |  |  |  |  101|    433|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    440|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    880|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    440|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 434]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    434|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    434|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 433]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    440|    ptr += n;                                                                  \
  |  |  |  |  107|    433|    break;
  |  |  ------------------
  |  |  121|    433|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    206|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 213, False: 14.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    213|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 212]
  |  |  |  |  ------------------
  |  |  |  |  101|    206|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    212|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    424|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    212|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    210|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    210|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 206]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|    212|    ptr += n;                                                                  \
  |  |  |  |  107|    206|    break;
  |  |  ------------------
  |  |  122|    206|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 14.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      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;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 14.5k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  14.5k|  }
  440|   491k|  while (HAS_CHAR(enc, ptr, end)) {
  441|   491k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   491k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   491k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|   957k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.33k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 491k]
  |  |  ------------------
  |  |   82|  3.33k|    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.33k|    /* fall through */                                                         \
  |  |   87|  3.33k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.14k, False: 490k]
  |  |  ------------------
  |  |   88|  2.12k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 982, False: 490k]
  |  |  ------------------
  |  |   89|  2.71k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 592, False: 491k]
  |  |  ------------------
  |  |   90|  2.98k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 264, False: 491k]
  |  |  ------------------
  |  |   91|  3.33k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 351, False: 491k]
  |  |  ------------------
  |  |   92|  3.33k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.33k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.33k|    break;                                                                     \
  |  |   94|  3.33k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    343|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 348, False: 491k]
  |  |  |  |  ------------------
  |  |  |  |   71|    348|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 347]
  |  |  |  |  ------------------
  |  |  |  |   72|    343|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    347|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    694|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    347|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 346]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    346|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    346|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 343]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|    347|    ptr += n;                                                                  \
  |  |  |  |   78|    343|    break;
  |  |  ------------------
  |  |   95|   473k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   473k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 473k, False: 18.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|   473k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 473k]
  |  |  |  |  ------------------
  |  |  |  |   72|   473k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   473k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   947k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   473k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 473k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   473k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   473k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 33, False: 473k]
  |  |  |  |  ------------------
  |  |  |  |   74|     34|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     34|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     34|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     34|    }                                                                          \
  |  |  |  |   77|   473k|    ptr += n;                                                                  \
  |  |  |  |   78|   473k|    break;
  |  |  ------------------
  |  |   96|   473k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 491k]
  |  |  |  |  ------------------
  |  |  |  |   71|     25|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 24]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     24|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     48|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     24|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     22|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     24|    }                                                                          \
  |  |  |  |   77|     24|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    240|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 240, False: 491k]
  ------------------
  444|    540|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 300, False: 491k]
  ------------------
  445|  12.1k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 11.5k, False: 480k]
  ------------------
  446|  24.0k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  12.1k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  11.9k|#  define MINBPC(enc) 1
  ------------------
  447|  24.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  24.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    215|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 215, False: 23.8k]
  ------------------
  449|    506|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 291, False: 23.7k]
  ------------------
  450|  11.9k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 11.4k, False: 12.5k]
  ------------------
  451|  11.9k|          break;
  452|  12.0k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 12.0k, False: 11.9k]
  ------------------
  453|  12.0k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  12.0k|#  define MINBPC(enc) 1
  ------------------
  454|  12.0k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  12.0k|#define XML_TOK_END_TAG 5
  ------------------
  455|      4|        default:
  ------------------
  |  Branch (455:9): [True: 4, False: 24.0k]
  ------------------
  456|      4|          *nextTokPtr = ptr;
  457|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  458|  24.0k|        }
  459|  24.0k|      }
  460|     35|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 491k]
  ------------------
  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|  2.25k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 2.25k, False: 489k]
  ------------------
  469|  2.25k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.25k|#  define MINBPC(enc) 1
  ------------------
  470|  2.25k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.25k|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 491k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|   491k|    }
  475|   491k|  }
  476|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  14.5k|}
xmltok.c:normal_scanAtts:
  573|  10.0k|                 const char **nextTokPtr) {
  574|  10.0k|#  ifdef XML_NS
  575|  10.0k|  int hadColon = 0;
  576|  10.0k|#  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|  10.1M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.59M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.65M]
  |  |  ------------------
  |  |   82|  2.59M|    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.59M|    /* fall through */                                                         \
  |  |   87|  2.59M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.15M, False: 1.50M]
  |  |  ------------------
  |  |   88|  2.47M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 319k, False: 3.33M]
  |  |  ------------------
  |  |   89|  2.58M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 111k, False: 3.54M]
  |  |  ------------------
  |  |   90|  2.58M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 622, False: 3.65M]
  |  |  ------------------
  |  |   91|  2.59M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 15.1k, False: 3.64M]
  |  |  ------------------
  |  |   92|  2.59M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.59M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.59M|    break;                                                                     \
  |  |   94|  2.59M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  91.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 91.1k, False: 3.56M]
  |  |  |  |  ------------------
  |  |  |  |   71|  91.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 91.1k]
  |  |  |  |  ------------------
  |  |  |  |   72|  91.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  91.1k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   182k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  91.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 91.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  91.1k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  91.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 91.1k]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|  91.1k|    ptr += n;                                                                  \
  |  |  |  |   78|  91.1k|    break;
  |  |  ------------------
  |  |   95|  91.1k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  86.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 86.6k, False: 3.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|  86.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 86.6k]
  |  |  |  |  ------------------
  |  |  |  |   72|  86.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  86.6k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   173k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  86.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 86.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  86.6k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  86.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 18, False: 86.6k]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|  86.6k|    ptr += n;                                                                  \
  |  |  |  |   78|  86.6k|    break;
  |  |  ------------------
  |  |   96|  86.6k|    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: 10, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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|  30.7k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 30.7k, False: 3.62M]
  ------------------
  598|  31.4k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 631, False: 3.65M]
  ------------------
  599|  31.7k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 325, False: 3.65M]
  ------------------
  600|  32.3k|      for (;;) {
  601|  32.3k|        int t;
  602|       |
  603|  32.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  32.3k|#  define MINBPC(enc) 1
  ------------------
  604|  32.3k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  32.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  32.3k|    {                                                                          \
  |  |  |  |  135|  32.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  32.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  32.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 32.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  32.3k|    }
  |  |  ------------------
  ------------------
  605|  32.3k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  32.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  32.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  32.3k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 31.7k, False: 614]
  ------------------
  607|  31.7k|          break;
  608|    614|        switch (t) {
  609|    204|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 204, False: 410]
  ------------------
  610|    404|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 200, False: 414]
  ------------------
  611|    609|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 205, False: 409]
  ------------------
  612|    609|          break;
  613|      5|        default:
  ------------------
  |  Branch (613:9): [True: 5, False: 609]
  ------------------
  614|      5|          *nextTokPtr = ptr;
  615|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  616|    614|        }
  617|    614|      }
  618|       |      /* fall through */
  619|   879k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 847k, False: 2.80M]
  ------------------
  620|   879k|      int open;
  621|   879k|#  ifdef XML_NS
  622|   879k|      hadColon = 0;
  623|   879k|#  endif
  624|   881k|      for (;;) {
  625|   881k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   881k|#  define MINBPC(enc) 1
  ------------------
  626|   881k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   881k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   881k|    {                                                                          \
  |  |  |  |  135|   881k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   881k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   881k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 881k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   881k|    }
  |  |  ------------------
  ------------------
  627|   881k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|   881k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   881k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|   881k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 147k, False: 733k]
  |  Branch (628:32): [True: 731k, False: 1.46k]
  ------------------
  629|   879k|          break;
  630|  1.46k|        switch (open) {
  631|    233|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 233, False: 1.23k]
  ------------------
  632|  1.22k|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 996, False: 470]
  ------------------
  633|  1.45k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 228, False: 1.23k]
  ------------------
  634|  1.45k|          break;
  635|      9|        default:
  ------------------
  |  Branch (635:9): [True: 9, False: 1.45k]
  ------------------
  636|      9|          *nextTokPtr = ptr;
  637|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  638|  1.46k|        }
  639|  1.46k|      }
  640|   879k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   879k|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  8.19M|      for (;;) {
  643|  8.19M|        int t;
  644|  8.19M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.19M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.19M|    {                                                                          \
  |  |  |  |  135|  8.19M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.19M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  8.19M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 74, False: 8.19M]
  |  |  |  |  ------------------
  |  |  |  |  136|     74|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     74|      }                                                                        \
  |  |  |  |  138|  8.19M|    }
  |  |  ------------------
  ------------------
  645|  8.19M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  8.19M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.19M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  8.19M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 879k, False: 7.31M]
  ------------------
  647|   879k|          break;
  648|  7.31M|        switch (t) {
  649|  10.8M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  6.51k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.50k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.51k, False: 7.31M]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.51k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 6.51k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.50k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.51k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.51k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.51k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 6.50k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  6.51k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.50k|    break;
  |  |  ------------------
  |  |   61|  5.39M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.39M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.39M, False: 1.92M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.39M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.39M]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.39M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.39M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.39M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.39M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 5.39M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  5.39M|    ptr += n;                                                                  \
  |  |  |  |   57|  5.39M|    break;
  |  |  ------------------
  |  |   62|  5.39M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.94k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.95k, False: 7.31M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.95k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.95k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.94k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.95k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.95k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.95k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 3.94k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  3.95k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.94k|    break;
  |  |  ------------------
  |  |   63|  3.94k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 2, False: 7.31M]
  |  |  ------------------
  |  |   64|      3|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 7.31M]
  |  |  ------------------
  |  |   65|      5|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 7.31M]
  |  |  ------------------
  |  |   66|      5|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      5|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  58.9k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 58.9k, False: 7.25M]
  ------------------
  651|  58.9k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  58.9k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  58.9k|#  define MINBPC(enc) 1
  ------------------
  652|  58.9k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 10, False: 58.9k]
  ------------------
  653|     10|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 8, False: 2]
  ------------------
  654|      8|              *nextTokPtr = ptr;
  655|     10|            return tok;
  656|     10|          }
  657|  58.9k|          break;
  658|  58.9k|        }
  659|  58.9k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 49, False: 7.31M]
  ------------------
  660|     49|          *nextTokPtr = ptr;
  661|     49|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     49|#define XML_TOK_INVALID 0
  ------------------
  662|  1.85M|        default:
  ------------------
  |  Branch (662:9): [True: 1.85M, False: 5.46M]
  ------------------
  663|  1.85M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.85M|#  define MINBPC(enc) 1
  ------------------
  664|  1.85M|          break;
  665|  7.31M|        }
  666|  7.31M|      }
  667|   879k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   879k|#  define MINBPC(enc) 1
  ------------------
  668|   879k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   879k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   879k|    {                                                                          \
  |  |  |  |  135|   879k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   879k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   879k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 879k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|   879k|    }
  |  |  ------------------
  ------------------
  669|   879k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   879k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   879k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  26.1k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 26.1k, False: 853k]
  ------------------
  671|   809k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 783k, False: 96.3k]
  ------------------
  672|   872k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 63.1k, False: 816k]
  ------------------
  673|   872k|        break;
  674|  3.33k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 3.33k, False: 876k]
  ------------------
  675|  3.33k|        goto sol;
  676|  3.78k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 3.78k, False: 875k]
  ------------------
  677|  3.78k|        goto gt;
  678|      9|      default:
  ------------------
  |  Branch (678:7): [True: 9, False: 879k]
  ------------------
  679|      9|        *nextTokPtr = ptr;
  680|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  681|   879k|      }
  682|       |      /* ptr points to closing quote */
  683|   997k|      for (;;) {
  684|   997k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   997k|#  define MINBPC(enc) 1
  ------------------
  685|   997k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   997k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   997k|    {                                                                          \
  |  |  |  |  135|   997k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   997k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   997k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 997k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|   997k|    }
  |  |  ------------------
  ------------------
  686|   997k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   997k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   997k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|   876k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   785k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 997k]
  |  |  ------------------
  |  |  111|   785k|    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|   785k|    /* fall through */                                                         \
  |  |  116|   785k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 708k, False: 288k]
  |  |  ------------------
  |  |  117|   785k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 77.2k, False: 919k]
  |  |  ------------------
  |  |  118|   785k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   785k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   785k|    break;                                                                     \
  |  |  120|   785k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  82.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 82.6k, False: 914k]
  |  |  |  |  ------------------
  |  |  |  |  100|  82.6k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 82.6k]
  |  |  |  |  ------------------
  |  |  |  |  101|  82.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  82.6k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   165k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  82.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 82.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  82.6k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  82.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 82.6k]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|  82.6k|    ptr += n;                                                                  \
  |  |  |  |  107|  82.6k|    break;
  |  |  ------------------
  |  |  121|  82.6k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.65k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.68k, False: 995k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.68k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.68k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.65k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.68k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.37k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.68k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.68k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.68k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.68k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 30, False: 1.65k]
  |  |  |  |  ------------------
  |  |  |  |  103|     33|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     33|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     33|    }                                                                          \
  |  |  |  |  106|  1.68k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.65k|    break;
  |  |  ------------------
  |  |  122|  1.65k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 997k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, 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|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  1.31k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 1.31k, False: 995k]
  ------------------
  689|   124k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 123k, False: 874k]
  ------------------
  690|   124k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 537, False: 996k]
  ------------------
  691|   124k|          continue;
  692|    359|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 359, False: 996k]
  ------------------
  693|  4.14k|        gt:
  694|  4.14k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.14k|#  define MINBPC(enc) 1
  ------------------
  695|  4.14k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.14k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  2.01k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 2.01k, False: 995k]
  ------------------
  697|  5.35k|        sol:
  698|  5.35k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.35k|#  define MINBPC(enc) 1
  ------------------
  699|  5.35k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.35k|    {                                                                          \
  |  |  |  |  135|  5.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.35k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 5.34k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  5.35k|    }
  |  |  ------------------
  ------------------
  700|  5.34k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  5.34k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 9, False: 5.34k]
  ------------------
  701|      9|            *nextTokPtr = ptr;
  702|      9|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  703|      9|          }
  704|  5.34k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.34k|#  define MINBPC(enc) 1
  ------------------
  705|  5.34k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  5.34k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      4|        default:
  ------------------
  |  Branch (706:9): [True: 4, False: 997k]
  ------------------
  707|      4|          *nextTokPtr = ptr;
  708|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  709|   997k|        }
  710|   869k|        break;
  711|   997k|      }
  712|   869k|      break;
  713|   872k|    }
  714|   869k|    default:
  ------------------
  |  Branch (714:5): [True: 14, False: 3.65M]
  ------------------
  715|     14|      *nextTokPtr = ptr;
  716|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  717|  3.65M|    }
  718|  3.65M|  }
  719|     93|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     93|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  10.0k|}
xmltok.c:normal_scanRef:
  545|   455k|                const char **nextTokPtr) {
  546|   455k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   455k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   455k|    {                                                                          \
  |  |  |  |  135|   455k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   455k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   455k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 455k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   455k|    }
  |  |  ------------------
  ------------------
  547|   455k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   455k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   455k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|   402k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   413k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 455k]
  |  |  ------------------
  |  |  111|   413k|    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|   413k|    /* fall through */                                                         \
  |  |  116|   413k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 401k, False: 54.2k]
  |  |  ------------------
  |  |  117|   413k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 12.1k, False: 443k]
  |  |  ------------------
  |  |  118|   413k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   413k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   413k|    break;                                                                     \
  |  |  120|   413k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    387|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 391, False: 455k]
  |  |  |  |  ------------------
  |  |  |  |  100|    391|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 390]
  |  |  |  |  ------------------
  |  |  |  |  101|    387|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    390|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    780|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    390|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 389]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    389|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    389|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 387]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    390|    ptr += n;                                                                  \
  |  |  |  |  107|    387|    break;
  |  |  ------------------
  |  |  121|    474|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    467|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 474, False: 454k]
  |  |  |  |  ------------------
  |  |  |  |  100|    474|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 3, False: 471]
  |  |  |  |  ------------------
  |  |  |  |  101|    467|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    471|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    942|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    471|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 469]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    469|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    469|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 467]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    471|    ptr += n;                                                                  \
  |  |  |  |  107|    467|    break;
  |  |  ------------------
  |  |  122|    467|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 455k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     18|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, 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|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|      9|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  41.1k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 41.1k, False: 414k]
  ------------------
  550|  41.1k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  41.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  41.1k|#  define MINBPC(enc) 1
  ------------------
  551|     12|  default:
  ------------------
  |  Branch (551:3): [True: 12, False: 455k]
  ------------------
  552|     12|    *nextTokPtr = ptr;
  553|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  554|   455k|  }
  555|   441k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   441k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   441k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   441k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|   101k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  25.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 441k]
  |  |  ------------------
  |  |   82|  25.9k|    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|  25.9k|    /* fall through */                                                         \
  |  |   87|  25.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 23.3k, False: 418k]
  |  |  ------------------
  |  |   88|  24.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.30k, False: 440k]
  |  |  ------------------
  |  |   89|  25.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 630, False: 440k]
  |  |  ------------------
  |  |   90|  25.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 227, False: 441k]
  |  |  ------------------
  |  |   91|  25.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 417, False: 440k]
  |  |  ------------------
  |  |   92|  25.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  25.9k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  25.9k|    break;                                                                     \
  |  |   94|  25.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    335|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 345, False: 441k]
  |  |  |  |  ------------------
  |  |  |  |   71|    345|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 344]
  |  |  |  |  ------------------
  |  |  |  |   72|    335|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    344|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    688|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    344|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 337]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    337|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    337|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 335]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|    344|    ptr += n;                                                                  \
  |  |  |  |   78|    335|    break;
  |  |  ------------------
  |  |   95|    930|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    926|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 930, False: 440k]
  |  |  |  |  ------------------
  |  |  |  |   71|    930|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 929]
  |  |  |  |  ------------------
  |  |  |  |   72|    926|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    929|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.85k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    929|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 927]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    927|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    927|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 926]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|    929|    ptr += n;                                                                  \
  |  |  |  |   78|    926|    break;
  |  |  ------------------
  |  |   96|    926|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 441k]
  |  |  |  |  ------------------
  |  |  |  |   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: 17, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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;
  |  |  ------------------
  ------------------
  558|   414k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 414k, False: 27.2k]
  ------------------
  559|   414k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   414k|#  define MINBPC(enc) 1
  ------------------
  560|   414k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   414k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      6|    default:
  ------------------
  |  Branch (561:5): [True: 6, False: 441k]
  ------------------
  562|      6|      *nextTokPtr = ptr;
  563|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  564|   441k|    }
  565|   441k|  }
  566|     39|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   414k|}
xmltok.c:normal_scanCharRef:
  514|  41.1k|                    const char **nextTokPtr) {
  515|  41.1k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  41.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  41.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  41.1k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 41.1k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  41.1k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  41.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 39.4k, False: 1.72k]
  |  |  ------------------
  ------------------
  517|  39.4k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  39.4k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  39.4k|#  define MINBPC(enc) 1
  ------------------
  518|  1.72k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.72k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.72k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  1.71k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.71k, False: 14]
  ------------------
  520|  1.71k|      break;
  521|     14|    default:
  ------------------
  |  Branch (521:5): [True: 14, False: 1.71k]
  ------------------
  522|     14|      *nextTokPtr = ptr;
  523|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  524|  1.72k|    }
  525|  4.98k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.71k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.27k|#  define MINBPC(enc) 1
  ------------------
  526|  4.98k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.98k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  3.27k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.27k, False: 1.70k]
  ------------------
  528|  3.27k|        break;
  529|  1.69k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.69k, False: 3.28k]
  ------------------
  530|  1.69k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.69k|#  define MINBPC(enc) 1
  ------------------
  531|  1.69k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.69k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     13|      default:
  ------------------
  |  Branch (532:7): [True: 13, False: 4.96k]
  ------------------
  533|     13|        *nextTokPtr = ptr;
  534|     13|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  535|  4.98k|      }
  536|  4.98k|    }
  537|  1.71k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  41.1k|}
xmltok.c:normal_scanHexCharRef:
  483|  39.4k|                       const char **nextTokPtr) {
  484|  39.4k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  39.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  39.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  39.4k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 39.4k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  39.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  39.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  39.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  37.1k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 37.1k, False: 2.27k]
  ------------------
  487|  39.4k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.26k, False: 37.1k]
  ------------------
  488|  39.4k|      break;
  489|      8|    default:
  ------------------
  |  Branch (489:5): [True: 8, False: 39.4k]
  ------------------
  490|      8|      *nextTokPtr = ptr;
  491|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  492|  39.4k|    }
  493|   120k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  39.4k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  81.5k|#  define MINBPC(enc) 1
  ------------------
  494|   120k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   120k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   120k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  24.3k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 24.3k, False: 96.6k]
  ------------------
  496|  81.5k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 57.1k, False: 63.8k]
  ------------------
  497|  81.5k|        break;
  498|  39.4k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 39.4k, False: 81.5k]
  ------------------
  499|  39.4k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  39.4k|#  define MINBPC(enc) 1
  ------------------
  500|  39.4k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  39.4k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     17|      default:
  ------------------
  |  Branch (501:7): [True: 17, False: 120k]
  ------------------
  502|     17|        *nextTokPtr = ptr;
  503|     17|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  504|   120k|      }
  505|   120k|    }
  506|  39.4k|  }
  507|     12|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  39.4k|}
xmltok.c:normal_cdataSectionTok:
  356|  1.78M|                        const char **nextTokPtr) {
  357|  1.78M|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 157, False: 1.78M]
  ------------------
  358|    157|    return XML_TOK_NONE;
  ------------------
  |  |   51|    157|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  1.78M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  1.78M|#  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|  1.78M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.78M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.78M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  1.73M|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 1.73M, False: 47.9k]
  ------------------
  370|  1.73M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.73M|#  define MINBPC(enc) 1
  ------------------
  371|  1.73M|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.73M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.73M|    {                                                                          \
  |  |  |  |  135|  1.73M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.73M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.73M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.73M]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.73M|    }
  |  |  ------------------
  ------------------
  372|  1.73M|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  1.73M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 42.0k, False: 1.69M]
  ------------------
  373|  42.0k|      break;
  374|  1.69M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.69M|#  define MINBPC(enc) 1
  ------------------
  375|  1.69M|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.69M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.69M|    {                                                                          \
  |  |  |  |  135|  1.69M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.69M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.69M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 1.69M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  1.69M|    }
  |  |  ------------------
  ------------------
  376|  1.69M|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.69M|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 1.65M, False: 37.6k]
  ------------------
  377|  1.65M|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  1.65M|#  define MINBPC(enc) 1
  ------------------
  378|  1.65M|      break;
  379|  1.65M|    }
  380|  37.6k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  37.6k|#  define MINBPC(enc) 1
  ------------------
  381|  37.6k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  37.6k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  18.4k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 18.4k, False: 1.76M]
  ------------------
  383|  18.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  18.4k|#  define MINBPC(enc) 1
  ------------------
  384|  18.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  18.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  18.4k|    {                                                                          \
  |  |  |  |  135|  18.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  18.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  18.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 18.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  18.4k|    }
  |  |  ------------------
  ------------------
  385|  18.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  18.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  18.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 211, False: 18.2k]
  ------------------
  386|    211|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    211|#  define MINBPC(enc) 1
  ------------------
  387|  18.4k|    *nextTokPtr = ptr;
  388|  18.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  18.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  8.03k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 8.03k, False: 1.77M]
  ------------------
  390|  8.03k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.03k|#  define MINBPC(enc) 1
  ------------------
  391|  8.03k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.03k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  8.03k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.18k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.17k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.18k, False: 1.78M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.18k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 9, False: 2.18k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.17k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      9|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.18k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.18k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.18k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 2.17k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  2.18k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.17k|    break;
  |  |  ------------------
  |  |   61|  2.17k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.22k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.24k, False: 1.78M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.24k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 7, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.22k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.23k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.23k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.23k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  1.23k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.22k|    break;
  |  |  ------------------
  |  |   62|  1.22k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    397|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 402, False: 1.78M]
  |  |  |  |  ------------------
  |  |  |  |   50|    402|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 399]
  |  |  |  |  ------------------
  |  |  |  |   51|    397|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    399|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    399|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    399|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 397]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|    399|    ptr += n;                                                                  \
  |  |  |  |   57|    397|    break;
  |  |  ------------------
  |  |   63|    397|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 1.78M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 1.78M]
  |  |  ------------------
  |  |   65|     25|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 1.78M]
  |  |  ------------------
  |  |   66|     25|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  17.5k|  default:
  ------------------
  |  Branch (393:3): [True: 17.5k, False: 1.76M]
  ------------------
  394|  17.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  17.5k|#  define MINBPC(enc) 1
  ------------------
  395|  17.5k|    break;
  396|  1.78M|  }
  397|  11.0M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  11.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.0M|  (((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|  7.16k|      LEAD_CASE(2)
  ------------------
  |  |  400|  7.15k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 7.16k, False: 11.0M]
  |  |  ------------------
  |  |  401|  7.16k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  7.16k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  7.16k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 7.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 8, False: 7.16k]
  |  |  ------------------
  |  |  402|     14|      *nextTokPtr = ptr;                                                       \
  |  |  403|     14|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     14|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     14|    }                                                                          \
  |  |  405|  7.15k|    ptr += n;                                                                  \
  |  |  406|  7.15k|    break;
  ------------------
  408|  2.27M|      LEAD_CASE(3)
  ------------------
  |  |  400|  2.27M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 2.27M, False: 8.78M]
  |  |  ------------------
  |  |  401|  2.27M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  2.27M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  2.27M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 2.27M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 5, False: 2.27M]
  |  |  ------------------
  |  |  402|      9|      *nextTokPtr = ptr;                                                       \
  |  |  403|      9|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      9|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      9|    }                                                                          \
  |  |  405|  2.27M|    ptr += n;                                                                  \
  |  |  406|  2.27M|    break;
  ------------------
  409|  9.24k|      LEAD_CASE(4)
  ------------------
  |  |  400|  9.24k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 9.24k, False: 11.0M]
  |  |  ------------------
  |  |  401|  9.24k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  9.24k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  9.24k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 9.24k]
  |  |  ------------------
  |  |  402|      3|      *nextTokPtr = ptr;                                                       \
  |  |  403|      3|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      3|    }                                                                          \
  |  |  405|  9.24k|    ptr += n;                                                                  \
  |  |  406|  9.24k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     10|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 10, False: 11.0M]
  ------------------
  412|     11|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 1, False: 11.0M]
  ------------------
  413|     19|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 8, False: 11.0M]
  ------------------
  414|  15.6k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 15.6k, False: 11.0M]
  ------------------
  415|  22.6k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 6.99k, False: 11.0M]
  ------------------
  416|  1.72M|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 1.70M, False: 9.36M]
  ------------------
  417|  1.72M|      *nextTokPtr = ptr;
  418|  1.72M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.72M|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  7.04M|    default:
  ------------------
  |  Branch (419:5): [True: 7.04M, False: 4.01M]
  ------------------
  420|  7.04M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.04M|#  define MINBPC(enc) 1
  ------------------
  421|  7.04M|      break;
  422|  11.0M|    }
  423|  11.0M|  }
  424|    127|  *nextTokPtr = ptr;
  425|    127|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    127|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  1.72M|}
xmltok.c:normal_attributeValueTok:
 1262|  19.7M|                          const char **nextTokPtr) {
 1263|  19.7M|  const char *start;
 1264|  19.7M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 414k, False: 19.3M]
  ------------------
 1265|   414k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   414k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  19.3M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  19.3M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  19.3M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  19.3M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 19.3M]
  ------------------
 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|  19.3M|  start = ptr;
 1275|  1.10G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.10G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.10G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.10G|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|  1.52M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  1.52M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 1.52M, False: 1.10G]
  |  |  ------------------
  |  | 1279|  1.52M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  1.52M|    break;
  ------------------
 1282|   881M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   881M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 881M, False: 224M]
  |  |  ------------------
  |  | 1279|   881M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   881M|    break;
  ------------------
 1283|   619k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   619k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 619k, False: 1.10G]
  |  |  ------------------
  |  | 1279|   619k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   619k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   383k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 383k, False: 1.10G]
  ------------------
 1286|   383k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 301k, False: 81.6k]
  ------------------
 1287|   301k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   301k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   301k|#  define MINBPC(enc) 1
  ------------------
 1288|  81.6k|      *nextTokPtr = ptr;
 1289|  81.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  81.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      6|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 6, False: 1.10G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      6|      *nextTokPtr = ptr;
 1293|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1294|  16.8M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 16.8M, False: 1.08G]
  ------------------
 1295|  16.8M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 14.2M, False: 2.61M]
  ------------------
 1296|  14.2M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.2M|#  define MINBPC(enc) 1
  ------------------
 1297|  14.2M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  14.2M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  14.2M|      }
 1299|  2.61M|      *nextTokPtr = ptr;
 1300|  2.61M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.61M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   765k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 765k, False: 1.10G]
  ------------------
 1302|   765k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 689k, False: 76.0k]
  ------------------
 1303|   689k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   689k|#  define MINBPC(enc) 1
  ------------------
 1304|   689k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   689k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   689k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   689k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 625, False: 689k]
  ------------------
 1305|    625|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    625|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   689k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   689k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   689k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 415k, False: 274k]
  ------------------
 1307|   415k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   415k|#  define MINBPC(enc) 1
  ------------------
 1308|   689k|        *nextTokPtr = ptr;
 1309|   689k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   689k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   689k|      }
 1311|  76.0k|      *nextTokPtr = ptr;
 1312|  76.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  76.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|   989k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 989k, False: 1.10G]
  ------------------
 1314|   989k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 617k, False: 371k]
  ------------------
 1315|   617k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   617k|#  define MINBPC(enc) 1
  ------------------
 1316|   617k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|   617k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|   617k|      }
 1318|   371k|      *nextTokPtr = ptr;
 1319|   371k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   371k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   203M|    default:
  ------------------
  |  Branch (1320:5): [True: 203M, False: 902M]
  ------------------
 1321|   203M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   203M|#  define MINBPC(enc) 1
  ------------------
 1322|   203M|      break;
 1323|  1.10G|    }
 1324|  1.10G|  }
 1325|   387k|  *nextTokPtr = ptr;
 1326|   387k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   387k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  19.3M|}
xmltok.c:normal_entityValueTok:
 1331|   721k|                       const char **nextTokPtr) {
 1332|   721k|  const char *start;
 1333|   721k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 3.56k, False: 717k]
  ------------------
 1334|  3.56k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.56k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   717k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   717k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   717k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   717k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 717k]
  ------------------
 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|   717k|  start = ptr;
 1344|  11.0M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  11.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.0M|  (((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|    857|      LEAD_CASE(2)
  ------------------
  |  | 1347|    857|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 857, False: 11.0M]
  |  |  ------------------
  |  | 1348|    857|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    857|    break;
  ------------------
 1351|    955|      LEAD_CASE(3)
  ------------------
  |  | 1347|    955|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 955, False: 11.0M]
  |  |  ------------------
  |  | 1348|    955|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    955|    break;
  ------------------
 1352|    710|      LEAD_CASE(4)
  ------------------
  |  | 1347|    710|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 710, False: 11.0M]
  |  |  ------------------
  |  | 1348|    710|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    710|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  13.4k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 13.4k, False: 11.0M]
  ------------------
 1355|  13.4k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 10.6k, False: 2.76k]
  ------------------
 1356|  10.6k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  10.6k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  10.6k|#  define MINBPC(enc) 1
  ------------------
 1357|  2.76k|      *nextTokPtr = ptr;
 1358|  2.76k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.76k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      5|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 5, False: 11.0M]
  ------------------
 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|  4.06k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 4.06k, False: 11.0M]
  ------------------
 1367|  4.06k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 2.60k, False: 1.45k]
  ------------------
 1368|  2.60k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.60k|#  define MINBPC(enc) 1
  ------------------
 1369|  2.60k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.60k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  2.60k|      }
 1371|  1.45k|      *nextTokPtr = ptr;
 1372|  1.45k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.45k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   699k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 699k, False: 10.3M]
  ------------------
 1374|   699k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 675k, False: 23.5k]
  ------------------
 1375|   675k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   675k|#  define MINBPC(enc) 1
  ------------------
 1376|   675k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   675k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   675k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   675k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 321, False: 675k]
  ------------------
 1377|    321|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    321|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   675k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   675k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   675k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 331, False: 675k]
  ------------------
 1379|    331|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    331|#  define MINBPC(enc) 1
  ------------------
 1380|   675k|        *nextTokPtr = ptr;
 1381|   675k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   675k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   675k|      }
 1383|  23.5k|      *nextTokPtr = ptr;
 1384|  23.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  10.3M|    default:
  ------------------
  |  Branch (1385:5): [True: 10.3M, False: 719k]
  ------------------
 1386|  10.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.3M|#  define MINBPC(enc) 1
  ------------------
 1387|  10.3M|      break;
 1388|  11.0M|    }
 1389|  11.0M|  }
 1390|  1.06k|  *nextTokPtr = ptr;
 1391|  1.06k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.06k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   717k|}
xmltok.c:normal_nameMatchesAscii:
 1715|  89.2k|                         const char *end1, const char *ptr2) {
 1716|  89.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  89.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   463k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   374k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 408k, False: 55.4k]
  ------------------
 1718|   408k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   408k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 47, False: 408k]
  ------------------
 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|     47|      return 0; /* LCOV_EXCL_LINE */
 1725|     47|    }
 1726|   408k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   408k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 33.7k, False: 374k]
  ------------------
 1727|  33.7k|      return 0;
 1728|   408k|  }
 1729|  55.4k|  return ptr1 == end1;
 1730|  89.2k|}
xmltok.c:normal_nameLength:
 1733|  2.96M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.96M|  const char *start = ptr;
 1735|  6.47M|  for (;;) {
 1736|  6.47M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.47M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.47M|  (((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|  2.88k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  2.88k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 2.88k, False: 6.47M]
  |  |  ------------------
  |  | 1739|  2.88k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  2.88k|    break;
  ------------------
 1742|   444k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   444k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 444k, False: 6.03M]
  |  |  ------------------
  |  | 1739|   444k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   444k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 6.47M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 0, False: 6.47M]
  ------------------
 1746|  2.95M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 2.95M, False: 3.51M]
  ------------------
 1747|  2.95M|#  ifdef XML_NS
 1748|  2.95M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 6.47M]
  ------------------
 1749|  2.95M|#  endif
 1750|  3.03M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 78.3k, False: 6.39M]
  ------------------
 1751|  3.04M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 10.9k, False: 6.46M]
  ------------------
 1752|  3.04M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 694, False: 6.47M]
  ------------------
 1753|  3.06M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 15.9k, False: 6.45M]
  ------------------
 1754|  3.06M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.06M|#  define MINBPC(enc) 1
  ------------------
 1755|  3.06M|      break;
 1756|  2.96M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.96M, False: 3.51M]
  ------------------
 1757|  2.96M|      return (int)(ptr - start);
 1758|  6.47M|    }
 1759|  6.47M|  }
 1760|  2.96M|}
xmltok.c:normal_getAtts:
 1510|  2.93M|                ATTRIBUTE *atts) {
 1511|  2.93M|  enum { other, inName, inValue } state = inName;
 1512|  2.93M|  int nAtts = 0;
 1513|  2.93M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  24.1M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.93M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  21.2M|#  define MINBPC(enc) 1
  ------------------
 1517|  24.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  24.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|   352k|      LEAD_CASE(2)
  ------------------
  |  | 1527|   352k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 352k, False: 23.7M]
  |  |  ------------------
  |  | 1528|   352k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   352k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 164k, False: 188k]
  |  |  |  |  ------------------
  |  |  |  | 1520|   164k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 82.5k, False: 81.7k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  82.5k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  82.5k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  82.5k|      }                                                                        \
  |  |  |  | 1524|   164k|      state = inName;                                                          \
  |  |  |  | 1525|   164k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|   352k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|   352k|    break;
  ------------------
 1531|  1.71M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  1.71M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.71M, False: 22.4M]
  |  |  ------------------
  |  | 1528|  1.71M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.71M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 3.41k, False: 1.71M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  3.41k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 1.88k, False: 1.52k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  1.88k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  1.88k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  1.88k|      }                                                                        \
  |  |  |  | 1524|  3.41k|      state = inName;                                                          \
  |  |  |  | 1525|  3.41k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.71M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.71M|    break;
  ------------------
 1532|  3.83k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  3.83k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 3.83k, False: 24.1M]
  |  |  ------------------
  |  | 1528|  3.83k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  3.83k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 3.83k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  3.83k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  3.83k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 24.1M]
  ------------------
 1535|  8.81M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 8.81M, False: 15.3M]
  ------------------
 1536|  9.73M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 919k, False: 23.2M]
  ------------------
 1537|  9.73M|      START_NAME
  ------------------
  |  | 1519|  9.73M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 1.56M, False: 8.16M]
  |  |  ------------------
  |  | 1520|  1.56M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 790k, False: 774k]
  |  |  ------------------
  |  | 1521|   790k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   790k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   790k|      }                                                                        \
  |  | 1524|  1.56M|      state = inName;                                                          \
  |  | 1525|  1.56M|    }
  ------------------
 1538|  9.73M|      break;
 1539|      0|#  undef START_NAME
 1540|   568k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 568k, False: 23.5M]
  ------------------
 1541|   568k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 283k, False: 285k]
  ------------------
 1542|   283k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 147k, False: 135k]
  ------------------
 1543|   147k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   147k|#  define MINBPC(enc) 1
  ------------------
 1544|   283k|        state = inValue;
 1545|   283k|        open = BT_QUOT;
 1546|   285k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 283k, False: 2.29k]
  ------------------
 1547|   283k|        state = other;
 1548|   283k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 147k, False: 135k]
  ------------------
 1549|   147k|          atts[nAtts].valueEnd = ptr;
 1550|   283k|        nAtts++;
 1551|   283k|      }
 1552|   568k|      break;
 1553|  2.92M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 2.92M, False: 21.2M]
  ------------------
 1554|  2.92M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 1.44M, False: 1.47M]
  ------------------
 1555|  1.44M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 727k, False: 722k]
  ------------------
 1556|   727k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   727k|#  define MINBPC(enc) 1
  ------------------
 1557|  1.44M|        state = inValue;
 1558|  1.44M|        open = BT_APOS;
 1559|  1.47M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 1.44M, False: 29.7k]
  ------------------
 1560|  1.44M|        state = other;
 1561|  1.44M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 727k, False: 722k]
  ------------------
 1562|   727k|          atts[nAtts].valueEnd = ptr;
 1563|  1.44M|        nAtts++;
 1564|  1.44M|      }
 1565|  2.92M|      break;
 1566|  59.1k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 59.1k, False: 24.0M]
  ------------------
 1567|  59.1k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 58.8k, False: 280]
  ------------------
 1568|  58.8k|        atts[nAtts].normalized = 0;
 1569|  59.1k|      break;
 1570|   206k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 206k, False: 23.9M]
  ------------------
 1571|   206k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 68.8k, False: 137k]
  ------------------
 1572|  68.8k|        state = other;
 1573|   137k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 88.3k, False: 49.4k]
  |  Branch (1573:36): [True: 87.0k, False: 1.30k]
  |  Branch (1573:55): [True: 2.98k, False: 84.0k]
  ------------------
 1574|   137k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.59k, False: 1.39k]
  ------------------
 1575|  2.98k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  1.39k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  4.38k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 582, False: 817]
  ------------------
 1576|  2.98k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|    817|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  3.80k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 218, False: 599]
  ------------------
 1577|  2.98k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    599|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    599|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 303, False: 296]
  ------------------
 1578|  2.69k|        atts[nAtts].normalized = 0;
 1579|   206k|      break;
 1580|  2.49M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 2.49M, False: 21.6M]
  ------------------
 1581|  3.29M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 796k, False: 23.3M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  3.29M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 5.35k, False: 3.28M]
  ------------------
 1585|  5.35k|        state = other;
 1586|  3.28M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 1.36M, False: 1.92M]
  |  Branch (1586:36): [True: 1.35M, False: 3.81k]
  ------------------
 1587|  1.35M|        atts[nAtts].normalized = 0;
 1588|  3.29M|      break;
 1589|  2.96M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.96M, False: 21.1M]
  ------------------
 1590|  2.99M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 24.4k, False: 24.1M]
  ------------------
 1591|  2.99M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.93M, False: 53.1k]
  ------------------
 1592|  2.93M|        return nAtts;
 1593|  53.1k|      break;
 1594|  2.29M|    default:
  ------------------
  |  Branch (1594:5): [True: 2.29M, False: 21.8M]
  ------------------
 1595|  2.29M|      break;
 1596|  24.1M|    }
 1597|  24.1M|  }
 1598|       |  /* not reached */
 1599|  2.93M|}
xmltok.c:normal_charRefNumber:
 1602|  23.1k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  23.1k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  23.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  23.1k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  23.1k|#  define MINBPC(enc) 1
  ------------------
 1607|  23.1k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  23.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 21.8k, False: 1.26k]
  |  |  ------------------
  ------------------
 1608|  88.6k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  21.8k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  88.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 66.7k, False: 21.8k]
  ------------------
 1609|  66.7k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  66.7k|#  define MINBPC(enc) 1
  ------------------
 1610|  66.7k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  66.7k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  66.7k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 66.7k]
  ------------------
 1612|    831|      case ASCII_0:
  ------------------
  |  |   90|    831|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 831, False: 65.9k]
  ------------------
 1613|  1.50k|      case ASCII_1:
  ------------------
  |  |   91|  1.50k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 678, False: 66.1k]
  ------------------
 1614|  4.84k|      case ASCII_2:
  ------------------
  |  |   92|  4.84k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 3.33k, False: 63.4k]
  ------------------
 1615|  5.45k|      case ASCII_3:
  ------------------
  |  |   93|  5.45k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 604, False: 66.1k]
  ------------------
 1616|  6.08k|      case ASCII_4:
  ------------------
  |  |   94|  6.08k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 631, False: 66.1k]
  ------------------
 1617|  22.9k|      case ASCII_5:
  ------------------
  |  |   95|  22.9k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 16.8k, False: 49.9k]
  ------------------
 1618|  28.7k|      case ASCII_6:
  ------------------
  |  |   96|  28.7k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 5.74k, False: 61.0k]
  ------------------
 1619|  31.0k|      case ASCII_7:
  ------------------
  |  |   97|  31.0k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 2.31k, False: 64.4k]
  ------------------
 1620|  33.2k|      case ASCII_8:
  ------------------
  |  |   98|  33.2k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 2.25k, False: 64.5k]
  ------------------
 1621|  33.5k|      case ASCII_9:
  ------------------
  |  |   99|  33.5k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 289, False: 66.5k]
  ------------------
 1622|  33.5k|        result <<= 4;
 1623|  33.5k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  33.5k|#define ASCII_0 0x30
  ------------------
 1624|  33.5k|        break;
 1625|    276|      case ASCII_A:
  ------------------
  |  |   36|    276|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 276, False: 66.5k]
  ------------------
 1626|    919|      case ASCII_B:
  ------------------
  |  |   37|    919|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 643, False: 66.1k]
  ------------------
 1627|  1.67k|      case ASCII_C:
  ------------------
  |  |   38|  1.67k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 758, False: 66.0k]
  ------------------
 1628|  1.96k|      case ASCII_D:
  ------------------
  |  |   39|  1.96k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 290, False: 66.5k]
  ------------------
 1629|  16.0k|      case ASCII_E:
  ------------------
  |  |   40|  16.0k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 14.0k, False: 52.7k]
  ------------------
 1630|  16.7k|      case ASCII_F:
  ------------------
  |  |   41|  16.7k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 751, False: 66.0k]
  ------------------
 1631|  16.7k|        result <<= 4;
 1632|  16.7k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  16.7k|#define ASCII_A 0x41
  ------------------
 1633|  16.7k|        break;
 1634|    401|      case ASCII_a:
  ------------------
  |  |   63|    401|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 401, False: 66.3k]
  ------------------
 1635|    801|      case ASCII_b:
  ------------------
  |  |   64|    801|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 400, False: 66.3k]
  ------------------
 1636|  14.7k|      case ASCII_c:
  ------------------
  |  |   65|  14.7k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 13.9k, False: 52.8k]
  ------------------
 1637|  15.0k|      case ASCII_d:
  ------------------
  |  |   66|  15.0k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 244, False: 66.5k]
  ------------------
 1638|  15.5k|      case ASCII_e:
  ------------------
  |  |   67|  15.5k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 482, False: 66.3k]
  ------------------
 1639|  16.4k|      case ASCII_f:
  ------------------
  |  |   68|  16.4k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 912, False: 65.8k]
  ------------------
 1640|  16.4k|        result <<= 4;
 1641|  16.4k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  16.4k|#define ASCII_a 0x61
  ------------------
 1642|  16.4k|        break;
 1643|  66.7k|      }
 1644|  66.7k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 23, False: 66.7k]
  ------------------
 1645|     23|        return -1;
 1646|  66.7k|    }
 1647|  21.8k|  } else {
 1648|  4.77k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  4.77k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.51k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 3.52k, False: 1.25k]
  ------------------
 1649|  3.52k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  3.52k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  3.52k|      result *= 10;
 1651|  3.52k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.52k|#define ASCII_0 0x30
  ------------------
 1652|  3.52k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 3.51k]
  ------------------
 1653|      5|        return -1;
 1654|  3.52k|    }
 1655|  1.26k|  }
 1656|  23.1k|  return checkCharRefNumber(result);
 1657|  23.1k|}
xmltok.c:normal_predefinedEntityName:
 1661|   368k|                             const char *end) {
 1662|   368k|  UNUSED_P(enc);
  ------------------
  |  |  135|   368k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   368k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|   368k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 350k, False: 18.8k]
  ------------------
 1664|  14.5k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 14.5k, False: 354k]
  ------------------
 1665|  14.5k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  14.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 13.6k, False: 852]
  |  |  ------------------
  ------------------
 1666|  13.6k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  13.6k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 232, False: 13.4k]
  |  |  ------------------
  ------------------
 1667|  12.9k|      case ASCII_l:
  ------------------
  |  |   74|  12.9k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 12.9k, False: 763]
  ------------------
 1668|  12.9k|        return ASCII_LT;
  ------------------
  |  |  111|  12.9k|#define ASCII_LT 0x3C
  ------------------
 1669|    531|      case ASCII_g:
  ------------------
  |  |   69|    531|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 531, False: 13.1k]
  ------------------
 1670|    531|        return ASCII_GT;
  ------------------
  |  |  113|    531|#define ASCII_GT 0x3E
  ------------------
 1671|  13.6k|      }
 1672|  13.6k|    }
 1673|  1.08k|    break;
 1674|  1.39k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.39k, False: 367k]
  ------------------
 1675|  1.39k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.39k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 878, False: 514]
  |  |  ------------------
  ------------------
 1676|    878|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    878|#  define MINBPC(enc) 1
  ------------------
 1677|    878|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    878|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 669, False: 209]
  |  |  ------------------
  ------------------
 1678|    669|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    669|#  define MINBPC(enc) 1
  ------------------
 1679|    669|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    669|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 467, False: 202]
  |  |  ------------------
  ------------------
 1680|    467|          return ASCII_AMP;
  ------------------
  |  |  105|    467|#define ASCII_AMP 0x26
  ------------------
 1681|    669|      }
 1682|    878|    }
 1683|    925|    break;
 1684|  2.88k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 2.88k, False: 365k]
  ------------------
 1685|  2.88k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.88k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 267, False: 2.62k]
  |  |  ------------------
  ------------------
 1686|  1.55k|    case ASCII_q:
  ------------------
  |  |   79|  1.55k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.55k, False: 1.33k]
  ------------------
 1687|  1.55k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.55k|#  define MINBPC(enc) 1
  ------------------
 1688|  1.55k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  1.55k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 994, False: 558]
  |  |  ------------------
  ------------------
 1689|    994|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    994|#  define MINBPC(enc) 1
  ------------------
 1690|    994|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    994|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 765, False: 229]
  |  |  ------------------
  ------------------
 1691|    765|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    765|#  define MINBPC(enc) 1
  ------------------
 1692|    765|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    765|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 563, False: 202]
  |  |  ------------------
  ------------------
 1693|    563|            return ASCII_QUOT;
  ------------------
  |  |  104|    563|#define ASCII_QUOT 0x22
  ------------------
 1694|    765|        }
 1695|    994|      }
 1696|    989|      break;
 1697|  1.06k|    case ASCII_a:
  ------------------
  |  |   63|  1.06k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.06k, False: 1.81k]
  ------------------
 1698|  1.06k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.06k|#  define MINBPC(enc) 1
  ------------------
 1699|  1.06k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  1.06k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 864, False: 205]
  |  |  ------------------
  ------------------
 1700|    864|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    864|#  define MINBPC(enc) 1
  ------------------
 1701|    864|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    864|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 599, False: 265]
  |  |  ------------------
  ------------------
 1702|    599|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    599|#  define MINBPC(enc) 1
  ------------------
 1703|    599|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    599|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 401, False: 198]
  |  |  ------------------
  ------------------
 1704|    401|            return ASCII_APOS;
  ------------------
  |  |  106|    401|#define ASCII_APOS 0x27
  ------------------
 1705|    599|        }
 1706|    864|      }
 1707|    668|      break;
 1708|  2.88k|    }
 1709|   368k|  }
 1710|   353k|  return 0;
 1711|   368k|}
xmltok.c:normal_updatePosition:
 1779|  4.57k|                       POSITION *pos) {
 1780|  3.82M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.82M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.82M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.82M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|  6.70k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  6.70k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 6.70k, False: 3.81M]
  |  |  ------------------
  |  | 1784|  6.70k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  6.70k|    pos->columnNumber++;                                                       \
  |  | 1786|  6.70k|    break;
  ------------------
 1788|  7.77k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  7.77k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 7.77k, False: 3.81M]
  |  |  ------------------
  |  | 1784|  7.77k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  7.77k|    pos->columnNumber++;                                                       \
  |  | 1786|  7.77k|    break;
  ------------------
 1789|  3.31k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  3.31k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 3.31k, False: 3.81M]
  |  |  ------------------
  |  | 1784|  3.31k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  3.31k|    pos->columnNumber++;                                                       \
  |  | 1786|  3.31k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   261k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 261k, False: 3.56M]
  ------------------
 1792|   261k|      pos->columnNumber = 0;
 1793|   261k|      pos->lineNumber++;
 1794|   261k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   261k|#  define MINBPC(enc) 1
  ------------------
 1795|   261k|      break;
 1796|  1.34M|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 1.34M, False: 2.47M]
  ------------------
 1797|  1.34M|      pos->lineNumber++;
 1798|  1.34M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.34M|#  define MINBPC(enc) 1
  ------------------
 1799|  1.34M|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  1.34M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.69M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.34M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.34M, False: 45]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.34M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.34M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 415k, False: 931k]
  ------------------
 1800|   415k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   415k|#  define MINBPC(enc) 1
  ------------------
 1801|  1.34M|      pos->columnNumber = 0;
 1802|  1.34M|      break;
 1803|  2.19M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.19M, False: 1.62M]
  ------------------
 1804|  2.19M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.19M|#  define MINBPC(enc) 1
  ------------------
 1805|  2.19M|      pos->columnNumber++;
 1806|  2.19M|      break;
 1807|  3.82M|    }
 1808|  3.82M|  }
 1809|  4.57k|}
xmltok.c:normal_isPublicId:
 1450|  2.30k|                   const char **badPtr) {
 1451|  2.30k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.30k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.30k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.30k|#  define MINBPC(enc) 1
  ------------------
 1453|  9.40k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  9.39k|#  define MINBPC(enc) 1
  ------------------
 1454|  9.40k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  9.40k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  9.40k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  1.08k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 1.08k, False: 8.32k]
  ------------------
 1456|  2.21k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.13k, False: 8.27k]
  ------------------
 1457|  2.43k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 222, False: 9.18k]
  ------------------
 1458|  2.63k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 194, False: 9.21k]
  ------------------
 1459|  2.83k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 199, False: 9.21k]
  ------------------
 1460|  3.16k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 339, False: 9.07k]
  ------------------
 1461|  3.41k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 248, False: 9.16k]
  ------------------
 1462|  3.61k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 201, False: 9.20k]
  ------------------
 1463|  3.84k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 224, False: 9.18k]
  ------------------
 1464|  4.47k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 636, False: 8.77k]
  ------------------
 1465|  4.80k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 323, False: 9.08k]
  ------------------
 1466|  5.54k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 739, False: 8.67k]
  ------------------
 1467|  6.31k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 774, False: 8.63k]
  ------------------
 1468|  6.52k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 206, False: 9.20k]
  ------------------
 1469|  6.72k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 205, False: 9.20k]
  ------------------
 1470|  6.95k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 229, False: 9.18k]
  ------------------
 1471|  7.15k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 197, False: 9.21k]
  ------------------
 1472|  7.35k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 199, False: 9.21k]
  ------------------
 1473|  7.35k|#  ifdef XML_NS
 1474|  7.35k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 9.40k]
  ------------------
 1475|  7.35k|#  endif
 1476|  7.35k|      break;
 1477|    230|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 230, False: 9.17k]
  ------------------
 1478|    230|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    230|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3, False: 227]
  |  |  ------------------
  ------------------
 1479|      3|        *badPtr = ptr;
 1480|      3|        return 0;
 1481|      3|      }
 1482|    227|      break;
 1483|    227|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 199, False: 9.21k]
  ------------------
 1484|  1.41k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.21k, False: 8.19k]
  ------------------
 1485|  1.41k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  1.41k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 1.41k, False: 0]
  ------------------
 1486|  1.41k|        break;
 1487|       |      /* fall through */
 1488|    414|    default:
  ------------------
  |  Branch (1488:5): [True: 414, False: 8.99k]
  ------------------
 1489|    414|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    414|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    197|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 197, False: 217]
  ------------------
 1491|    405|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 208, False: 206]
  ------------------
 1492|    405|        break;
 1493|      9|      default:
  ------------------
  |  Branch (1493:7): [True: 9, False: 405]
  ------------------
 1494|      9|        *badPtr = ptr;
 1495|      9|        return 0;
 1496|    414|      }
 1497|    405|      break;
 1498|  9.40k|    }
 1499|  9.40k|  }
 1500|  2.29k|  return 1;
 1501|  2.30k|}
xmltok.c:little2_prologTok:
 1018|  83.2k|                  const char **nextTokPtr) {
 1019|  83.2k|  int tok;
 1020|  83.2k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 341, False: 82.9k]
  ------------------
 1021|    341|    return XML_TOK_NONE;
  ------------------
  |  |   51|    341|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  82.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  82.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  82.9k|    size_t n = end - ptr;
 1024|  82.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  82.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 25.8k, False: 57.0k]
  ------------------
 1025|  25.8k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  25.8k|#  define MINBPC(enc) 2
  ------------------
 1026|  25.8k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 21, False: 25.7k]
  ------------------
 1027|     21|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  25.7k|      end = ptr + n;
 1029|  25.7k|    }
 1030|  82.9k|  }
 1031|  82.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  82.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  82.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  80.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 80.5k, False: 2.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  2.93k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 2.93k, False: 79.9k]
  ------------------
 1033|  2.93k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.93k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.93k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.91k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.91k, False: 77.9k]
  ------------------
 1035|  4.91k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.91k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.91k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.8k, False: 70.0k]
  ------------------
 1037|  12.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.8k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.8k|    {                                                                          \
  |  |  |  |  135|  12.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  12.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 12.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  12.8k|    }
  |  |  ------------------
  ------------------
 1039|  12.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  12.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  12.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 8, False: 12.7k]
  |  |  |  |  |  Branch (737:4): [True: 11.4k, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  6.78k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 6.78k, False: 6.01k]
  ------------------
 1041|  6.78k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.78k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.78k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.38k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.38k, False: 10.4k]
  ------------------
 1043|  2.38k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.38k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.38k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.23k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.23k, False: 11.5k]
  ------------------
 1045|  2.31k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.07k, False: 11.7k]
  ------------------
 1046|  3.59k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.28k, False: 11.5k]
  ------------------
 1047|  3.59k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.7k]
  ------------------
 1048|  3.59k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.7k]
  ------------------
 1049|  3.62k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 24, False: 12.7k]
  ------------------
 1050|  3.62k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.62k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.62k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.62k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.7k|    }
 1053|      8|    *nextTokPtr = ptr;
 1054|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.7k|  }
 1056|  3.41k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 3.41k, False: 79.4k]
  ------------------
 1057|  3.41k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  3.41k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 48, False: 3.37k]
  ------------------
 1058|     48|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     48|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     48|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     48|    }
 1062|       |    /* fall through */
 1063|  19.1k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 15.7k, False: 67.1k]
  ------------------
 1064|  25.2k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 6.14k, False: 76.7k]
  ------------------
 1065|  28.1k|    for (;;) {
 1066|  28.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  28.1k|#  define MINBPC(enc) 2
  ------------------
 1067|  28.1k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  28.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  28.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  28.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 202, False: 27.9k]
  ------------------
 1068|    202|        break;
 1069|  27.9k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  27.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  27.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.6k, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.53k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.53k, False: 26.3k]
  ------------------
 1071|  2.11k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 579, False: 27.3k]
  ------------------
 1072|  2.11k|        break;
 1073|    743|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 743, False: 27.1k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    743|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    743|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 737, False: 6]
  ------------------
 1076|    737|          break;
 1077|       |        /* fall through */
 1078|  25.0k|      default:
  ------------------
  |  Branch (1078:7): [True: 25.0k, False: 2.85k]
  ------------------
 1079|  25.0k|        *nextTokPtr = ptr;
 1080|  25.0k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  25.0k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  27.9k|      }
 1082|  27.9k|    }
 1083|    202|    *nextTokPtr = ptr;
 1084|    202|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    202|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.33k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.33k, False: 81.5k]
  ------------------
 1086|  1.33k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.33k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.33k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.26k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.26k, False: 81.6k]
  ------------------
 1088|  1.26k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.26k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.26k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.26k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.04k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.04k, False: 81.8k]
  ------------------
 1091|  1.04k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.04k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.04k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.04k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    515|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 515, False: 82.3k]
  ------------------
 1094|    515|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    515|#  define MINBPC(enc) 2
  ------------------
 1095|    515|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    515|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    515|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    515|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 513]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    513|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    513|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    513|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 504, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 44, False: 460]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     44|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     44|    {                                                                          \
  |  |  135|     44|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     44|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     44|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 43]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     44|    }
  ------------------
 1099|     43|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     43|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     43|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 20, False: 23]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     43|    }
 1104|    511|    *nextTokPtr = ptr;
 1105|    511|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    511|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.84k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.84k, False: 79.0k]
  ------------------
 1107|  3.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.84k|#  define MINBPC(enc) 2
  ------------------
 1108|  3.84k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.84k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.16k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.16k, False: 79.7k]
  ------------------
 1110|  3.16k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.16k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.16k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 4, False: 3.16k]
  ------------------
 1112|      4|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      4|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.16k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.16k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 39, False: 3.12k]
  |  |  |  |  |  Branch (737:4): [True: 3.13k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    464|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 464, False: 2.69k]
  ------------------
 1115|    464|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    464|#  define MINBPC(enc) 2
  ------------------
 1116|    464|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    464|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    354|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 354, False: 2.80k]
  ------------------
 1118|    354|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    354|#  define MINBPC(enc) 2
  ------------------
 1119|    354|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    354|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    194|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 194, False: 2.96k]
  ------------------
 1121|    194|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    194|#  define MINBPC(enc) 2
  ------------------
 1122|    194|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    194|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    299|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 299, False: 2.86k]
  ------------------
 1124|    517|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 218, False: 2.94k]
  ------------------
 1125|    985|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 468, False: 2.69k]
  ------------------
 1126|  1.26k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 278, False: 2.88k]
  ------------------
 1127|  1.44k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 180, False: 2.98k]
  ------------------
 1128|  1.77k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 329, False: 2.83k]
  ------------------
 1129|  2.11k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 340, False: 2.82k]
  ------------------
 1130|  2.11k|      *nextTokPtr = ptr;
 1131|  2.11k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.11k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.16k|    }
 1133|     39|    *nextTokPtr = ptr;
 1134|     39|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.52k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.52k, False: 80.3k]
  ------------------
 1136|  2.52k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.52k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.52k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.52k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  4.69k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 4.69k, False: 78.1k]
  ------------------
 1139|  4.69k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.69k|#  define MINBPC(enc) 2
  ------------------
 1140|  4.69k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  4.69k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|    779|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 779, False: 82.1k]
  ------------------
 1142|    779|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    779|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    779|#  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: 82.8k]
  |  |  ------------------
  |  | 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: 82.8k]
  |  |  ------------------
  |  | 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|     20|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 33, False: 82.8k]
  |  |  ------------------
  |  | 1145|     33|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 13, False: 20]
  |  |  ------------------
  |  | 1146|     20|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     13|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     20|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     20|#    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|     20|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     20|#  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|     20|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     20|#  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|     20|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.85k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.85k, False: 73.0k]
  ------------------
 1168|  14.7k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 4.90k, False: 77.9k]
  ------------------
 1169|  14.7k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  14.7k|#define XML_TOK_NAME 18
  ------------------
 1170|  14.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.7k|#  define MINBPC(enc) 2
  ------------------
 1171|  14.7k|    break;
 1172|    293|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 293, False: 82.5k]
  ------------------
 1173|    359|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 66, False: 82.8k]
  ------------------
 1174|    658|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 299, False: 82.5k]
  ------------------
 1175|    658|#  ifdef XML_NS
 1176|    658|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 82.8k]
  ------------------
 1177|    658|#  endif
 1178|    658|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    658|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    658|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    658|#  define MINBPC(enc) 2
  ------------------
 1180|    658|    break;
 1181|  2.29k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.29k, False: 80.5k]
  ------------------
 1182|  2.29k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  2.29k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  2.29k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.29k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.86k, False: 425]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.86k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.86k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.86k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.86k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.86k|      break;
 1186|  1.86k|    }
 1187|    425|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    425|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    425|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    425|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 341, False: 84]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    341|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    341|#  define MINBPC(enc) 2
  ------------------
 1189|    341|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    341|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    341|      break;
 1191|    341|    }
 1192|       |    /* fall through */
 1193|    109|  default:
  ------------------
  |  Branch (1193:3): [True: 25, False: 82.8k]
  ------------------
 1194|    109|    *nextTokPtr = ptr;
 1195|    109|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    109|#define XML_TOK_INVALID 0
  ------------------
 1196|  82.8k|  }
 1197|  38.2k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  38.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  38.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  38.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  36.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 36.8k, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  73.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  20.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.36k, False: 36.8k]
  |  |  ------------------
  |  |   82|  20.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.36k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.36k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.36k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 39, False: 1.32k]
  |  |  ------------------
  |  |   83|     39|      *nextTokPtr = ptr;                                                       \
  |  |   84|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     39|    }                                                                          \
  |  |   86|  20.8k|    /* fall through */                                                         \
  |  |   87|  20.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 9.98k, False: 28.2k]
  |  |  ------------------
  |  |   88|  19.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.42k, False: 29.8k]
  |  |  ------------------
  |  |   89|  20.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 682, False: 37.5k]
  |  |  ------------------
  |  |   90|  20.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 38.0k]
  |  |  ------------------
  |  |   91|  20.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 218, False: 38.0k]
  |  |  ------------------
  |  |   92|  20.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  20.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  20.8k|    break;                                                                     \
  |  |   94|  20.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 38.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     28|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 28, False: 38.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|     28|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 23]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     46|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     23|    }                                                                          \
  |  |  |  |   77|     23|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    276|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 276, False: 37.9k]
  ------------------
 1201|  1.59k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.32k, False: 36.9k]
  ------------------
 1202|  2.11k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 517, False: 37.7k]
  ------------------
 1203|  3.52k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.41k, False: 36.8k]
  ------------------
 1204|  4.32k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 793, False: 37.4k]
  ------------------
 1205|  4.32k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 3, False: 38.2k]
  ------------------
 1206|  12.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.43k, False: 29.8k]
  ------------------
 1207|  14.2k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.44k, False: 36.8k]
  ------------------
 1208|  16.5k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.32k, False: 35.9k]
  ------------------
 1209|  16.5k|      *nextTokPtr = ptr;
 1210|  16.5k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 38.2k]
  ------------------
 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|    239|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 239, False: 38.0k]
  ------------------
 1232|    239|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    239|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 2, False: 237]
  ------------------
 1233|      2|        *nextTokPtr = ptr;
 1234|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1235|      2|      }
 1236|    237|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    237|#  define MINBPC(enc) 2
  ------------------
 1237|    237|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    237|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    514|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 514, False: 37.7k]
  ------------------
 1239|    514|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    514|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 513]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    513|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    513|#  define MINBPC(enc) 2
  ------------------
 1244|    513|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    513|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     69|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 69, False: 38.1k]
  ------------------
 1246|     69|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     69|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 68]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     68|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     68|#  define MINBPC(enc) 2
  ------------------
 1251|     68|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     68|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     12|    default:
  ------------------
  |  Branch (1252:5): [True: 12, False: 38.2k]
  ------------------
 1253|     12|      *nextTokPtr = ptr;
 1254|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1255|  38.2k|    }
 1256|  38.2k|  }
 1257|    189|  return -tok;
 1258|  17.6k|}
xmltok.c:little2_scanLit:
  984|  7.84k|                const char **nextTokPtr) {
  985|  14.1M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  14.1M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  14.1M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.1M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   187k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 187k, False: 13.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  14.1M|    switch (t) {
  988|   107k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 14.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: 14.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|  53.6k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  53.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 53.6k, False: 14.0M]
  |  |  |  |  ------------------
  |  |  |  |   50|  53.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 53.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  53.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  53.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  53.6k|#    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|  53.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  53.6k|    break;
  |  |  ------------------
  |  |   63|  53.6k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 14.1M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 14.1M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 14.1M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  6.11k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 6.11k, False: 14.1M]
  ------------------
  990|  11.2k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.10k, False: 14.1M]
  ------------------
  991|  11.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.2k|#  define MINBPC(enc) 2
  ------------------
  992|  11.2k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 3.49k, False: 7.72k]
  ------------------
  993|  3.49k|        break;
  994|  7.72k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.72k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  7.72k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 4, False: 7.72k]
  ------------------
  995|      4|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      4|#define XML_TOK_LITERAL 27
  ------------------
  996|  7.72k|      *nextTokPtr = ptr;
  997|  7.72k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.72k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.72k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.69k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  2.83k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.83k, False: 4.88k]
  ------------------
  999|  3.48k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 645, False: 7.08k]
  ------------------
 1000|  4.48k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.00k, False: 6.72k]
  ------------------
 1001|  7.66k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 3.17k, False: 4.54k]
  ------------------
 1002|  7.68k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 13, False: 7.71k]
  ------------------
 1003|  7.68k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 8, False: 7.71k]
  ------------------
 1004|  7.68k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  7.68k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     37|      default:
  ------------------
  |  Branch (1005:7): [True: 37, False: 7.68k]
  ------------------
 1006|     37|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
 1007|  7.72k|      }
 1008|  14.0M|    default:
  ------------------
  |  Branch (1008:5): [True: 14.0M, False: 64.9k]
  ------------------
 1009|  14.0M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.0M|#  define MINBPC(enc) 2
  ------------------
 1010|  14.0M|      break;
 1011|  14.1M|    }
 1012|  14.1M|  }
 1013|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  7.84k|}
xmltok.c:little2_scanDecl:
  183|  6.78k|                 const char **nextTokPtr) {
  184|  6.78k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.78k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.78k|    {                                                                          \
  |  |  |  |  135|  6.78k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.78k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.78k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 6.78k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  6.78k|    }
  |  |  ------------------
  ------------------
  185|  6.78k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.78k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.78k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.76k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.76k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    721|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 721, False: 6.06k]
  ------------------
  187|    721|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    721|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    721|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 6.78k]
  ------------------
  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|    102|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 102, False: 6.68k]
  ------------------
  192|  6.03k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 5.93k, False: 847]
  ------------------
  193|  6.03k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.03k|#  define MINBPC(enc) 2
  ------------------
  194|  6.03k|    break;
  195|     23|  default:
  ------------------
  |  Branch (195:3): [True: 23, False: 6.75k]
  ------------------
  196|     23|    *nextTokPtr = ptr;
  197|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  198|  6.78k|  }
  199|  38.4k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  38.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  38.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  38.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  38.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 38.3k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     41|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 41, False: 38.3k]
  ------------------
  202|     41|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     41|    {                                                                          \
  |  |  135|     41|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     41|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     41|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 40]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     41|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     40|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     40|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     40|  ((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: 35, False: 5]
  |  |  |  |  |  Branch (737:4): [True: 11, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      2|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 2, False: 38]
  ------------------
  206|      3|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 39]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 39]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 39]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     40|      }
  212|       |      /* fall through */
  213|  3.52k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 3.48k, False: 34.9k]
  ------------------
  214|  3.84k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 324, False: 38.0k]
  ------------------
  215|  5.97k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 2.12k, False: 36.2k]
  ------------------
  216|  5.97k|      *nextTokPtr = ptr;
  217|  5.97k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  5.97k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  28.4k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 28.4k, False: 9.99k]
  ------------------
  219|  32.4k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 3.98k, False: 34.4k]
  ------------------
  220|  32.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  32.4k|#  define MINBPC(enc) 2
  ------------------
  221|  32.4k|      break;
  222|     29|    default:
  ------------------
  |  Branch (222:5): [True: 29, False: 38.3k]
  ------------------
  223|     29|      *nextTokPtr = ptr;
  224|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  225|  38.4k|    }
  226|  38.4k|  }
  227|     30|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     30|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.03k|}
xmltok.c:little2_scanComment:
  146|    987|                    const char **nextTokPtr) {
  147|    987|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    987|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    987|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    987|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 974, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    974|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    974|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    974|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 967, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 958, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     16|      *nextTokPtr = ptr;
  150|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  151|     16|    }
  152|    958|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    958|#  define MINBPC(enc) 2
  ------------------
  153|   597k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   597k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   597k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   597k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.77k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.77k, False: 587k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  11.0k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 597k]
  |  |  |  |  ------------------
  |  |  |  |   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: 597k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  5.51k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.48k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.51k, False: 592k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.51k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 5.48k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.48k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.48k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.48k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  5.48k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.48k|    break;
  |  |  ------------------
  |  |   63|  5.48k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 597k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 597k]
  |  |  ------------------
  |  |   65|     47|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 597k]
  |  |  ------------------
  |  |   66|     47|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     47|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     47|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.41k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.41k, False: 596k]
  ------------------
  157|  1.41k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.41k|#  define MINBPC(enc) 2
  ------------------
  158|  1.41k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.41k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.41k|    {                                                                          \
  |  |  |  |  135|  1.41k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.41k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.41k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.41k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.41k|    }
  |  |  ------------------
  ------------------
  159|  1.41k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.41k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.41k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.15k, False: 256]
  |  |  |  |  |  Branch (739:52): [True: 811, False: 348]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    811|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    811|#  define MINBPC(enc) 2
  ------------------
  161|    811|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    811|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    811|    {                                                                          \
  |  |  |  |  135|    811|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    811|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    811|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 810]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    811|    }
  |  |  ------------------
  ------------------
  162|    810|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    810|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    810|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 803, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 794, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    794|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    794|#  define MINBPC(enc) 2
  ------------------
  167|    794|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    794|#define XML_TOK_COMMENT 13
  ------------------
  168|    810|        }
  169|    604|        break;
  170|   590k|      default:
  ------------------
  |  Branch (170:7): [True: 590k, False: 6.97k]
  ------------------
  171|   590k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   590k|#  define MINBPC(enc) 2
  ------------------
  172|   590k|        break;
  173|   597k|      }
  174|   597k|    }
  175|    958|  }
  176|     82|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     82|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    987|}
xmltok.c:little2_scanPi:
  277|  3.41k|               const char **nextTokPtr) {
  278|  3.41k|  int tok;
  279|  3.41k|  const char *target = ptr;
  280|  3.41k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.41k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.41k|    {                                                                          \
  |  |  |  |  135|  3.41k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.41k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.41k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  3.41k|    }
  |  |  ------------------
  ------------------
  281|  3.40k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.40k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.40k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.75k, False: 651]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  3.61k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.35k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 619, False: 2.78k]
  |  |  ------------------
  |  |  111|  3.35k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    619|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    619|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    619|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 605]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  3.35k|    /* fall through */                                                         \
  |  |  116|  3.35k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.33k, False: 1.06k]
  |  |  ------------------
  |  |  117|  3.35k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 417, False: 2.98k]
  |  |  ------------------
  |  |  118|  3.35k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  3.35k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.35k|    break;                                                                     \
  |  |  120|  3.35k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |  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: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |  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: 3.37k]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 23]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     46|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     23|    }                                                                          \
  |  |  |  |  106|     23|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      5|  default:
  ------------------
  |  Branch (283:3): [True: 5, False: 3.40k]
  ------------------
  284|      5|    *nextTokPtr = ptr;
  285|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  286|  3.40k|  }
  287|   304k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   304k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   304k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   304k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.82k, False: 295k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.49M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   301k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 295k, False: 8.85k]
  |  |  ------------------
  |  |   82|   301k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|   295k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   295k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   295k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 295k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|   301k|    /* fall through */                                                         \
  |  |   87|   301k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.82k, False: 300k]
  |  |  ------------------
  |  |   88|   300k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 900, False: 303k]
  |  |  ------------------
  |  |   89|   300k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 308, False: 304k]
  |  |  ------------------
  |  |   90|   300k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 304k]
  |  |  ------------------
  |  |   91|   301k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 348, False: 304k]
  |  |  ------------------
  |  |   92|   301k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   301k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   301k|    break;                                                                     \
  |  |   94|   301k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |   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: 304k]
  |  |  |  |  ------------------
  |  |  |  |   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|     24|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 304k]
  |  |  |  |  ------------------
  |  |  |  |   71|     24|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    710|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 710, False: 303k]
  ------------------
  291|  1.31k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 609, False: 303k]
  ------------------
  292|  1.69k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 375, False: 304k]
  ------------------
  293|  1.69k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  1.69k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 1.69k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  1.69k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.69k|#  define MINBPC(enc) 2
  ------------------
  298|   201k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   201k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   201k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   201k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.38k, False: 194k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  3.63k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 201k]
  |  |  |  |  ------------------
  |  |  |  |   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: 201k]
  |  |  |  |  ------------------
  |  |  |  |   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.80k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.77k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.80k, False: 199k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.80k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 1.77k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.77k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.77k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.77k|#    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.77k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.77k|    break;
  |  |  ------------------
  |  |   63|  1.77k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 23, False: 201k]
  |  |  ------------------
  |  |   64|     23|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 201k]
  |  |  ------------------
  |  |   65|     30|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 201k]
  |  |  ------------------
  |  |   66|     30|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     30|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  2.20k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 2.20k, False: 199k]
  ------------------
  302|  2.20k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.20k|#  define MINBPC(enc) 2
  ------------------
  303|  2.20k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.20k|    {                                                                          \
  |  |  |  |  135|  2.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 2.20k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  2.20k|    }
  |  |  ------------------
  ------------------
  304|  2.20k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.20k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.20k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.95k, False: 250]
  |  |  |  |  |  Branch (739:52): [True: 1.50k, False: 454]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  1.50k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.50k|#  define MINBPC(enc) 2
  ------------------
  306|  1.50k|            return tok;
  307|  1.50k|          }
  308|    704|          break;
  309|   197k|        default:
  ------------------
  |  Branch (309:9): [True: 197k, False: 4.04k]
  ------------------
  310|   197k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   197k|#  define MINBPC(enc) 2
  ------------------
  311|   197k|          break;
  312|   201k|        }
  313|   201k|      }
  314|    129|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    129|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  1.54k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 1.54k, False: 303k]
  ------------------
  316|  1.54k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  1.54k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 1.54k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  1.54k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.54k|#  define MINBPC(enc) 2
  ------------------
  321|  1.54k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.54k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.54k|    {                                                                          \
  |  |  |  |  135|  1.54k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.54k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.54k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  1.54k|    }
  |  |  ------------------
  ------------------
  322|  1.50k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.50k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.50k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.49k, False: 14]
  |  |  |  |  |  Branch (739:52): [True: 1.48k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  1.48k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.48k|#  define MINBPC(enc) 2
  ------------------
  324|  1.48k|        return tok;
  325|  1.48k|      }
  326|       |      /* fall through */
  327|     31|    default:
  ------------------
  |  Branch (327:5): [True: 6, False: 304k]
  ------------------
  328|     31|      *nextTokPtr = ptr;
  329|     31|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  330|   304k|    }
  331|   304k|  }
  332|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  3.35k|}
xmltok.c:little2_checkPiTarget:
  232|  3.24k|                      int *tokPtr) {
  233|  3.24k|  int upper = 0;
  234|  3.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.24k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  3.24k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  3.24k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  3.24k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  3.24k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.25k, False: 1.98k]
  ------------------
  237|  1.25k|    return 1;
  238|  1.98k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.98k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.98k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.59k, False: 392]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    968|  case ASCII_x:
  ------------------
  |  |   86|    968|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 968, False: 1.02k]
  ------------------
  240|    968|    break;
  241|    590|  case ASCII_X:
  ------------------
  |  |   59|    590|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 590, False: 1.39k]
  ------------------
  242|    590|    upper = 1;
  243|    590|    break;
  244|    431|  default:
  ------------------
  |  Branch (244:3): [True: 431, False: 1.55k]
  ------------------
  245|    431|    return 1;
  246|  1.98k|  }
  247|  1.55k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.55k|#  define MINBPC(enc) 2
  ------------------
  248|  1.55k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.55k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.55k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.02k, False: 534]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    567|  case ASCII_m:
  ------------------
  |  |   75|    567|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 567, False: 991]
  ------------------
  250|    567|    break;
  251|    453|  case ASCII_M:
  ------------------
  |  |   48|    453|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 453, False: 1.10k]
  ------------------
  252|    453|    upper = 1;
  253|    453|    break;
  254|    538|  default:
  ------------------
  |  Branch (254:3): [True: 538, False: 1.02k]
  ------------------
  255|    538|    return 1;
  256|  1.55k|  }
  257|  1.02k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
  258|  1.02k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.02k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.02k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 575, False: 445]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     40|  case ASCII_l:
  ------------------
  |  |   74|     40|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 40, False: 980]
  ------------------
  260|     40|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.01k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|    978|  default:
  ------------------
  |  Branch (264:3): [True: 978, False: 42]
  ------------------
  265|    978|    return 1;
  266|  1.02k|  }
  267|     42|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 39]
  ------------------
  268|      3|    return 0;
  269|     39|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     39|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     39|  return 1;
  271|     42|}
xmltok.c:little2_scanPercent:
  924|  1.34k|                    const char **nextTokPtr) {
  925|  1.34k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.34k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.34k|    {                                                                          \
  |  |  |  |  135|  1.34k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.34k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.34k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  1.34k|    }
  |  |  ------------------
  ------------------
  926|  1.32k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.32k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.32k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    931|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 931, False: 396]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.17k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.03k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 374, False: 953]
  |  |  ------------------
  |  |  111|  1.03k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    374|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    374|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    374|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 359]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  1.03k|    /* fall through */                                                         \
  |  |  116|  1.03k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 411, False: 916]
  |  |  ------------------
  |  |  117|  1.03k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 262, False: 1.06k]
  |  |  ------------------
  |  |  118|  1.03k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.03k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.03k|    break;                                                                     \
  |  |  120|  1.03k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 1.31k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|     66|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 66, False: 1.26k]
  ------------------
  929|    145|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 79, False: 1.24k]
  ------------------
  930|    255|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 110, False: 1.21k]
  ------------------
  931|    258|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 1.32k]
  ------------------
  932|    258|    *nextTokPtr = ptr;
  933|    258|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    258|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 1.32k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  1.32k|  }
  938|  3.01k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.01k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.01k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.01k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.65k, False: 368]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  6.15k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.05k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 354, False: 2.66k]
  |  |  ------------------
  |  |   82|  2.05k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    354|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    354|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    354|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 330]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  2.05k|    /* fall through */                                                         \
  |  |   87|  2.05k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 630, False: 2.38k]
  |  |  ------------------
  |  |   88|  1.35k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 393, False: 2.62k]
  |  |  ------------------
  |  |   89|  1.63k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 282, False: 2.73k]
  |  |  ------------------
  |  |   90|  1.84k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 207, False: 2.81k]
  |  |  ------------------
  |  |   91|  2.05k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 212, False: 2.80k]
  |  |  ------------------
  |  |   92|  2.05k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.05k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.05k|    break;                                                                     \
  |  |   94|  2.05k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.01k]
  |  |  |  |  ------------------
  |  |  |  |   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.01k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 3.00k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    920|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 920, False: 2.09k]
  ------------------
  942|    920|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    920|#  define MINBPC(enc) 2
  ------------------
  943|    920|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    920|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     11|    default:
  ------------------
  |  Branch (944:5): [True: 11, False: 3.00k]
  ------------------
  945|     11|      *nextTokPtr = ptr;
  946|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  947|  3.01k|    }
  948|  3.01k|  }
  949|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.03k|}
xmltok.c:little2_scanPoundName:
  954|    779|                      const char **nextTokPtr) {
  955|    779|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    779|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    779|    {                                                                          \
  |  |  |  |  135|    779|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    779|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    779|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 777]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    779|    }
  |  |  ------------------
  ------------------
  956|    777|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    777|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    777|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    704|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 704, False: 73]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|    607|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    741|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 49, False: 728]
  |  |  ------------------
  |  |  111|    741|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     49|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     49|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     49|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 38]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|    741|    /* fall through */                                                         \
  |  |  116|    741|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 488, False: 289]
  |  |  ------------------
  |  |  117|    741|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 215, False: 562]
  |  |  ------------------
  |  |  118|    741|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    741|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    741|    break;                                                                     \
  |  |  120|    741|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 777]
  |  |  |  |  ------------------
  |  |  |  |  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: 777]
  |  |  |  |  ------------------
  |  |  |  |  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|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 759]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      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;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 770]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|    777|  }
  962|  5.47k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  5.47k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.47k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.47k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.00k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.00k, False: 474]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  15.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.79k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 453, False: 5.02k]
  |  |  ------------------
  |  |   82|  4.79k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    453|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    453|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    453|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 27, False: 426]
  |  |  ------------------
  |  |   83|     27|      *nextTokPtr = ptr;                                                       \
  |  |   84|     27|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     27|    }                                                                          \
  |  |   86|  4.79k|    /* fall through */                                                         \
  |  |   87|  4.79k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.76k, False: 3.70k]
  |  |  ------------------
  |  |   88|  4.02k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.83k, False: 3.64k]
  |  |  ------------------
  |  |   89|  4.26k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 239, False: 5.23k]
  |  |  ------------------
  |  |   90|  4.58k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 321, False: 5.15k]
  |  |  ------------------
  |  |   91|  4.79k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 205, False: 5.26k]
  |  |  ------------------
  |  |   92|  4.79k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.79k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  4.79k|    break;                                                                     \
  |  |   94|  4.79k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |   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: 5.47k]
  |  |  |  |  ------------------
  |  |  |  |   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|     15|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 15, False: 5.45k]
  |  |  |  |  ------------------
  |  |  |  |   71|     15|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    210|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 210, False: 5.26k]
  ------------------
  966|    279|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 69, False: 5.40k]
  ------------------
  967|    417|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 138, False: 5.33k]
  ------------------
  968|    509|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 92, False: 5.38k]
  ------------------
  969|    543|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 34, False: 5.44k]
  ------------------
  970|    544|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 5.47k]
  ------------------
  971|    629|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 85, False: 5.38k]
  ------------------
  972|    629|      *nextTokPtr = ptr;
  973|    629|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|    629|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     12|    default:
  ------------------
  |  Branch (974:5): [True: 12, False: 5.46k]
  ------------------
  975|     12|      *nextTokPtr = ptr;
  976|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  977|  5.47k|    }
  978|  5.47k|  }
  979|     58|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     58|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|    741|}
xmltok.c:little2_contentTok:
  824|  37.9k|                   const char **nextTokPtr) {
  825|  37.9k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.15k, False: 36.7k]
  ------------------
  826|  1.15k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.15k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  36.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  36.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  36.7k|    size_t n = end - ptr;
  829|  36.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  36.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 11.3k, False: 25.4k]
  ------------------
  830|  11.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  11.3k|#  define MINBPC(enc) 2
  ------------------
  831|  11.3k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 74, False: 11.2k]
  ------------------
  832|     74|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  11.2k|      end = ptr + n;
  834|  11.2k|    }
  835|  36.7k|  }
  836|  36.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  36.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  36.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 31.8k, False: 4.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  11.9k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 11.9k, False: 24.7k]
  ------------------
  838|  11.9k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  11.9k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  11.9k|#  define MINBPC(enc) 2
  ------------------
  839|  9.09k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.09k, False: 27.6k]
  ------------------
  840|  9.09k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  9.09k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  9.09k|#  define MINBPC(enc) 2
  ------------------
  841|  5.53k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 5.53k, False: 31.1k]
  ------------------
  842|  5.53k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.53k|#  define MINBPC(enc) 2
  ------------------
  843|  5.53k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.53k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.53k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.53k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 14, False: 5.52k]
  ------------------
  844|     14|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     14|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  5.52k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  5.52k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.52k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.53k, False: 1.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 240, False: 5.28k]
  ------------------
  846|    240|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    240|#  define MINBPC(enc) 2
  ------------------
  847|  5.52k|    *nextTokPtr = ptr;
  848|  5.52k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.52k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.52k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.52k, False: 35.1k]
  ------------------
  850|  1.52k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.52k|#  define MINBPC(enc) 2
  ------------------
  851|  1.52k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.52k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  1.65k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 1.65k, False: 35.0k]
  ------------------
  853|  1.65k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.65k|#  define MINBPC(enc) 2
  ------------------
  854|  1.65k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.65k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.65k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 6, False: 1.65k]
  ------------------
  855|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  1.65k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  1.65k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.65k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.32k, False: 330]
  |  |  |  |  |  Branch (739:52): [True: 740, False: 581]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|    911|      break;
  858|    740|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    740|#  define MINBPC(enc) 2
  ------------------
  859|    740|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    740|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    740|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    740|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 7, False: 733]
  ------------------
  860|      7|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      7|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|    733|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    733|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    733|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 496, False: 237]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|    732|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|    732|#  define MINBPC(enc) 2
  ------------------
  863|    732|      break;
  864|    732|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  2.79k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 36.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 36.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.38k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.32k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.38k, False: 35.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.38k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 59, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.32k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     59|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.32k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.32k|#    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.32k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.32k|    break;
  |  |  ------------------
  |  |   63|  1.32k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 42, False: 36.6k]
  |  |  ------------------
  |  |   64|     42|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 36.7k]
  |  |  ------------------
  |  |   65|     52|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 36.6k]
  |  |  ------------------
  |  |   66|     52|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     52|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     52|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  5.48k|  default:
  ------------------
  |  Branch (868:3): [True: 5.48k, False: 31.2k]
  ------------------
  869|  5.48k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.48k|#  define MINBPC(enc) 2
  ------------------
  870|  5.48k|    break;
  871|  36.7k|  }
  872|   545k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   545k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   545k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   545k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 20.6k, False: 525k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 545k]
  |  |  ------------------
  |  |  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: 545k]
  |  |  ------------------
  |  |  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|  7.01k|      LEAD_CASE(4)
  ------------------
  |  |  875|  6.96k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 7.01k, False: 538k]
  |  |  ------------------
  |  |  876|  7.01k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  6.96k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 49, False: 6.96k]
  |  |  ------------------
  |  |  877|     49|      *nextTokPtr = ptr;                                                       \
  |  |  878|     49|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     49|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     49|    }                                                                          \
  |  |  880|  6.96k|    ptr += n;                                                                  \
  |  |  881|  6.96k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  2.52k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 2.52k, False: 543k]
  ------------------
  887|  2.52k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  2.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  2.52k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.52k, False: 1]
  |  |  ------------------
  ------------------
  888|  2.52k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  2.52k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.52k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.78k, False: 740]
  |  |  |  |  |  Branch (739:52): [True: 793, False: 990]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  1.73k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.73k|#  define MINBPC(enc) 2
  ------------------
  890|  1.73k|          break;
  891|  1.73k|        }
  892|    793|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    793|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|    793|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 787, False: 6]
  |  |  ------------------
  ------------------
  893|    787|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|    787|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    787|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 497, False: 290]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    785|            ptr += MINBPC(enc);
  ------------------
  |  |  783|    785|#  define MINBPC(enc) 2
  ------------------
  895|    785|            break;
  896|    785|          }
  897|      2|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
  898|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  899|    787|        }
  900|    793|      }
  901|       |      /* fall through */
  902|  2.26k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 2.25k, False: 543k]
  ------------------
  903|  4.02k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 1.76k, False: 544k]
  ------------------
  904|  4.05k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 33, False: 545k]
  ------------------
  905|  4.05k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 545k]
  ------------------
  906|  4.06k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 545k]
  ------------------
  907|  6.97k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 2.90k, False: 543k]
  ------------------
  908|  8.05k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.07k, False: 544k]
  ------------------
  909|  8.05k|      *nextTokPtr = ptr;
  910|  8.05k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  8.05k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   528k|    default:
  ------------------
  |  Branch (911:5): [True: 528k, False: 17.5k]
  ------------------
  912|   528k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   528k|#  define MINBPC(enc) 2
  ------------------
  913|   528k|      break;
  914|   545k|    }
  915|   545k|  }
  916|    353|  *nextTokPtr = ptr;
  917|    353|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    353|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  8.45k|}
xmltok.c:little2_scanLt:
  726|  11.9k|               const char **nextTokPtr) {
  727|  11.9k|#  ifdef XML_NS
  728|  11.9k|  int hadColon;
  729|  11.9k|#  endif
  730|  11.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.9k|    {                                                                          \
  |  |  |  |  135|  11.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  11.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 11.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  11.9k|    }
  |  |  ------------------
  ------------------
  731|  11.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  11.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.65k, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  8.38k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.68k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.26k, False: 9.68k]
  |  |  ------------------
  |  |  111|  8.68k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.26k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.26k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.26k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 2.25k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  8.68k|    /* fall through */                                                         \
  |  |  116|  8.68k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.82k, False: 8.13k]
  |  |  ------------------
  |  |  117|  8.68k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.60k, False: 9.34k]
  |  |  ------------------
  |  |  118|  8.68k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.68k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.68k|    break;                                                                     \
  |  |  120|  8.68k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 11.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 11.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 11.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      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;
  |  |  ------------------
  ------------------
  733|    872|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 872, False: 11.0k]
  ------------------
  734|    872|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    872|#  define MINBPC(enc) 2
  ------------------
  735|    872|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    872|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    872|    {                                                                          \
  |  |  |  |  135|    872|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    872|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    872|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 871]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    872|    }
  |  |  ------------------
  ------------------
  736|    871|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    871|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    871|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    848|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 26, False: 845]
  |  |  |  |  |  Branch (737:4): [True: 848, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    266|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 266, False: 605]
  ------------------
  738|    266|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    266|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    266|#  define MINBPC(enc) 2
  ------------------
  739|    579|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 579, False: 292]
  ------------------
  740|    579|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    579|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    579|#  define MINBPC(enc) 2
  ------------------
  741|    871|    }
  742|     26|    *nextTokPtr = ptr;
  743|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  744|  1.02k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 1.02k, False: 10.9k]
  ------------------
  745|  1.02k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.02k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
  746|  1.32k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.32k, False: 10.6k]
  ------------------
  747|  1.32k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.32k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.32k|#  define MINBPC(enc) 2
  ------------------
  748|      6|  default:
  ------------------
  |  Branch (748:3): [True: 6, False: 11.9k]
  ------------------
  749|      6|    *nextTokPtr = ptr;
  750|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  751|  11.9k|  }
  752|  8.68k|#  ifdef XML_NS
  753|  8.68k|  hadColon = 0;
  754|  8.68k|#  endif
  755|       |  /* we have a start-tag */
  756|  69.7k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  69.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  69.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  69.7k|  ((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: 58.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|   300k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  61.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 58.6k, False: 11.0k]
  |  |  ------------------
  |  |   82|  61.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  58.6k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  58.6k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  58.6k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 58.6k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  61.1k|    /* fall through */                                                         \
  |  |   87|  61.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.05k, False: 68.7k]
  |  |  ------------------
  |  |   88|  60.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 530, False: 69.2k]
  |  |  ------------------
  |  |   89|  60.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 268, False: 69.4k]
  |  |  ------------------
  |  |   90|  60.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 385, False: 69.3k]
  |  |  ------------------
  |  |   91|  61.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 229, False: 69.5k]
  |  |  ------------------
  |  |   92|  61.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  61.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  61.1k|    break;                                                                     \
  |  |   94|  61.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 69.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: 69.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|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 69.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 69.7k]
  ------------------
  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|  2.63k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.63k, False: 67.1k]
  ------------------
  777|  3.67k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.04k, False: 68.7k]
  ------------------
  778|  4.11k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 441, False: 69.3k]
  ------------------
  779|  4.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.11k|#  define MINBPC(enc) 2
  ------------------
  780|  5.41k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.41k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.41k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.41k|  ((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: 769]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.06k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.94k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 743, False: 4.67k]
  |  |  ------------------
  |  |  111|  2.94k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    743|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    743|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    743|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 732]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  2.94k|    /* fall through */                                                         \
  |  |  116|  2.94k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.54k, False: 3.86k]
  |  |  ------------------
  |  |  117|  2.94k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 668, False: 4.74k]
  |  |  ------------------
  |  |  118|  2.94k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.94k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.94k|    break;                                                                     \
  |  |  120|  2.94k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.41k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.41k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 5.39k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    879|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 879, False: 4.53k]
  ------------------
  784|    879|          goto gt;
  785|    216|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 216, False: 5.19k]
  ------------------
  786|    216|          goto sol;
  787|    297|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 297, False: 5.11k]
  ------------------
  788|    788|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 491, False: 4.92k]
  ------------------
  789|  1.33k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 544, False: 4.86k]
  ------------------
  790|  1.33k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.33k|#  define MINBPC(enc) 2
  ------------------
  791|  1.33k|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.40k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.41k|        }
  796|  2.94k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.94k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.41k|      }
  798|     36|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.11k|    }
  800|  4.20k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.20k, False: 65.5k]
  ------------------
  801|  5.08k|    gt:
  802|  5.08k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.08k|#  define MINBPC(enc) 2
  ------------------
  803|  5.08k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.08k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    258|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 258, False: 69.4k]
  ------------------
  805|    474|    sol:
  806|    474|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    474|#  define MINBPC(enc) 2
  ------------------
  807|    474|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    474|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    474|    {                                                                          \
  |  |  |  |  135|    474|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    474|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    474|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 463]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    474|    }
  |  |  ------------------
  ------------------
  808|    463|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    463|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    463|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 456, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 442, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     21|        *nextTokPtr = ptr;
  810|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  811|     21|      }
  812|    442|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    442|#  define MINBPC(enc) 2
  ------------------
  813|    442|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    442|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      6|    default:
  ------------------
  |  Branch (814:5): [True: 6, False: 69.7k]
  ------------------
  815|      6|      *nextTokPtr = ptr;
  816|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  817|  69.7k|    }
  818|  69.7k|  }
  819|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  8.68k|}
xmltok.c:little2_scanCdataSection:
  337|    579|                         const char **nextTokPtr) {
  338|    579|  static const char CDATA_LSQB[]
  339|    579|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    579|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    579|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    579|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    579|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    579|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    579|#define ASCII_LSQB 0x5B
  ------------------
  340|    579|  int i;
  341|    579|  UNUSED_P(enc);
  ------------------
  |  |  135|    579|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    579|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    579|    {                                                                          \
  |  |  135|    579|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    579|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    579|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 574]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    579|    }
  ------------------
  344|  3.95k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.37k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.39k, False: 556]
  ------------------
  345|  3.39k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.39k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.39k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.38k, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 3.37k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     18|      *nextTokPtr = ptr;
  347|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  348|     18|    }
  349|  3.39k|  }
  350|    556|  *nextTokPtr = ptr;
  351|    556|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    556|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    574|}
xmltok.c:little2_scanEndTag:
  432|  1.32k|                   const char **nextTokPtr) {
  433|  1.32k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.32k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.32k|    {                                                                          \
  |  |  |  |  135|  1.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.32k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.32k|    }
  |  |  ------------------
  ------------------
  434|  1.32k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.32k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.32k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    981|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 981, False: 342]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.06k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.30k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 322, False: 1.00k]
  |  |  ------------------
  |  |  111|  1.30k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    322|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    322|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    322|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 321]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.30k|    /* fall through */                                                         \
  |  |  116|  1.30k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 393, False: 930]
  |  |  ------------------
  |  |  117|  1.30k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 588, False: 735]
  |  |  ------------------
  |  |  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: 1.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    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|     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|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.31k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.32k|  }
  440|  2.94k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.94k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.94k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.94k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.37k, False: 569]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.44k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.71k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 546, False: 2.40k]
  |  |  ------------------
  |  |   82|  1.71k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    546|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    546|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    546|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 532]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  1.71k|    /* fall through */                                                         \
  |  |   87|  1.71k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 380, False: 2.56k]
  |  |  ------------------
  |  |   88|  1.11k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 205, False: 2.74k]
  |  |  ------------------
  |  |   89|  1.31k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 198, False: 2.74k]
  |  |  ------------------
  |  |   90|  1.52k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 205, False: 2.74k]
  |  |  ------------------
  |  |   91|  1.71k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 2.75k]
  |  |  ------------------
  |  |   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: 2.94k]
  |  |  |  |  ------------------
  |  |  |  |   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.94k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     17|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 2.93k]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|     13|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    213|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 213, False: 2.73k]
  ------------------
  444|    421|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 208, False: 2.73k]
  ------------------
  445|    658|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 237, False: 2.71k]
  ------------------
  446|  1.30k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    658|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    687|#  define MINBPC(enc) 2
  ------------------
  447|  1.30k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.30k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.30k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.28k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.28k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    201|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 201, False: 1.10k]
  ------------------
  449|    405|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 204, False: 1.09k]
  ------------------
  450|    687|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 282, False: 1.01k]
  ------------------
  451|    687|          break;
  452|    597|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 597, False: 704]
  ------------------
  453|    597|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    597|#  define MINBPC(enc) 2
  ------------------
  454|    597|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    597|#define XML_TOK_END_TAG 5
  ------------------
  455|     17|        default:
  ------------------
  |  Branch (455:9): [True: 17, False: 1.28k]
  ------------------
  456|     17|          *nextTokPtr = ptr;
  457|     17|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  458|  1.30k|        }
  459|  1.30k|      }
  460|     44|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     44|#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.94k]
  ------------------
  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|    533|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 533, False: 2.41k]
  ------------------
  469|    533|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    533|#  define MINBPC(enc) 2
  ------------------
  470|    533|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    533|#define XML_TOK_END_TAG 5
  ------------------
  471|     10|    default:
  ------------------
  |  Branch (471:5): [True: 10, False: 2.93k]
  ------------------
  472|     10|      *nextTokPtr = ptr;
  473|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  474|  2.94k|    }
  475|  2.94k|  }
  476|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.30k|}
xmltok.c:little2_scanAtts:
  573|  2.94k|                 const char **nextTokPtr) {
  574|  2.94k|#  ifdef XML_NS
  575|  2.94k|  int hadColon = 0;
  576|  2.94k|#  endif
  577|   227k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   227k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   227k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   227k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   226k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 226k, False: 1.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  9.82k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.91k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.01k, False: 226k]
  |  |  ------------------
  |  |   82|  2.91k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.01k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.01k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.01k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 1.00k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  2.91k|    /* fall through */                                                         \
  |  |   87|  2.91k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 510, False: 227k]
  |  |  ------------------
  |  |   88|  2.22k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 714, False: 226k]
  |  |  ------------------
  |  |   89|  2.43k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 212, False: 227k]
  |  |  ------------------
  |  |   90|  2.63k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 227k]
  |  |  ------------------
  |  |   91|  2.91k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 287, False: 227k]
  |  |  ------------------
  |  |   92|  2.91k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.91k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.91k|    break;                                                                     \
  |  |   94|  2.91k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 227k]
  |  |  |  |  ------------------
  |  |  |  |   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: 227k]
  |  |  |  |  ------------------
  |  |  |  |   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: 227k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 227k]
  ------------------
  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|    267|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 267, False: 227k]
  ------------------
  598|    471|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 204, False: 227k]
  ------------------
  599|    766|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 295, False: 227k]
  ------------------
  600|  1.92k|      for (;;) {
  601|  1.92k|        int t;
  602|       |
  603|  1.92k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.92k|#  define MINBPC(enc) 2
  ------------------
  604|  1.92k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.92k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.92k|    {                                                                          \
  |  |  |  |  135|  1.92k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.92k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.92k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 1.88k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  1.92k|    }
  |  |  ------------------
  ------------------
  605|  1.88k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.88k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.88k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.86k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.88k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 710, False: 1.17k]
  ------------------
  607|    710|          break;
  608|  1.17k|        switch (t) {
  609|    450|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 450, False: 721]
  ------------------
  610|    753|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 303, False: 868]
  ------------------
  611|  1.15k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 404, False: 767]
  ------------------
  612|  1.15k|          break;
  613|     14|        default:
  ------------------
  |  Branch (613:9): [True: 14, False: 1.15k]
  ------------------
  614|     14|          *nextTokPtr = ptr;
  615|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  616|  1.17k|        }
  617|  1.17k|      }
  618|       |      /* fall through */
  619|   224k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 223k, False: 3.71k]
  ------------------
  620|   224k|      int open;
  621|   224k|#  ifdef XML_NS
  622|   224k|      hadColon = 0;
  623|   224k|#  endif
  624|   225k|      for (;;) {
  625|   225k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   225k|#  define MINBPC(enc) 2
  ------------------
  626|   225k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   225k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   225k|    {                                                                          \
  |  |  |  |  135|   225k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   225k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   225k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 45, False: 225k]
  |  |  |  |  ------------------
  |  |  |  |  136|     45|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     45|      }                                                                        \
  |  |  |  |  138|   225k|    }
  |  |  ------------------
  ------------------
  627|   225k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   225k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   225k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   225k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 225k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   225k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 8.38k, False: 217k]
  |  Branch (628:32): [True: 216k, False: 917]
  ------------------
  629|   224k|          break;
  630|    917|        switch (open) {
  631|    206|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 206, False: 711]
  ------------------
  632|    587|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 381, False: 536]
  ------------------
  633|    887|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 300, False: 617]
  ------------------
  634|    887|          break;
  635|     30|        default:
  ------------------
  |  Branch (635:9): [True: 30, False: 887]
  ------------------
  636|     30|          *nextTokPtr = ptr;
  637|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  638|    917|        }
  639|    917|      }
  640|   224k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   224k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  5.22M|      for (;;) {
  643|  5.22M|        int t;
  644|  5.22M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.22M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.22M|    {                                                                          \
  |  |  |  |  135|  5.22M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.22M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.22M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 64, False: 5.22M]
  |  |  |  |  ------------------
  |  |  |  |  136|     64|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     64|      }                                                                        \
  |  |  |  |  138|  5.22M|    }
  |  |  ------------------
  ------------------
  645|  5.22M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  5.22M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.22M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.12M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.12M, False: 4.09M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  5.22M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 224k, False: 5.00M]
  ------------------
  647|   224k|          break;
  648|  5.00M|        switch (t) {
  649|   154k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.00M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.00M]
  |  |  |  |  ------------------
  |  |  |  |   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|  77.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  77.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 77.4k, False: 4.92M]
  |  |  |  |  ------------------
  |  |  |  |   50|  77.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 77.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  77.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  77.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  77.3k|#    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|  77.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  77.3k|    break;
  |  |  ------------------
  |  |   63|  77.3k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 5.00M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 5.00M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 5.00M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  79.2k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 79.2k, False: 4.92M]
  ------------------
  651|  79.2k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  79.2k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  79.2k|#  define MINBPC(enc) 2
  ------------------
  652|  79.2k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 13, False: 79.2k]
  ------------------
  653|     13|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 9, False: 4]
  ------------------
  654|      9|              *nextTokPtr = ptr;
  655|     13|            return tok;
  656|     13|          }
  657|  79.2k|          break;
  658|  79.2k|        }
  659|  79.2k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 3, False: 5.00M]
  ------------------
  660|      3|          *nextTokPtr = ptr;
  661|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  662|  4.84M|        default:
  ------------------
  |  Branch (662:9): [True: 4.84M, False: 156k]
  ------------------
  663|  4.84M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.84M|#  define MINBPC(enc) 2
  ------------------
  664|  4.84M|          break;
  665|  5.00M|        }
  666|  5.00M|      }
  667|   224k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   224k|#  define MINBPC(enc) 2
  ------------------
  668|   224k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   224k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   224k|    {                                                                          \
  |  |  |  |  135|   224k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   224k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   224k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 224k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   224k|    }
  |  |  ------------------
  ------------------
  669|   224k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   224k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   224k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   224k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 224k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   214k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 214k, False: 9.86k]
  ------------------
  671|   217k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.82k, False: 221k]
  ------------------
  672|   222k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 5.25k, False: 219k]
  ------------------
  673|   222k|        break;
  674|    477|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 477, False: 223k]
  ------------------
  675|    477|        goto sol;
  676|  1.27k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.27k, False: 223k]
  ------------------
  677|  1.27k|        goto gt;
  678|     31|      default:
  ------------------
  |  Branch (678:7): [True: 31, False: 224k]
  ------------------
  679|     31|        *nextTokPtr = ptr;
  680|     31|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  681|   224k|      }
  682|       |      /* ptr points to closing quote */
  683|   223k|      for (;;) {
  684|   223k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   223k|#  define MINBPC(enc) 2
  ------------------
  685|   223k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   223k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   223k|    {                                                                          \
  |  |  |  |  135|   223k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   223k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   223k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 223k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   223k|    }
  |  |  ------------------
  ------------------
  686|   223k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   223k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   223k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   220k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 220k, False: 2.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   177k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   221k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.97k, False: 220k]
  |  |  ------------------
  |  |  111|   221k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.97k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.97k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.97k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 2.96k]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|   221k|    /* fall through */                                                         \
  |  |  116|   221k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 171k, False: 51.9k]
  |  |  ------------------
  |  |  117|   221k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 47.1k, False: 176k]
  |  |  ------------------
  |  |  118|   221k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   221k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   221k|    break;                                                                     \
  |  |  120|   221k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 223k]
  |  |  |  |  ------------------
  |  |  |  |  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: 223k]
  |  |  |  |  ------------------
  |  |  |  |  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|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 223k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      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;
  |  |  ------------------
  ------------------
  688|    338|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 338, False: 223k]
  ------------------
  689|    783|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 445, False: 223k]
  ------------------
  690|  1.04k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 257, False: 223k]
  ------------------
  691|  1.04k|          continue;
  692|    520|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 520, False: 223k]
  ------------------
  693|  1.79k|        gt:
  694|  1.79k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.79k|#  define MINBPC(enc) 2
  ------------------
  695|  1.79k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.79k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    195|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 195, False: 223k]
  ------------------
  697|    672|        sol:
  698|    672|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    672|#  define MINBPC(enc) 2
  ------------------
  699|    672|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    672|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    672|    {                                                                          \
  |  |  |  |  135|    672|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    672|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    672|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 662]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    672|    }
  |  |  ------------------
  ------------------
  700|    662|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    662|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    662|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 658, False: 4]
  |  |  |  |  |  Branch (739:52): [True: 651, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     11|            *nextTokPtr = ptr;
  702|     11|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  703|     11|          }
  704|    651|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    651|#  define MINBPC(enc) 2
  ------------------
  705|    651|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    651|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      8|        default:
  ------------------
  |  Branch (706:9): [True: 8, False: 223k]
  ------------------
  707|      8|          *nextTokPtr = ptr;
  708|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  709|   223k|        }
  710|   221k|        break;
  711|   223k|      }
  712|   221k|      break;
  713|   222k|    }
  714|   221k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 227k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   227k|    }
  718|   227k|  }
  719|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.94k|}
xmltok.c:little2_scanRef:
  545|   168k|                const char **nextTokPtr) {
  546|   168k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   168k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   168k|    {                                                                          \
  |  |  |  |  135|   168k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   168k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   168k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 168k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|   168k|    }
  |  |  ------------------
  ------------------
  547|   168k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   168k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   168k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   167k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 167k, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  5.89k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   164k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.06k, False: 167k]
  |  |  ------------------
  |  |  111|   164k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.06k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.06k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.06k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 1.05k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|   164k|    /* fall through */                                                         \
  |  |  116|   164k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.75k, False: 164k]
  |  |  ------------------
  |  |  117|   164k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 159k, False: 8.53k]
  |  |  ------------------
  |  |  118|   164k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   164k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   164k|    break;                                                                     \
  |  |  120|   164k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 168k]
  |  |  |  |  ------------------
  |  |  |  |  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: 168k]
  |  |  |  |  ------------------
  |  |  |  |  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: 168k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 9]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    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|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|      9|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  3.69k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 3.69k, False: 164k]
  ------------------
  550|  3.69k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.69k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.69k|#  define MINBPC(enc) 2
  ------------------
  551|      7|  default:
  ------------------
  |  Branch (551:3): [True: 7, False: 168k]
  ------------------
  552|      7|    *nextTokPtr = ptr;
  553|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  554|   168k|  }
  555|   183k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   183k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   183k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   183k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   179k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 179k, False: 3.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  73.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  18.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.47k, False: 179k]
  |  |  ------------------
  |  |   82|  18.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  3.47k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.47k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.47k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 31, False: 3.44k]
  |  |  ------------------
  |  |   83|     31|      *nextTokPtr = ptr;                                                       \
  |  |   84|     31|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     31|    }                                                                          \
  |  |   86|  18.6k|    /* fall through */                                                         \
  |  |   87|  18.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.8k, False: 170k]
  |  |  ------------------
  |  |   88|  17.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.35k, False: 181k]
  |  |  ------------------
  |  |   89|  18.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 395, False: 182k]
  |  |  ------------------
  |  |   90|  18.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 275, False: 183k]
  |  |  ------------------
  |  |   91|  18.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 256, False: 183k]
  |  |  ------------------
  |  |   92|  18.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  18.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  18.6k|    break;                                                                     \
  |  |   94|  18.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |   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: 183k]
  |  |  |  |  ------------------
  |  |  |  |   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|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 183k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      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;
  |  |  ------------------
  ------------------
  558|   164k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 164k, False: 18.6k]
  ------------------
  559|   164k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   164k|#  define MINBPC(enc) 2
  ------------------
  560|   164k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   164k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      7|    default:
  ------------------
  |  Branch (561:5): [True: 7, False: 183k]
  ------------------
  562|      7|      *nextTokPtr = ptr;
  563|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  564|   183k|    }
  565|   183k|  }
  566|     51|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     51|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   164k|}
xmltok.c:little2_scanCharRef:
  514|  3.69k|                    const char **nextTokPtr) {
  515|  3.69k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  3.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.69k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 3.69k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  3.69k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  3.69k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.69k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.69k, False: 2]
  |  |  |  |  |  Branch (739:52): [True: 2.98k, False: 713]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  2.98k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.98k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.98k|#  define MINBPC(enc) 2
  ------------------
  518|    715|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    715|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    715|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    713|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 713, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|    710|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 710, False: 5]
  ------------------
  520|    710|      break;
  521|      5|    default:
  ------------------
  |  Branch (521:5): [True: 5, False: 710]
  ------------------
  522|      5|      *nextTokPtr = ptr;
  523|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  524|    715|    }
  525|  1.08k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    710|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    386|#  define MINBPC(enc) 2
  ------------------
  526|  1.08k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.08k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.08k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.06k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.06k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|    386|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 386, False: 701]
  ------------------
  528|    386|        break;
  529|    681|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 681, False: 406]
  ------------------
  530|    681|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    681|#  define MINBPC(enc) 2
  ------------------
  531|    681|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|    681|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     20|      default:
  ------------------
  |  Branch (532:7): [True: 20, False: 1.06k]
  ------------------
  533|     20|        *nextTokPtr = ptr;
  534|     20|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  535|  1.08k|      }
  536|  1.08k|    }
  537|    710|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  3.69k|}
xmltok.c:little2_scanHexCharRef:
  483|  2.98k|                       const char **nextTokPtr) {
  484|  2.98k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  2.98k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.98k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 2.97k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  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.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.97k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|    883|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 883, False: 2.09k]
  ------------------
  487|  2.96k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.08k, False: 898]
  ------------------
  488|  2.96k|      break;
  489|     15|    default:
  ------------------
  |  Branch (489:5): [True: 15, False: 2.96k]
  ------------------
  490|     15|      *nextTokPtr = ptr;
  491|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  492|  2.97k|    }
  493|  10.5k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.96k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.61k|#  define MINBPC(enc) 2
  ------------------
  494|  10.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.5k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  3.53k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 3.53k, False: 7.02k]
  ------------------
  496|  7.61k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 4.07k, False: 6.48k]
  ------------------
  497|  7.61k|        break;
  498|  2.92k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 2.92k, False: 7.63k]
  ------------------
  499|  2.92k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.92k|#  define MINBPC(enc) 2
  ------------------
  500|  2.92k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  2.92k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     24|      default:
  ------------------
  |  Branch (501:7): [True: 24, False: 10.5k]
  ------------------
  502|     24|        *nextTokPtr = ptr;
  503|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  504|  10.5k|      }
  505|  10.5k|    }
  506|  2.96k|  }
  507|     16|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  2.98k|}
xmltok.c:little2_cdataSectionTok:
  356|  36.6k|                        const char **nextTokPtr) {
  357|  36.6k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 138, False: 36.5k]
  ------------------
  358|    138|    return XML_TOK_NONE;
  ------------------
  |  |   51|    138|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  36.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  36.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  36.5k|    size_t n = end - ptr;
  361|  36.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  36.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.4k, False: 26.0k]
  ------------------
  362|  10.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  10.4k|#  define MINBPC(enc) 2
  ------------------
  363|  10.4k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 18, False: 10.4k]
  ------------------
  364|     18|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.4k|      end = ptr + n;
  366|  10.4k|    }
  367|  36.5k|  }
  368|  36.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  36.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  36.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 30.8k, False: 5.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  14.4k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 14.4k, False: 22.0k]
  ------------------
  370|  14.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.4k|#  define MINBPC(enc) 2
  ------------------
  371|  14.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.4k|    {                                                                          \
  |  |  |  |  135|  14.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  14.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 14.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  14.4k|    }
  |  |  ------------------
  ------------------
  372|  14.4k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  14.4k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  14.4k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 11.1k, False: 3.32k]
  |  |  |  |  |  Branch (739:52): [True: 5.25k, False: 5.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  9.17k|      break;
  374|  5.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.25k|#  define MINBPC(enc) 2
  ------------------
  375|  5.25k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.25k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.25k|    {                                                                          \
  |  |  |  |  135|  5.25k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.25k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 5.25k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  5.25k|    }
  |  |  ------------------
  ------------------
  376|  5.25k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  5.25k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.25k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.25k, False: 998]
  |  |  |  |  |  Branch (739:52): [True: 263, False: 3.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  4.98k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  4.98k|#  define MINBPC(enc) 2
  ------------------
  378|  4.98k|      break;
  379|  4.98k|    }
  380|    263|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    263|#  define MINBPC(enc) 2
  ------------------
  381|    263|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    263|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  6.51k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 6.51k, False: 30.0k]
  ------------------
  383|  6.51k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.51k|#  define MINBPC(enc) 2
  ------------------
  384|  6.51k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.51k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.51k|    {                                                                          \
  |  |  |  |  135|  6.51k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.51k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.51k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 6.49k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  6.51k|    }
  |  |  ------------------
  ------------------
  385|  6.49k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  6.49k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.49k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.15k, False: 4.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 376, False: 6.12k]
  ------------------
  386|    376|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    376|#  define MINBPC(enc) 2
  ------------------
  387|  6.49k|    *nextTokPtr = ptr;
  388|  6.49k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.49k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  7.84k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 7.84k, False: 28.6k]
  ------------------
  390|  7.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.84k|#  define MINBPC(enc) 2
  ------------------
  391|  7.84k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.84k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  7.84k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 36.5k]
  |  |  |  |  ------------------
  |  |  |  |   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: 36.5k]
  |  |  |  |  ------------------
  |  |  |  |   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.51k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.45k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.51k, False: 34.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.51k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 61, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.45k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     61|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.45k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.45k|#    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.45k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.45k|    break;
  |  |  ------------------
  |  |   63|  2.45k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 47, False: 36.4k]
  |  |  ------------------
  |  |   64|     47|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 36.5k]
  |  |  ------------------
  |  |   65|     58|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 36.5k]
  |  |  ------------------
  |  |   66|     58|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     58|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     58|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  5.15k|  default:
  ------------------
  |  Branch (393:3): [True: 5.15k, False: 31.3k]
  ------------------
  394|  5.15k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.15k|#  define MINBPC(enc) 2
  ------------------
  395|  5.15k|    break;
  396|  36.5k|  }
  397|  2.17M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  2.17M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.17M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.17M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  53.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 53.5k, False: 2.12M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.17M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.17M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  409|  10.3k|      LEAD_CASE(4)
  ------------------
  |  |  400|  10.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 10.3k, False: 2.16M]
  |  |  ------------------
  |  |  401|  10.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  10.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 56, False: 10.2k]
  |  |  ------------------
  |  |  402|     56|      *nextTokPtr = ptr;                                                       \
  |  |  403|     56|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     56|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     56|    }                                                                          \
  |  |  405|  10.2k|    ptr += n;                                                                  \
  |  |  406|  10.2k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     42|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 42, False: 2.17M]
  ------------------
  412|     42|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 2.17M]
  ------------------
  413|     50|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 8, False: 2.17M]
  ------------------
  414|  5.30k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 5.25k, False: 2.16M]
  ------------------
  415|  12.4k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 7.10k, False: 2.16M]
  ------------------
  416|  21.5k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 9.17k, False: 2.16M]
  ------------------
  417|  21.5k|      *nextTokPtr = ptr;
  418|  21.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  21.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  2.14M|    default:
  ------------------
  |  Branch (419:5): [True: 2.14M, False: 31.9k]
  ------------------
  420|  2.14M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.14M|#  define MINBPC(enc) 2
  ------------------
  421|  2.14M|      break;
  422|  2.17M|    }
  423|  2.17M|  }
  424|    127|  *nextTokPtr = ptr;
  425|    127|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    127|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  21.7k|}
xmltok.c:little2_attributeValueTok:
 1262|   180k|                          const char **nextTokPtr) {
 1263|   180k|  const char *start;
 1264|   180k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.34k, False: 176k]
  ------------------
 1265|  3.34k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.34k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   176k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   176k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   176k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   176k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 176k]
  ------------------
 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|   176k|  start = ptr;
 1275|  2.65M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  2.65M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.65M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.65M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   221k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 221k, False: 2.43M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.65M]
  |  |  ------------------
  |  | 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.65M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  49.8k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  49.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 49.8k, False: 2.60M]
  |  |  ------------------
  |  | 1279|  49.8k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  49.8k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   151k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 151k, False: 2.50M]
  ------------------
 1286|   151k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 78.6k, False: 72.9k]
  ------------------
 1287|  78.6k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  78.6k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  78.6k|#  define MINBPC(enc) 2
  ------------------
 1288|  72.9k|      *nextTokPtr = ptr;
 1289|  72.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  72.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 2.65M]
  ------------------
 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|  18.6k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 18.6k, False: 2.63M]
  ------------------
 1295|  18.6k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 9.57k, False: 9.04k]
  ------------------
 1296|  9.57k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  9.57k|#  define MINBPC(enc) 2
  ------------------
 1297|  9.57k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.57k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  9.57k|      }
 1299|  9.04k|      *nextTokPtr = ptr;
 1300|  9.04k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.04k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  3.46k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 3.46k, False: 2.65M]
  ------------------
 1302|  3.46k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 2.34k, False: 1.11k]
  ------------------
 1303|  2.34k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.34k|#  define MINBPC(enc) 2
  ------------------
 1304|  2.34k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.34k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.34k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.34k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 303, False: 2.04k]
  ------------------
 1305|    303|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    303|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  2.04k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  2.04k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.04k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.39k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.39k, False: 653]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 371, False: 1.67k]
  ------------------
 1307|    371|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    371|#  define MINBPC(enc) 2
  ------------------
 1308|  2.04k|        *nextTokPtr = ptr;
 1309|  2.04k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.04k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  2.34k|      }
 1311|  1.11k|      *nextTokPtr = ptr;
 1312|  1.11k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.11k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  2.55k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 2.55k, False: 2.65M]
  ------------------
 1314|  2.55k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 1.65k, False: 900]
  ------------------
 1315|  1.65k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.65k|#  define MINBPC(enc) 2
  ------------------
 1316|  1.65k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  1.65k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  1.65k|      }
 1318|    900|      *nextTokPtr = ptr;
 1319|    900|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    900|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  2.42M|    default:
  ------------------
  |  Branch (1320:5): [True: 2.42M, False: 226k]
  ------------------
 1321|  2.42M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.42M|#  define MINBPC(enc) 2
  ------------------
 1322|  2.42M|      break;
 1323|  2.65M|    }
 1324|  2.65M|  }
 1325|    671|  *nextTokPtr = ptr;
 1326|    671|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    671|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   176k|}
xmltok.c:little2_entityValueTok:
 1331|  73.3k|                       const char **nextTokPtr) {
 1332|  73.3k|  const char *start;
 1333|  73.3k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.17k, False: 71.2k]
  ------------------
 1334|  2.17k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.17k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  71.2k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  71.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  71.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  71.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 71.2k]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  71.2k|  start = ptr;
 1344|  13.4M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  13.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.4M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.4M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   190k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 190k, False: 13.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 13.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 13.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  51.2k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  51.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 51.2k, False: 13.3M]
  |  |  ------------------
  |  | 1348|  51.2k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  51.2k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  2.82k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 2.82k, False: 13.4M]
  ------------------
 1355|  2.82k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 1.50k, False: 1.31k]
  ------------------
 1356|  1.50k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.50k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.50k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.31k|      *nextTokPtr = ptr;
 1358|  1.31k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.31k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 13.4M]
  ------------------
 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|  17.7k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 17.7k, False: 13.4M]
  ------------------
 1367|  17.7k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 10.3k, False: 7.46k]
  ------------------
 1368|  10.3k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  10.3k|#  define MINBPC(enc) 2
  ------------------
 1369|  10.3k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  10.3k|      }
 1371|  7.46k|      *nextTokPtr = ptr;
 1372|  7.46k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.46k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  49.5k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 49.5k, False: 13.3M]
  ------------------
 1374|  49.5k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 27.6k, False: 21.9k]
  ------------------
 1375|  27.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  27.6k|#  define MINBPC(enc) 2
  ------------------
 1376|  27.6k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  27.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 530, False: 27.0k]
  ------------------
 1377|    530|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    530|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  27.0k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  27.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  27.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.5k, False: 15.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 900, False: 26.1k]
  ------------------
 1379|    900|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    900|#  define MINBPC(enc) 2
  ------------------
 1380|  27.0k|        *nextTokPtr = ptr;
 1381|  27.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  27.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  27.6k|      }
 1383|  21.9k|      *nextTokPtr = ptr;
 1384|  21.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  21.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  13.3M|    default:
  ------------------
  |  Branch (1385:5): [True: 13.3M, False: 121k]
  ------------------
 1386|  13.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.3M|#  define MINBPC(enc) 2
  ------------------
 1387|  13.3M|      break;
 1388|  13.4M|    }
 1389|  13.4M|  }
 1390|  1.02k|  *nextTokPtr = ptr;
 1391|  1.02k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.02k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  71.2k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  19.0k|                         const char *end1, const char *ptr2) {
 1716|  19.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  19.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  80.9k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  61.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 69.6k, False: 11.3k]
  ------------------
 1718|  69.6k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  69.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 36, False: 69.5k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     36|      return 0; /* LCOV_EXCL_LINE */
 1725|     36|    }
 1726|  69.5k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  69.5k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  69.5k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 69.5k, False: 44]
  |  |  |  |  |  Branch (739:52): [True: 61.9k, False: 7.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  7.64k|      return 0;
 1728|  69.5k|  }
 1729|  11.3k|  return ptr1 == end1;
 1730|  19.0k|}
xmltok.c:little2_nameLength:
 1733|  12.0k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.0k|  const char *start = ptr;
 1735|  84.8k|  for (;;) {
 1736|  84.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  84.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  84.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 22.8k, False: 62.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 84.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 84.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 84.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  62.0k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 62.0k, False: 22.8k]
  ------------------
 1746|  68.3k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 6.32k, False: 78.5k]
  ------------------
 1747|  68.3k|#  ifdef XML_NS
 1748|  68.3k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 84.8k]
  ------------------
 1749|  68.3k|#  endif
 1750|  72.4k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.10k, False: 80.7k]
  ------------------
 1751|  72.5k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 74, False: 84.7k]
  ------------------
 1752|  72.7k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 190, False: 84.6k]
  ------------------
 1753|  72.8k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 96, False: 84.7k]
  ------------------
 1754|  72.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  72.8k|#  define MINBPC(enc) 2
  ------------------
 1755|  72.8k|      break;
 1756|  12.0k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.0k, False: 72.8k]
  ------------------
 1757|  12.0k|      return (int)(ptr - start);
 1758|  84.8k|    }
 1759|  84.8k|  }
 1760|  12.0k|}
xmltok.c:little2_getAtts:
 1510|  8.07k|                ATTRIBUTE *atts) {
 1511|  8.07k|  enum { other, inName, inValue } state = inName;
 1512|  8.07k|  int nAtts = 0;
 1513|  8.07k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.38M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.07k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.37M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.38M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.38M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.38M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.03M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.03M, False: 5.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.38M]
  |  |  ------------------
  |  | 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: 9.38M]
  |  |  ------------------
  |  | 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|   100k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   100k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 100k, False: 9.28M]
  |  |  ------------------
  |  | 1528|   100k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   100k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 100k]
  |  |  |  |  ------------------
  |  |  |  | 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|   100k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   100k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  5.24M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 5.24M, False: 4.14M]
  ------------------
 1535|  5.70M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 459k, False: 8.92M]
  ------------------
 1536|  5.89M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 197k, False: 9.18M]
  ------------------
 1537|  5.89M|      START_NAME
  ------------------
  |  | 1519|  5.89M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 440k, False: 5.45M]
  |  |  ------------------
  |  | 1520|   440k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 223k, False: 217k]
  |  |  ------------------
  |  | 1521|   223k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   223k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   223k|      }                                                                        \
  |  | 1524|   440k|      state = inName;                                                          \
  |  | 1525|   440k|    }
  ------------------
 1538|  5.89M|      break;
 1539|      0|#  undef START_NAME
 1540|  30.4k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 30.4k, False: 9.35M]
  ------------------
 1541|  30.4k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 14.5k, False: 15.8k]
  ------------------
 1542|  14.5k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 8.33k, False: 6.25k]
  ------------------
 1543|  8.33k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  8.33k|#  define MINBPC(enc) 2
  ------------------
 1544|  14.5k|        state = inValue;
 1545|  14.5k|        open = BT_QUOT;
 1546|  15.8k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 14.5k, False: 1.25k]
  ------------------
 1547|  14.5k|        state = other;
 1548|  14.5k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 8.33k, False: 6.25k]
  ------------------
 1549|  8.33k|          atts[nAtts].valueEnd = ptr;
 1550|  14.5k|        nAtts++;
 1551|  14.5k|      }
 1552|  30.4k|      break;
 1553|   853k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 853k, False: 8.52M]
  ------------------
 1554|   853k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 426k, False: 427k]
  ------------------
 1555|   426k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 215k, False: 211k]
  ------------------
 1556|   215k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   215k|#  define MINBPC(enc) 2
  ------------------
 1557|   426k|        state = inValue;
 1558|   426k|        open = BT_APOS;
 1559|   427k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 426k, False: 869]
  ------------------
 1560|   426k|        state = other;
 1561|   426k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 215k, False: 211k]
  ------------------
 1562|   215k|          atts[nAtts].valueEnd = ptr;
 1563|   426k|        nAtts++;
 1564|   426k|      }
 1565|   853k|      break;
 1566|  79.4k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 79.4k, False: 9.30M]
  ------------------
 1567|  79.4k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 79.0k, False: 346]
  ------------------
 1568|  79.0k|        atts[nAtts].normalized = 0;
 1569|  79.4k|      break;
 1570|  1.16M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.16M, False: 8.21M]
  ------------------
 1571|  1.16M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.43k, False: 1.16M]
  ------------------
 1572|  2.43k|        state = other;
 1573|  1.16M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 740k, False: 425k]
  |  Branch (1573:36): [True: 372k, False: 367k]
  |  Branch (1573:55): [True: 185k, False: 186k]
  ------------------
 1574|  1.16M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 33.9k, False: 151k]
  ------------------
 1575|   185k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   151k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   151k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 151k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   337k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 6.79k, False: 144k]
  ------------------
 1576|   185k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   144k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   144k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 139k, False: 5.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   330k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 76.8k, False: 68.0k]
  ------------------
 1577|   185k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  68.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  68.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  62.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 62.3k, False: 5.70k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 61.6k, False: 6.39k]
  ------------------
 1578|   179k|        atts[nAtts].normalized = 0;
 1579|  1.16M|      break;
 1580|   163k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 163k, False: 9.21M]
  ------------------
 1581|   183k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 20.9k, False: 9.36M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   183k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.39k, False: 182k]
  ------------------
 1585|  1.39k|        state = other;
 1586|   182k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 166k, False: 15.5k]
  |  Branch (1586:36): [True: 89.7k, False: 77.2k]
  ------------------
 1587|  89.7k|        atts[nAtts].normalized = 0;
 1588|   183k|      break;
 1589|   188k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 188k, False: 9.19M]
  ------------------
 1590|   229k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 41.6k, False: 9.33M]
  ------------------
 1591|   229k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.07k, False: 221k]
  ------------------
 1592|  8.07k|        return nAtts;
 1593|   221k|      break;
 1594|   837k|    default:
  ------------------
  |  Branch (1594:5): [True: 837k, False: 8.54M]
  ------------------
 1595|   837k|      break;
 1596|  9.38M|    }
 1597|  9.38M|  }
 1598|       |  /* not reached */
 1599|  8.07k|}
xmltok.c:little2_charRefNumber:
 1602|  2.92k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  2.92k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  2.92k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.92k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  2.92k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  2.92k|#  define MINBPC(enc) 2
  ------------------
 1607|  2.92k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  2.92k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.92k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.92k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 2.51k, False: 410]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  11.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  2.51k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  11.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  11.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 11.3k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 2.49k, False: 8.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  8.87k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.85k|#  define MINBPC(enc) 2
  ------------------
 1610|  8.87k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  8.87k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  8.87k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 8.87k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  8.87k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 8.87k]
  ------------------
 1612|    271|      case ASCII_0:
  ------------------
  |  |   90|    271|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 271, False: 8.60k]
  ------------------
 1613|    547|      case ASCII_1:
  ------------------
  |  |   91|    547|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 276, False: 8.60k]
  ------------------
 1614|    828|      case ASCII_2:
  ------------------
  |  |   92|    828|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 281, False: 8.59k]
  ------------------
 1615|  1.16k|      case ASCII_3:
  ------------------
  |  |   93|  1.16k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 339, False: 8.53k]
  ------------------
 1616|  1.77k|      case ASCII_4:
  ------------------
  |  |   94|  1.77k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 605, False: 8.27k]
  ------------------
 1617|  2.07k|      case ASCII_5:
  ------------------
  |  |   95|  2.07k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 302, False: 8.57k]
  ------------------
 1618|  2.39k|      case ASCII_6:
  ------------------
  |  |   96|  2.39k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 325, False: 8.55k]
  ------------------
 1619|  2.65k|      case ASCII_7:
  ------------------
  |  |   97|  2.65k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 253, False: 8.62k]
  ------------------
 1620|  3.07k|      case ASCII_8:
  ------------------
  |  |   98|  3.07k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 421, False: 8.45k]
  ------------------
 1621|  3.36k|      case ASCII_9:
  ------------------
  |  |   99|  3.36k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 287, False: 8.58k]
  ------------------
 1622|  3.36k|        result <<= 4;
 1623|  3.36k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  3.36k|#define ASCII_0 0x30
  ------------------
 1624|  3.36k|        break;
 1625|    216|      case ASCII_A:
  ------------------
  |  |   36|    216|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 216, False: 8.66k]
  ------------------
 1626|    520|      case ASCII_B:
  ------------------
  |  |   37|    520|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 304, False: 8.57k]
  ------------------
 1627|    915|      case ASCII_C:
  ------------------
  |  |   38|    915|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 395, False: 8.48k]
  ------------------
 1628|  1.16k|      case ASCII_D:
  ------------------
  |  |   39|  1.16k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 253, False: 8.62k]
  ------------------
 1629|  2.63k|      case ASCII_E:
  ------------------
  |  |   40|  2.63k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 1.47k, False: 7.40k]
  ------------------
 1630|  3.78k|      case ASCII_F:
  ------------------
  |  |   41|  3.78k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.14k, False: 7.73k]
  ------------------
 1631|  3.78k|        result <<= 4;
 1632|  3.78k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.78k|#define ASCII_A 0x41
  ------------------
 1633|  3.78k|        break;
 1634|    398|      case ASCII_a:
  ------------------
  |  |   63|    398|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 398, False: 8.47k]
  ------------------
 1635|    600|      case ASCII_b:
  ------------------
  |  |   64|    600|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 202, False: 8.67k]
  ------------------
 1636|    970|      case ASCII_c:
  ------------------
  |  |   65|    970|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 370, False: 8.50k]
  ------------------
 1637|  1.24k|      case ASCII_d:
  ------------------
  |  |   66|  1.24k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 274, False: 8.60k]
  ------------------
 1638|  1.45k|      case ASCII_e:
  ------------------
  |  |   67|  1.45k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 208, False: 8.66k]
  ------------------
 1639|  1.73k|      case ASCII_f:
  ------------------
  |  |   68|  1.73k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 282, False: 8.59k]
  ------------------
 1640|  1.73k|        result <<= 4;
 1641|  1.73k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  1.73k|#define ASCII_a 0x61
  ------------------
 1642|  1.73k|        break;
 1643|  8.87k|      }
 1644|  8.87k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 26, False: 8.85k]
  ------------------
 1645|     26|        return -1;
 1646|  8.87k|    }
 1647|  2.51k|  } else {
 1648|  1.11k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  1.11k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.11k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.11k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 408, False: 707]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    705|#  define MINBPC(enc) 2
  ------------------
 1649|    707|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|    707|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    707|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 707, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|    707|      result *= 10;
 1651|    707|      result += (c - ASCII_0);
  ------------------
  |  |   90|    707|#define ASCII_0 0x30
  ------------------
 1652|    707|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 2, False: 705]
  ------------------
 1653|      2|        return -1;
 1654|    707|    }
 1655|    410|  }
 1656|  2.89k|  return checkCharRefNumber(result);
 1657|  2.92k|}
xmltok.c:little2_predefinedEntityName:
 1661|  87.9k|                             const char *end) {
 1662|  87.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  87.9k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  87.9k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  87.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 81.1k, False: 6.77k]
  ------------------
 1664|  1.70k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.70k, False: 86.2k]
  ------------------
 1665|  1.70k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.70k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.70k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.49k, False: 212]
  |  |  |  |  |  Branch (739:52): [True: 637, False: 854]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    637|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    637|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    637|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 217, False: 420]
  |  |  |  |  |  Branch (738:35): [True: 437, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    417|      case ASCII_l:
  ------------------
  |  |   74|    417|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 417, False: 220]
  ------------------
 1668|    417|        return ASCII_LT;
  ------------------
  |  |  111|    417|#define ASCII_LT 0x3C
  ------------------
 1669|      3|      case ASCII_g:
  ------------------
  |  |   69|      3|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 3, False: 634]
  ------------------
 1670|      3|        return ASCII_GT;
  ------------------
  |  |  113|      3|#define ASCII_GT 0x3E
  ------------------
 1671|    637|      }
 1672|    637|    }
 1673|  1.28k|    break;
 1674|  1.77k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.77k, False: 86.1k]
  ------------------
 1675|  1.77k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.77k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.77k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.57k, False: 206]
  |  |  |  |  |  Branch (739:52): [True: 1.22k, False: 350]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.22k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.22k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.22k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.22k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.22k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.01k, False: 202]
  |  |  |  |  |  Branch (739:52): [True: 692, False: 327]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    692|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    692|#  define MINBPC(enc) 2
  ------------------
 1679|    692|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    692|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    692|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 495, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 292, False: 203]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    292|          return ASCII_AMP;
  ------------------
  |  |  105|    292|#define ASCII_AMP 0x26
  ------------------
 1681|    692|      }
 1682|  1.22k|    }
 1683|  1.48k|    break;
 1684|  3.29k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.29k, False: 84.6k]
  ------------------
 1685|  3.29k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.29k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.29k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 218, False: 3.07k]
  |  |  |  |  |  Branch (738:35): [True: 3.08k, False: 212]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.40k|    case ASCII_q:
  ------------------
  |  |   79|  1.40k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.40k, False: 1.89k]
  ------------------
 1687|  1.40k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.40k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.40k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.40k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.40k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.20k, False: 201]
  |  |  |  |  |  Branch (739:52): [True: 1.00k, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.00k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.00k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.00k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.00k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 805, False: 200]
  |  |  |  |  |  Branch (739:52): [True: 608, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    608|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    608|#  define MINBPC(enc) 2
  ------------------
 1692|    608|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    608|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    608|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 409, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 207, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    207|            return ASCII_QUOT;
  ------------------
  |  |  104|    207|#define ASCII_QUOT 0x22
  ------------------
 1694|    608|        }
 1695|  1.00k|      }
 1696|  1.19k|      break;
 1697|  1.67k|    case ASCII_a:
  ------------------
  |  |   63|  1.67k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.67k, False: 1.62k]
  ------------------
 1698|  1.67k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.67k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.67k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.67k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.30k, False: 376]
  |  |  |  |  |  Branch (739:52): [True: 1.09k, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.09k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.09k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.09k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.09k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.09k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 897, False: 201]
  |  |  |  |  |  Branch (739:52): [True: 627, False: 270]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    627|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    627|#  define MINBPC(enc) 2
  ------------------
 1703|    627|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    627|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    627|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 431, False: 196]
  |  |  |  |  |  Branch (739:52): [True: 230, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    230|            return ASCII_APOS;
  ------------------
  |  |  106|    230|#define ASCII_APOS 0x27
  ------------------
 1705|    627|        }
 1706|  1.09k|      }
 1707|  1.44k|      break;
 1708|  3.29k|    }
 1709|  87.9k|  }
 1710|  86.8k|  return 0;
 1711|  87.9k|}
xmltok.c:little2_updatePosition:
 1779|  3.56k|                       POSITION *pos) {
 1780|  3.46M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.46M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.46M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.46M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   257k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 257k, False: 3.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 3.46M]
  |  |  ------------------
  |  | 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: 3.46M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  26.9k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  26.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 26.9k, False: 3.44M]
  |  |  ------------------
  |  | 1784|  26.9k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  26.9k|    pos->columnNumber++;                                                       \
  |  | 1786|  26.9k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  13.4k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 13.4k, False: 3.45M]
  ------------------
 1792|  13.4k|      pos->columnNumber = 0;
 1793|  13.4k|      pos->lineNumber++;
 1794|  13.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.4k|#  define MINBPC(enc) 2
  ------------------
 1795|  13.4k|      break;
 1796|  15.7k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 15.7k, False: 3.45M]
  ------------------
 1797|  15.7k|      pos->lineNumber++;
 1798|  15.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.7k|#  define MINBPC(enc) 2
  ------------------
 1799|  15.7k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  15.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  15.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 15.7k, False: 40]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  15.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.43k, False: 6.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.25k, False: 14.4k]
  ------------------
 1800|  1.25k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.25k|#  define MINBPC(enc) 2
  ------------------
 1801|  15.7k|      pos->columnNumber = 0;
 1802|  15.7k|      break;
 1803|  3.41M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.41M, False: 56.1k]
  ------------------
 1804|  3.41M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.41M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.41M|      pos->columnNumber++;
 1806|  3.41M|      break;
 1807|  3.46M|    }
 1808|  3.46M|  }
 1809|  3.56k|}
xmltok.c:little2_isPublicId:
 1450|  1.60k|                   const char **badPtr) {
 1451|  1.60k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.60k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.60k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.60k|#  define MINBPC(enc) 2
  ------------------
 1453|  9.63k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.59k|#  define MINBPC(enc) 2
  ------------------
 1454|  9.63k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.63k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.63k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.60k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    624|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 624, False: 9.00k]
  ------------------
 1456|  1.48k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 862, False: 8.76k]
  ------------------
 1457|  1.82k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 338, False: 9.29k]
  ------------------
 1458|  2.02k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 196, False: 9.43k]
  ------------------
 1459|  2.24k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 228, False: 9.40k]
  ------------------
 1460|  2.52k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 281, False: 9.35k]
  ------------------
 1461|  2.84k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 320, False: 9.31k]
  ------------------
 1462|  3.61k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 767, False: 8.86k]
  ------------------
 1463|  4.15k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 535, False: 9.09k]
  ------------------
 1464|  4.35k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 203, False: 9.42k]
  ------------------
 1465|  4.66k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 313, False: 9.31k]
  ------------------
 1466|  5.31k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 651, False: 8.98k]
  ------------------
 1467|  5.51k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 196, False: 9.43k]
  ------------------
 1468|  5.70k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 194, False: 9.43k]
  ------------------
 1469|  6.07k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 366, False: 9.26k]
  ------------------
 1470|  6.35k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 276, False: 9.35k]
  ------------------
 1471|  6.54k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 194, False: 9.43k]
  ------------------
 1472|  6.78k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 245, False: 9.38k]
  ------------------
 1473|  6.78k|#  ifdef XML_NS
 1474|  6.78k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 9.63k]
  ------------------
 1475|  6.78k|#  endif
 1476|  6.78k|      break;
 1477|    330|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 330, False: 9.30k]
  ------------------
 1478|    330|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    330|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    330|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 330, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 329]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    329|      break;
 1483|    329|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 283, False: 9.34k]
  ------------------
 1484|  2.09k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.81k, False: 7.82k]
  ------------------
 1485|  2.09k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  2.09k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.09k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.09k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.08k, False: 7]
  ------------------
 1486|  2.08k|        break;
 1487|       |      /* fall through */
 1488|    425|    default:
  ------------------
  |  Branch (1488:5): [True: 418, False: 9.21k]
  ------------------
 1489|    425|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    425|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    425|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 401, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    196|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 196, False: 229]
  ------------------
 1491|    393|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 197, False: 228]
  ------------------
 1492|    393|        break;
 1493|     32|      default:
  ------------------
  |  Branch (1493:7): [True: 32, False: 393]
  ------------------
 1494|     32|        *badPtr = ptr;
 1495|     32|        return 0;
 1496|    425|      }
 1497|    393|      break;
 1498|  9.63k|    }
 1499|  9.63k|  }
 1500|  1.57k|  return 1;
 1501|  1.60k|}
xmltok.c:big2_prologTok:
 1018|  99.6k|                  const char **nextTokPtr) {
 1019|  99.6k|  int tok;
 1020|  99.6k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 314, False: 99.3k]
  ------------------
 1021|    314|    return XML_TOK_NONE;
  ------------------
  |  |   51|    314|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  99.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  99.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  99.3k|    size_t n = end - ptr;
 1024|  99.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  99.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 49.1k, False: 50.2k]
  ------------------
 1025|  49.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  49.1k|#  define MINBPC(enc) 2
  ------------------
 1026|  49.1k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 20, False: 49.0k]
  ------------------
 1027|     20|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     20|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  49.0k|      end = ptr + n;
 1029|  49.0k|    }
 1030|  99.3k|  }
 1031|  99.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  99.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  99.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  96.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 96.7k, False: 2.54k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.51k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.51k, False: 97.7k]
  ------------------
 1033|  1.51k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.51k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.51k|#  define MINBPC(enc) 2
  ------------------
 1034|  3.90k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 3.90k, False: 95.3k]
  ------------------
 1035|  3.90k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.90k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.90k|#  define MINBPC(enc) 2
  ------------------
 1036|  16.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 16.3k, False: 82.9k]
  ------------------
 1037|  16.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  16.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.3k|    {                                                                          \
  |  |  |  |  135|  16.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  16.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 16.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  16.3k|    }
  |  |  ------------------
  ------------------
 1039|  16.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  16.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  16.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 8, False: 16.2k]
  |  |  |  |  |  Branch (870:4): [True: 14.9k, False: 1.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  9.20k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 9.20k, False: 7.10k]
  ------------------
 1041|  9.20k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  9.20k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  9.20k|#  define MINBPC(enc) 2
  ------------------
 1042|  3.08k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.08k, False: 13.2k]
  ------------------
 1043|  3.08k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.08k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.08k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.39k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.39k, False: 14.9k]
  ------------------
 1045|  2.61k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.22k, False: 15.0k]
  ------------------
 1046|  3.99k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.37k, False: 14.9k]
  ------------------
 1047|  3.99k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 16.3k]
  ------------------
 1048|  3.99k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 16.3k]
  ------------------
 1049|  4.00k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 17, False: 16.2k]
  ------------------
 1050|  4.00k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  4.00k|#  define MINBPC(enc) 2
  ------------------
 1051|  4.00k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  4.00k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  16.3k|    }
 1053|      8|    *nextTokPtr = ptr;
 1054|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1055|  16.3k|  }
 1056|  4.40k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.40k, False: 94.8k]
  ------------------
 1057|  4.40k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  4.40k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 51, False: 4.35k]
  ------------------
 1058|     51|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     51|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     51|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     51|    }
 1062|       |    /* fall through */
 1063|  20.8k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 16.5k, False: 82.7k]
  ------------------
 1064|  26.2k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 5.33k, False: 93.9k]
  ------------------
 1065|  29.0k|    for (;;) {
 1066|  29.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  29.0k|#  define MINBPC(enc) 2
  ------------------
 1067|  29.0k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  29.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  29.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  29.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 170, False: 28.8k]
  ------------------
 1068|    170|        break;
 1069|  28.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  28.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  28.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.6k, False: 2.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.11k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.11k, False: 27.7k]
  ------------------
 1071|  2.06k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 945, False: 27.9k]
  ------------------
 1072|  2.06k|        break;
 1073|    772|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 772, False: 28.0k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    772|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    772|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 767, False: 5]
  ------------------
 1076|    767|          break;
 1077|       |        /* fall through */
 1078|  26.0k|      default:
  ------------------
  |  Branch (1078:7): [True: 26.0k, False: 2.83k]
  ------------------
 1079|  26.0k|        *nextTokPtr = ptr;
 1080|  26.0k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  26.0k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  28.8k|      }
 1082|  28.8k|    }
 1083|    170|    *nextTokPtr = ptr;
 1084|    170|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    170|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.78k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.78k, False: 97.5k]
  ------------------
 1086|  1.78k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.78k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.29k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.29k, False: 97.9k]
  ------------------
 1088|  1.29k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.29k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.29k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.29k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.36k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.36k, False: 97.9k]
  ------------------
 1091|  1.36k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.36k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.36k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.36k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    833|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 833, False: 98.4k]
  ------------------
 1094|    833|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    833|#  define MINBPC(enc) 2
  ------------------
 1095|    833|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    833|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    833|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    833|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 830]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    830|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    830|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    830|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 826, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 41, False: 785]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     41|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     41|    {                                                                          \
  |  |  135|     41|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     41|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     41|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 40]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     41|    }
  ------------------
 1099|     40|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     40|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     40|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 26, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      2|#  define MINBPC(enc) 2
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     40|    }
 1104|    827|    *nextTokPtr = ptr;
 1105|    827|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    827|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  7.60k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 7.60k, False: 91.6k]
  ------------------
 1107|  7.60k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.60k|#  define MINBPC(enc) 2
  ------------------
 1108|  7.60k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  7.60k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  6.17k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 6.17k, False: 93.1k]
  ------------------
 1110|  6.17k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.17k|#  define MINBPC(enc) 2
  ------------------
 1111|  6.17k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.17k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.17k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 8, False: 6.16k]
  ------------------
 1112|      8|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      8|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  6.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.16k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.16k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 6.14k]
  |  |  |  |  |  Branch (870:4): [True: 6.14k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    289|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 289, False: 5.88k]
  ------------------
 1115|    289|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    289|#  define MINBPC(enc) 2
  ------------------
 1116|    289|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    289|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    586|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 586, False: 5.58k]
  ------------------
 1118|    586|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    586|#  define MINBPC(enc) 2
  ------------------
 1119|    586|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    586|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|     67|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 67, False: 6.10k]
  ------------------
 1121|     67|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     67|#  define MINBPC(enc) 2
  ------------------
 1122|     67|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|     67|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    444|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 444, False: 5.72k]
  ------------------
 1124|    742|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 298, False: 5.87k]
  ------------------
 1125|  1.11k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 369, False: 5.80k]
  ------------------
 1126|  3.48k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 2.37k, False: 3.79k]
  ------------------
 1127|  4.11k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 634, False: 5.53k]
  ------------------
 1128|  4.73k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 620, False: 5.54k]
  ------------------
 1129|  5.20k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 466, False: 5.70k]
  ------------------
 1130|  5.20k|      *nextTokPtr = ptr;
 1131|  5.20k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  5.20k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  6.16k|    }
 1133|     25|    *nextTokPtr = ptr;
 1134|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.99k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.99k, False: 96.3k]
  ------------------
 1136|  2.99k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.99k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.99k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.99k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  7.31k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 7.31k, False: 91.9k]
  ------------------
 1139|  7.31k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.31k|#  define MINBPC(enc) 2
  ------------------
 1140|  7.31k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  7.31k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.39k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.39k, False: 97.9k]
  ------------------
 1142|  1.39k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.39k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.39k|#  define MINBPC(enc) 2
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|      0|    LEAD_CASE(2)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.2k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.2k]
  |  |  ------------------
  |  | 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|     57|    LEAD_CASE(4)
  ------------------
  |  | 1144|     13|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 18, False: 99.2k]
  |  |  ------------------
  |  | 1145|     18|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 13]
  |  |  ------------------
  |  | 1146|     13|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     13|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     13|#    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|     13|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     13|#  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|     13|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     13|#  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|     13|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  10.2k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 10.2k, False: 89.0k]
  ------------------
 1168|  17.3k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 7.15k, False: 92.1k]
  ------------------
 1169|  17.3k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  17.3k|#define XML_TOK_NAME 18
  ------------------
 1170|  17.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  17.3k|#  define MINBPC(enc) 2
  ------------------
 1171|  17.3k|    break;
 1172|     78|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 78, False: 99.2k]
  ------------------
 1173|    152|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 74, False: 99.2k]
  ------------------
 1174|    636|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 484, False: 98.8k]
  ------------------
 1175|    636|#  ifdef XML_NS
 1176|    636|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 99.2k]
  ------------------
 1177|    636|#  endif
 1178|    636|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    636|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    636|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    636|#  define MINBPC(enc) 2
  ------------------
 1180|    636|    break;
 1181|  2.51k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.51k, False: 96.7k]
  ------------------
 1182|  2.51k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  2.51k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  2.51k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.51k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 2.18k, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  2.18k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.18k|#  define MINBPC(enc) 2
  ------------------
 1184|  2.18k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  2.18k|#define XML_TOK_NAME 18
  ------------------
 1185|  2.18k|      break;
 1186|  2.18k|    }
 1187|    335|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    335|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    335|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    335|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 302, False: 33]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    302|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    302|#  define MINBPC(enc) 2
  ------------------
 1189|    302|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    302|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    302|      break;
 1191|    302|    }
 1192|       |    /* fall through */
 1193|     62|  default:
  ------------------
  |  Branch (1193:3): [True: 29, False: 99.2k]
  ------------------
 1194|     62|    *nextTokPtr = ptr;
 1195|     62|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     62|#define XML_TOK_INVALID 0
  ------------------
 1196|  99.2k|  }
 1197|  41.2k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  41.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  41.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  41.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.9k, False: 10.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  86.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  20.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 10.2k, False: 30.9k]
  |  |  ------------------
  |  |   82|  20.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  10.2k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  10.2k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  10.2k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 37, False: 10.2k]
  |  |  ------------------
  |  |   83|     37|      *nextTokPtr = ptr;                                                       \
  |  |   84|     37|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     37|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     37|    }                                                                          \
  |  |   86|  20.9k|    /* fall through */                                                         \
  |  |   87|  20.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.08k, False: 36.1k]
  |  |  ------------------
  |  |   88|  20.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.84k, False: 36.4k]
  |  |  ------------------
  |  |   89|  20.4k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 266, False: 41.0k]
  |  |  ------------------
  |  |   90|  20.6k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 41.0k]
  |  |  ------------------
  |  |   91|  20.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 272, False: 41.0k]
  |  |  ------------------
  |  |   92|  20.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  20.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  20.9k|    break;                                                                     \
  |  |   94|  20.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 41.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: 41.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|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 41.2k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
 1200|    413|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 413, False: 40.8k]
  ------------------
 1201|  2.21k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.80k, False: 39.4k]
  ------------------
 1202|  2.56k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 351, False: 40.9k]
  ------------------
 1203|  3.99k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.43k, False: 39.8k]
  ------------------
 1204|  5.13k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.13k, False: 40.1k]
  ------------------
 1205|  5.13k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 1, False: 41.2k]
  ------------------
 1206|  12.6k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 7.51k, False: 33.7k]
  ------------------
 1207|  14.2k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.59k, False: 39.6k]
  ------------------
 1208|  16.7k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.49k, False: 38.7k]
  ------------------
 1209|  16.7k|      *nextTokPtr = ptr;
 1210|  16.7k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 41.2k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|    821|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 821, False: 40.4k]
  ------------------
 1232|    821|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    821|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 820]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    820|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    820|#  define MINBPC(enc) 2
  ------------------
 1237|    820|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    820|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|  2.66k|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 2.66k, False: 38.6k]
  ------------------
 1239|  2.66k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  2.66k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 2.65k]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|  2.65k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.65k|#  define MINBPC(enc) 2
  ------------------
 1244|  2.65k|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|  2.65k|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     68|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 68, False: 41.2k]
  ------------------
 1246|     68|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     68|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 67]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     67|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     67|#  define MINBPC(enc) 2
  ------------------
 1251|     67|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     67|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     17|    default:
  ------------------
  |  Branch (1252:5): [True: 17, False: 41.2k]
  ------------------
 1253|     17|      *nextTokPtr = ptr;
 1254|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
 1255|  41.2k|    }
 1256|  41.2k|  }
 1257|    119|  return -tok;
 1258|  20.4k|}
xmltok.c:big2_scanLit:
  984|  5.41k|                const char **nextTokPtr) {
  985|  30.5M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  30.5M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  30.5M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.5M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   240k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 240k, False: 30.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  30.5M|    switch (t) {
  988|   114k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 30.5M]
  |  |  |  |  ------------------
  |  |  |  |   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: 30.5M]
  |  |  |  |  ------------------
  |  |  |  |   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|  57.3k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  57.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 57.3k, False: 30.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  57.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 57.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  57.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  57.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  57.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  57.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  57.2k|    break;
  |  |  ------------------
  |  |   63|  57.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 30.5M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 30.5M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 30.5M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  6.25k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 6.25k, False: 30.5M]
  ------------------
  990|  10.3k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.13k, False: 30.5M]
  ------------------
  991|  10.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  10.3k|#  define MINBPC(enc) 2
  ------------------
  992|  10.3k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 5.08k, False: 5.30k]
  ------------------
  993|  5.08k|        break;
  994|  5.30k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.30k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.30k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 4, False: 5.30k]
  ------------------
  995|      4|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      4|#define XML_TOK_LITERAL 27
  ------------------
  996|  5.30k|      *nextTokPtr = ptr;
  997|  5.30k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.30k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.30k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.28k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.28k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.07k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.07k, False: 4.22k]
  ------------------
  999|  1.59k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 516, False: 4.78k]
  ------------------
 1000|  2.24k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 652, False: 4.65k]
  ------------------
 1001|  5.23k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.98k, False: 2.31k]
  ------------------
 1002|  5.26k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 32, False: 5.27k]
  ------------------
 1003|  5.27k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 12, False: 5.29k]
  ------------------
 1004|  5.27k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.27k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     27|      default:
  ------------------
  |  Branch (1005:7): [True: 27, False: 5.27k]
  ------------------
 1006|     27|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1007|  5.30k|      }
 1008|  30.4M|    default:
  ------------------
  |  Branch (1008:5): [True: 30.4M, False: 67.7k]
  ------------------
 1009|  30.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.4M|#  define MINBPC(enc) 2
  ------------------
 1010|  30.4M|      break;
 1011|  30.5M|    }
 1012|  30.5M|  }
 1013|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  5.41k|}
xmltok.c:big2_scanDecl:
  183|  9.20k|                 const char **nextTokPtr) {
  184|  9.20k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.20k|    {                                                                          \
  |  |  |  |  135|  9.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  9.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 9.19k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  9.20k|    }
  |  |  ------------------
  ------------------
  185|  9.19k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  9.19k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.19k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.17k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    528|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 528, False: 8.66k]
  ------------------
  187|    528|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    528|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    528|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 9.19k]
  ------------------
  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|    120|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 120, False: 9.07k]
  ------------------
  192|  8.64k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 8.52k, False: 671]
  ------------------
  193|  8.64k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.64k|#  define MINBPC(enc) 2
  ------------------
  194|  8.64k|    break;
  195|     22|  default:
  ------------------
  |  Branch (195:3): [True: 22, False: 9.17k]
  ------------------
  196|     22|    *nextTokPtr = ptr;
  197|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  198|  9.19k|  }
  199|  57.8k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  57.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  57.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  57.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  57.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 57.7k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     30|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 30, False: 57.7k]
  ------------------
  202|     30|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     30|    {                                                                          \
  |  |  135|     30|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     30|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     30|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 29]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     30|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     29|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     29|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     29|  ((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: 25, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 28]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 28]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 28]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 28]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     29|      }
  212|       |      /* fall through */
  213|  6.69k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 6.66k, False: 51.1k]
  ------------------
  214|  7.33k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 644, False: 57.1k]
  ------------------
  215|  8.58k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.24k, False: 56.5k]
  ------------------
  216|  8.58k|      *nextTokPtr = ptr;
  217|  8.58k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  8.58k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  39.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 39.7k, False: 18.0k]
  ------------------
  219|  49.1k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 9.41k, False: 48.3k]
  ------------------
  220|  49.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  49.1k|#  define MINBPC(enc) 2
  ------------------
  221|  49.1k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 57.7k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  57.8k|    }
  226|  57.8k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  8.64k|}
xmltok.c:big2_scanComment:
  146|    751|                    const char **nextTokPtr) {
  147|    751|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    751|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    751|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    751|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 739, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    739|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    739|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    739|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 730, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 728, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     11|      *nextTokPtr = ptr;
  150|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  151|     11|    }
  152|    728|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    728|#  define MINBPC(enc) 2
  ------------------
  153|   634k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   634k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   634k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   634k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 20.8k, False: 613k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  14.0k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 634k]
  |  |  |  |  ------------------
  |  |  |  |   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: 634k]
  |  |  |  |  ------------------
  |  |  |  |   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|  7.00k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.97k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.00k, False: 627k]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.00k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 6.97k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.97k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.97k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.97k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  6.97k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.97k|    break;
  |  |  ------------------
  |  |   63|  6.97k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 31, False: 634k]
  |  |  ------------------
  |  |   64|     31|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 634k]
  |  |  ------------------
  |  |   65|     40|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 634k]
  |  |  ------------------
  |  |   66|     40|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     40|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     40|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.30k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.30k, False: 633k]
  ------------------
  157|  1.30k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.30k|#  define MINBPC(enc) 2
  ------------------
  158|  1.30k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.30k|    {                                                                          \
  |  |  |  |  135|  1.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.30k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.30k|    }
  |  |  ------------------
  ------------------
  159|  1.30k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.30k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.30k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.04k, False: 262]
  |  |  |  |  |  Branch (872:49): [True: 590, False: 453]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    590|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    590|#  define MINBPC(enc) 2
  ------------------
  161|    590|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    590|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    590|    {                                                                          \
  |  |  |  |  135|    590|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    590|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    590|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 589]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    590|    }
  |  |  ------------------
  ------------------
  162|    589|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    589|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    589|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 580, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 571, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     18|            *nextTokPtr = ptr;
  164|     18|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  165|     18|          }
  166|    571|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    571|#  define MINBPC(enc) 2
  ------------------
  167|    571|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    571|#define XML_TOK_COMMENT 13
  ------------------
  168|    589|        }
  169|    715|        break;
  170|   626k|      default:
  ------------------
  |  Branch (170:7): [True: 626k, False: 8.35k]
  ------------------
  171|   626k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   626k|#  define MINBPC(enc) 2
  ------------------
  172|   626k|        break;
  173|   634k|      }
  174|   634k|    }
  175|    728|  }
  176|     78|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     78|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    751|}
xmltok.c:big2_scanPi:
  277|  5.20k|               const char **nextTokPtr) {
  278|  5.20k|  int tok;
  279|  5.20k|  const char *target = ptr;
  280|  5.20k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.20k|    {                                                                          \
  |  |  |  |  135|  5.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 5.19k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  5.20k|    }
  |  |  ------------------
  ------------------
  281|  5.19k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.19k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.19k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.94k, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.95k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.22k, False: 3.96k]
  |  |  ------------------
  |  |  111|  5.16k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.22k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.22k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.22k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 1.22k]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  5.16k|    /* fall through */                                                         \
  |  |  116|  5.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.47k, False: 1.71k]
  |  |  ------------------
  |  |  117|  5.16k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 464, False: 4.72k]
  |  |  ------------------
  |  |  118|  5.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  5.16k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.16k|    break;                                                                     \
  |  |  120|  5.16k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.19k]
  |  |  |  |  ------------------
  |  |  |  |  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.19k]
  |  |  |  |  ------------------
  |  |  |  |  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.17k]
  |  |  |  |  ------------------
  |  |  |  |  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|      6|  default:
  ------------------
  |  Branch (283:3): [True: 6, False: 5.18k]
  ------------------
  284|      6|    *nextTokPtr = ptr;
  285|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  286|  5.19k|  }
  287|   998k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   998k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   998k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   998k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.7k, False: 987k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  4.95M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   993k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 987k, False: 11.7k]
  |  |  ------------------
  |  |   82|   993k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   987k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   987k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   987k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 987k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|   993k|    /* fall through */                                                         \
  |  |   87|   993k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.44k, False: 994k]
  |  |  ------------------
  |  |   88|   992k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.37k, False: 997k]
  |  |  ------------------
  |  |   89|   993k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 412, False: 998k]
  |  |  ------------------
  |  |   90|   993k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 235, False: 998k]
  |  |  ------------------
  |  |   91|   993k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 251, False: 998k]
  |  |  ------------------
  |  |   92|   993k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   993k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   993k|    break;                                                                     \
  |  |   94|   993k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 998k]
  |  |  |  |  ------------------
  |  |  |  |   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: 998k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 998k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.18k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.18k, False: 997k]
  ------------------
  291|  1.99k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 812, False: 998k]
  ------------------
  292|  2.85k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 858, False: 998k]
  ------------------
  293|  2.85k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.85k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.85k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.85k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.85k|#  define MINBPC(enc) 2
  ------------------
  298|   636k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   636k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   636k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   636k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  59.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 59.3k, False: 576k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  30.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: 636k]
  |  |  |  |  ------------------
  |  |  |  |   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: 636k]
  |  |  |  |  ------------------
  |  |  |  |   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|  15.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  15.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 15.4k, False: 620k]
  |  |  |  |  ------------------
  |  |  |  |   50|  15.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 15.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  15.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  15.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.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|  15.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  15.4k|    break;
  |  |  ------------------
  |  |   63|  15.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 38, False: 635k]
  |  |  ------------------
  |  |   64|     38|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 636k]
  |  |  ------------------
  |  |   65|     44|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 635k]
  |  |  ------------------
  |  |   66|     44|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     44|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     44|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.03k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.03k, False: 630k]
  ------------------
  302|  5.03k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.03k|#  define MINBPC(enc) 2
  ------------------
  303|  5.03k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.03k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.03k|    {                                                                          \
  |  |  |  |  135|  5.03k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.03k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 5.03k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  5.03k|    }
  |  |  ------------------
  ------------------
  304|  5.03k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.03k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.03k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.69k, False: 338]
  |  |  |  |  |  Branch (872:49): [True: 2.65k, False: 2.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.65k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.65k|#  define MINBPC(enc) 2
  ------------------
  306|  2.65k|            return tok;
  307|  2.65k|          }
  308|  2.37k|          break;
  309|   615k|        default:
  ------------------
  |  Branch (309:9): [True: 615k, False: 20.5k]
  ------------------
  310|   615k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   615k|#  define MINBPC(enc) 2
  ------------------
  311|   615k|          break;
  312|   636k|        }
  313|   636k|      }
  314|    118|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    118|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.19k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.19k, False: 996k]
  ------------------
  316|  2.19k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.19k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.19k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.19k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.19k|#  define MINBPC(enc) 2
  ------------------
  321|  2.19k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.19k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.19k|    {                                                                          \
  |  |  |  |  135|  2.19k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.19k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 53, False: 2.14k]
  |  |  |  |  ------------------
  |  |  |  |  136|     53|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     53|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     53|      }                                                                        \
  |  |  |  |  138|  2.19k|    }
  |  |  ------------------
  ------------------
  322|  2.14k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.14k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.14k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.12k, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 2.11k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.11k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.11k|#  define MINBPC(enc) 2
  ------------------
  324|  2.11k|        return tok;
  325|  2.11k|      }
  326|       |      /* fall through */
  327|     35|    default:
  ------------------
  |  Branch (327:5): [True: 14, False: 998k]
  ------------------
  328|     35|      *nextTokPtr = ptr;
  329|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  330|   998k|    }
  331|   998k|  }
  332|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.16k|}
xmltok.c:big2_checkPiTarget:
  232|  5.04k|                      int *tokPtr) {
  233|  5.04k|  int upper = 0;
  234|  5.04k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.04k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.04k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.04k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.04k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  5.04k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.28k, False: 2.76k]
  ------------------
  237|  2.28k|    return 1;
  238|  2.76k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.76k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.76k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.13k, False: 631]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.08k|  case ASCII_x:
  ------------------
  |  |   86|  1.08k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.08k, False: 1.68k]
  ------------------
  240|  1.08k|    break;
  241|    728|  case ASCII_X:
  ------------------
  |  |   59|    728|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 728, False: 2.03k]
  ------------------
  242|    728|    upper = 1;
  243|    728|    break;
  244|    954|  default:
  ------------------
  |  Branch (244:3): [True: 954, False: 1.81k]
  ------------------
  245|    954|    return 1;
  246|  2.76k|  }
  247|  1.81k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.81k|#  define MINBPC(enc) 2
  ------------------
  248|  1.81k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.81k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.81k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.21k, False: 600]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    453|  case ASCII_m:
  ------------------
  |  |   75|    453|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 453, False: 1.35k]
  ------------------
  250|    453|    break;
  251|    699|  case ASCII_M:
  ------------------
  |  |   48|    699|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 699, False: 1.11k]
  ------------------
  252|    699|    upper = 1;
  253|    699|    break;
  254|    660|  default:
  ------------------
  |  Branch (254:3): [True: 660, False: 1.15k]
  ------------------
  255|    660|    return 1;
  256|  1.81k|  }
  257|  1.15k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.15k|#  define MINBPC(enc) 2
  ------------------
  258|  1.15k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.15k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.15k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 621, False: 531]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     43|  case ASCII_l:
  ------------------
  |  |   74|     43|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 43, False: 1.10k]
  ------------------
  260|     43|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.15k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.10k|  default:
  ------------------
  |  Branch (264:3): [True: 1.10k, False: 45]
  ------------------
  265|  1.10k|    return 1;
  266|  1.15k|  }
  267|     45|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 42]
  ------------------
  268|      3|    return 0;
  269|     42|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     42|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     42|  return 1;
  271|     45|}
xmltok.c:big2_scanPercent:
  924|  1.79k|                    const char **nextTokPtr) {
  925|  1.79k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.79k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.79k|    {                                                                          \
  |  |  |  |  135|  1.79k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.79k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.79k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|  1.79k|    }
  |  |  ------------------
  ------------------
  926|  1.75k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.75k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.75k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.52k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.52k, False: 236]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.20k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.30k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 220, False: 1.53k]
  |  |  ------------------
  |  |  111|  1.30k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    220|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    220|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    220|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 206]
  |  |  ------------------
  |  |  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: 758, False: 999]
  |  |  ------------------
  |  |  117|  1.30k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 345, False: 1.41k]
  |  |  ------------------
  |  |  118|  1.30k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  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: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  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.75k]
  |  |  |  |  ------------------
  |  |  |  |  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: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  928|    222|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 222, False: 1.53k]
  ------------------
  929|    288|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 66, False: 1.69k]
  ------------------
  930|    413|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 125, False: 1.63k]
  ------------------
  931|    417|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 1.75k]
  ------------------
  932|    417|    *nextTokPtr = ptr;
  933|    417|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    417|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 1.75k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  1.75k|  }
  938|  3.10k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.10k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.10k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.10k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.73k, False: 366]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.40k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.86k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 347, False: 2.75k]
  |  |  ------------------
  |  |   82|  1.86k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    347|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    347|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    347|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 326]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  1.86k|    /* fall through */                                                         \
  |  |   87|  1.86k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 320, False: 2.78k]
  |  |  ------------------
  |  |   88|  1.25k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 609, False: 2.49k]
  |  |  ------------------
  |  |   89|  1.46k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 209, False: 2.89k]
  |  |  ------------------
  |  |   90|  1.67k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 2.89k]
  |  |  ------------------
  |  |   91|  1.86k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 199, False: 2.90k]
  |  |  ------------------
  |  |   92|  1.86k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.86k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.86k|    break;                                                                     \
  |  |   94|  1.86k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.10k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.10k]
  |  |  |  |  ------------------
  |  |  |  |   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: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     20|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|     10|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.18k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.18k, False: 1.92k]
  ------------------
  942|  1.18k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  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|     16|    default:
  ------------------
  |  Branch (944:5): [True: 16, False: 3.08k]
  ------------------
  945|     16|      *nextTokPtr = ptr;
  946|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  947|  3.10k|    }
  948|  3.10k|  }
  949|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.30k|}
xmltok.c:big2_scanPoundName:
  954|  1.39k|                      const char **nextTokPtr) {
  955|  1.39k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.39k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.39k|    {                                                                          \
  |  |  |  |  135|  1.39k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.39k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 1.38k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  1.39k|    }
  |  |  ------------------
  ------------------
  956|  1.38k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.38k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.38k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.31k, False: 74]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.01k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.33k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 40, False: 1.34k]
  |  |  ------------------
  |  |  111|  1.33k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     40|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     40|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     40|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 26]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.33k|    /* fall through */                                                         \
  |  |  116|  1.33k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 899, False: 488]
  |  |  ------------------
  |  |  117|  1.33k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 413, False: 974]
  |  |  ------------------
  |  |  118|  1.33k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.33k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.33k|    break;                                                                     \
  |  |  120|  1.33k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.38k]
  |  |  |  |  ------------------
  |  |  |  |  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.38k]
  |  |  |  |  ------------------
  |  |  |  |  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|     29|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 29, False: 1.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|     29|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     25|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     50|#    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|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     25|    }                                                                          \
  |  |  |  |  106|     25|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 1.38k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  1.38k|  }
  962|  10.5k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  10.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.16k, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  33.4k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.30k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.41k, False: 9.17k]
  |  |  ------------------
  |  |   82|  9.30k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.41k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.41k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.41k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 1.40k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  9.30k|    /* fall through */                                                         \
  |  |   87|  9.30k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.93k, False: 6.65k]
  |  |  ------------------
  |  |   88|  8.69k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.35k, False: 7.23k]
  |  |  ------------------
  |  |   89|  8.90k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 209, False: 10.3k]
  |  |  ------------------
  |  |   90|  9.09k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 10.3k]
  |  |  ------------------
  |  |   91|  9.30k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 10.3k]
  |  |  ------------------
  |  |   92|  9.30k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  9.30k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  9.30k|    break;                                                                     \
  |  |   94|  9.30k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 10.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: 10.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 10.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    321|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 321, False: 10.2k]
  ------------------
  966|    517|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 196, False: 10.3k]
  ------------------
  967|    719|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 202, False: 10.3k]
  ------------------
  968|    808|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 89, False: 10.5k]
  ------------------
  969|  1.18k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 375, False: 10.2k]
  ------------------
  970|  1.18k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 10.5k]
  ------------------
  971|  1.25k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 68, False: 10.5k]
  ------------------
  972|  1.25k|      *nextTokPtr = ptr;
  973|  1.25k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.25k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     10|    default:
  ------------------
  |  Branch (974:5): [True: 10, False: 10.5k]
  ------------------
  975|     10|      *nextTokPtr = ptr;
  976|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  977|  10.5k|    }
  978|  10.5k|  }
  979|     55|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     55|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.33k|}
xmltok.c:big2_contentTok:
  824|  44.2k|                   const char **nextTokPtr) {
  825|  44.2k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.11k, False: 43.0k]
  ------------------
  826|  1.11k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.11k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  43.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  43.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  43.0k|    size_t n = end - ptr;
  829|  43.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  43.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 13.5k, False: 29.5k]
  ------------------
  830|  13.5k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  13.5k|#  define MINBPC(enc) 2
  ------------------
  831|  13.5k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 94, False: 13.4k]
  ------------------
  832|     94|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     94|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  13.4k|      end = ptr + n;
  834|  13.4k|    }
  835|  43.0k|  }
  836|  43.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  43.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  43.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  37.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 37.7k, False: 5.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  14.7k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 14.7k, False: 28.2k]
  ------------------
  838|  14.7k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  14.7k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  14.7k|#  define MINBPC(enc) 2
  ------------------
  839|  10.5k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 10.5k, False: 32.4k]
  ------------------
  840|  10.5k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  10.5k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  10.5k|#  define MINBPC(enc) 2
  ------------------
  841|  4.62k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 4.62k, False: 38.3k]
  ------------------
  842|  4.62k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.62k|#  define MINBPC(enc) 2
  ------------------
  843|  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 (843:9): [True: 14, False: 4.61k]
  ------------------
  844|     14|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     14|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  4.61k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  4.61k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.61k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.61k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.61k, False: 1.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 288, False: 4.32k]
  ------------------
  846|    288|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    288|#  define MINBPC(enc) 2
  ------------------
  847|  4.61k|    *nextTokPtr = ptr;
  848|  4.61k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.61k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.01k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.01k, False: 40.9k]
  ------------------
  850|  2.01k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.01k|#  define MINBPC(enc) 2
  ------------------
  851|  2.01k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.01k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  2.56k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 2.56k, False: 40.4k]
  ------------------
  853|  2.56k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.56k|#  define MINBPC(enc) 2
  ------------------
  854|  2.56k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.56k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.56k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  2.56k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 2.55k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  2.55k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  2.55k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.55k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.20k, False: 352]
  |  |  |  |  |  Branch (872:49): [True: 930, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.62k|      break;
  858|    930|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    930|#  define MINBPC(enc) 2
  ------------------
  859|    930|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    930|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    930|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    930|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 2, False: 928]
  ------------------
  860|      2|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      2|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|    928|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    928|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    928|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 562, False: 366]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 560]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|    926|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|    926|#  define MINBPC(enc) 2
  ------------------
  863|    926|      break;
  864|    926|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  2.49k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 43.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: 43.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.21k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.15k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.21k, False: 41.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.21k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 53, False: 1.15k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.15k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     53|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.15k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.15k|#    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.15k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.15k|    break;
  |  |  ------------------
  |  |   63|  1.15k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 62, False: 42.9k]
  |  |  ------------------
  |  |   64|     62|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 43.0k]
  |  |  ------------------
  |  |   65|     74|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 42.9k]
  |  |  ------------------
  |  |   66|     74|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     74|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     74|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  7.25k|  default:
  ------------------
  |  Branch (868:3): [True: 7.25k, False: 35.7k]
  ------------------
  869|  7.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.25k|#  define MINBPC(enc) 2
  ------------------
  870|  7.25k|    break;
  871|  43.0k|  }
  872|   247k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   247k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   247k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   247k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 27.4k, False: 220k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 247k]
  |  |  ------------------
  |  |  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: 247k]
  |  |  ------------------
  |  |  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|  3.81k|      LEAD_CASE(4)
  ------------------
  |  |  875|  3.77k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 3.81k, False: 243k]
  |  |  ------------------
  |  |  876|  3.81k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  3.77k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 48, False: 3.77k]
  |  |  ------------------
  |  |  877|     48|      *nextTokPtr = ptr;                                                       \
  |  |  878|     48|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     48|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     48|    }                                                                          \
  |  |  880|  3.77k|    ptr += n;                                                                  \
  |  |  881|  3.77k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  3.69k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 3.69k, False: 243k]
  ------------------
  887|  3.69k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  3.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  3.69k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.69k, False: 1]
  |  |  ------------------
  ------------------
  888|  3.69k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  3.69k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.69k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.45k, False: 1.23k]
  |  |  |  |  |  Branch (872:49): [True: 988, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  2.70k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.70k|#  define MINBPC(enc) 2
  ------------------
  890|  2.70k|          break;
  891|  2.70k|        }
  892|    988|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    988|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|    988|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 987, False: 1]
  |  |  ------------------
  ------------------
  893|    987|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|    987|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    987|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 633, False: 354]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 630]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    984|            ptr += MINBPC(enc);
  ------------------
  |  |  916|    984|#  define MINBPC(enc) 2
  ------------------
  895|    984|            break;
  896|    984|          }
  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|    987|        }
  900|    988|      }
  901|       |      /* fall through */
  902|  2.57k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 2.56k, False: 245k]
  ------------------
  903|  5.64k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.06k, False: 244k]
  ------------------
  904|  5.68k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 45, False: 247k]
  ------------------
  905|  5.68k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 247k]
  ------------------
  906|  5.69k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 247k]
  ------------------
  907|  9.13k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 3.43k, False: 244k]
  ------------------
  908|  10.5k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.41k, False: 246k]
  ------------------
  909|  10.5k|      *nextTokPtr = ptr;
  910|  10.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  10.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   229k|    default:
  ------------------
  |  Branch (911:5): [True: 229k, False: 18.0k]
  ------------------
  912|   229k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   229k|#  define MINBPC(enc) 2
  ------------------
  913|   229k|      break;
  914|   247k|    }
  915|   247k|  }
  916|    371|  *nextTokPtr = ptr;
  917|    371|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    371|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  10.9k|}
xmltok.c:big2_scanLt:
  726|  14.7k|               const char **nextTokPtr) {
  727|  14.7k|#  ifdef XML_NS
  728|  14.7k|  int hadColon;
  729|  14.7k|#  endif
  730|  14.7k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.7k|    {                                                                          \
  |  |  |  |  135|  14.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.7k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  14.7k|    }
  |  |  ------------------
  ------------------
  731|  14.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.8k, False: 2.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  9.93k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.82k, False: 11.8k]
  |  |  ------------------
  |  |  111|  10.4k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.82k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.82k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.82k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 2.80k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  10.4k|    /* fall through */                                                         \
  |  |  116|  10.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.26k, False: 10.4k]
  |  |  ------------------
  |  |  117|  10.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.33k, False: 11.3k]
  |  |  ------------------
  |  |  118|  10.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  10.4k|    break;                                                                     \
  |  |  120|  10.4k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  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: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 14.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    863|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 863, False: 13.8k]
  ------------------
  734|    863|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    863|#  define MINBPC(enc) 2
  ------------------
  735|    863|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    863|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    863|    {                                                                          \
  |  |  |  |  135|    863|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    863|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    863|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 861]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    863|    }
  |  |  ------------------
  ------------------
  736|    861|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    861|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    861|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    850|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 16, False: 845]
  |  |  |  |  |  Branch (870:4): [True: 850, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    223|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 223, False: 638]
  ------------------
  738|    223|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    223|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    223|#  define MINBPC(enc) 2
  ------------------
  739|    622|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 622, False: 239]
  ------------------
  740|    622|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    622|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    622|#  define MINBPC(enc) 2
  ------------------
  741|    861|    }
  742|     16|    *nextTokPtr = ptr;
  743|     16|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  744|  2.11k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.11k, False: 12.6k]
  ------------------
  745|  2.11k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.11k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.11k|#  define MINBPC(enc) 2
  ------------------
  746|  1.28k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.28k, False: 13.4k]
  ------------------
  747|  1.28k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.28k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.28k|#  define MINBPC(enc) 2
  ------------------
  748|     11|  default:
  ------------------
  |  Branch (748:3): [True: 11, False: 14.7k]
  ------------------
  749|     11|    *nextTokPtr = ptr;
  750|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  751|  14.7k|  }
  752|  10.4k|#  ifdef XML_NS
  753|  10.4k|  hadColon = 0;
  754|  10.4k|#  endif
  755|       |  /* we have a start-tag */
  756|   816k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   816k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   816k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   816k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.9k, False: 798k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  4.02M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   806k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 798k, False: 17.9k]
  |  |  ------------------
  |  |   82|   806k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   798k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   798k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   798k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 798k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|   806k|    /* fall through */                                                         \
  |  |   87|   806k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.73k, False: 811k]
  |  |  ------------------
  |  |   88|   805k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 877, False: 815k]
  |  |  ------------------
  |  |   89|   805k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 225, False: 816k]
  |  |  ------------------
  |  |   90|   806k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 460, False: 816k]
  |  |  ------------------
  |  |   91|   806k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 331, False: 816k]
  |  |  ------------------
  |  |   92|   806k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   806k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   806k|    break;                                                                     \
  |  |   94|   806k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 816k]
  |  |  |  |  ------------------
  |  |  |  |   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: 816k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 816k]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      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: 816k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  2.37k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.37k, False: 814k]
  ------------------
  777|  3.74k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.37k, False: 815k]
  ------------------
  778|  4.60k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 862, False: 815k]
  ------------------
  779|  4.60k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.60k|#  define MINBPC(enc) 2
  ------------------
  780|  6.17k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  6.17k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.17k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.17k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.13k, False: 1.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.41k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.09k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.01k, False: 5.16k]
  |  |  ------------------
  |  |  111|  3.09k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.01k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.01k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.01k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 997]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  3.09k|    /* fall through */                                                         \
  |  |  116|  3.09k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.37k, False: 4.79k]
  |  |  ------------------
  |  |  117|  3.09k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 719, False: 5.45k]
  |  |  ------------------
  |  |  118|  3.09k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.09k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.09k|    break;                                                                     \
  |  |  120|  3.09k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.17k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.17k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 6.15k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.23k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.23k, False: 4.93k]
  ------------------
  784|  1.23k|          goto gt;
  785|    198|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 198, False: 5.97k]
  ------------------
  786|    198|          goto sol;
  787|    808|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 808, False: 5.36k]
  ------------------
  788|  1.25k|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 445, False: 5.72k]
  ------------------
  789|  1.60k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 351, False: 5.82k]
  ------------------
  790|  1.60k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.60k|#  define MINBPC(enc) 2
  ------------------
  791|  1.60k|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 6.16k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  6.17k|        }
  796|  3.09k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.09k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  6.17k|      }
  798|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.60k|    }
  800|  5.40k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.40k, False: 811k]
  ------------------
  801|  6.64k|    gt:
  802|  6.64k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.64k|#  define MINBPC(enc) 2
  ------------------
  803|  6.64k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.64k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    281|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 281, False: 816k]
  ------------------
  805|    479|    sol:
  806|    479|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    479|#  define MINBPC(enc) 2
  ------------------
  807|    479|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    479|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    479|    {                                                                          \
  |  |  |  |  135|    479|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    479|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    479|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 468]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    479|    }
  |  |  ------------------
  ------------------
  808|    468|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    468|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    468|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 457, False: 11]
  |  |  |  |  |  Branch (872:49): [True: 448, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     20|        *nextTokPtr = ptr;
  810|     20|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  811|     20|      }
  812|    448|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    448|#  define MINBPC(enc) 2
  ------------------
  813|    448|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    448|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     11|    default:
  ------------------
  |  Branch (814:5): [True: 11, False: 816k]
  ------------------
  815|     11|      *nextTokPtr = ptr;
  816|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  817|   816k|    }
  818|   816k|  }
  819|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  10.4k|}
xmltok.c:big2_scanCdataSection:
  337|    622|                         const char **nextTokPtr) {
  338|    622|  static const char CDATA_LSQB[]
  339|    622|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    622|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    622|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    622|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    622|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    622|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    622|#define ASCII_LSQB 0x5B
  ------------------
  340|    622|  int i;
  341|    622|  UNUSED_P(enc);
  ------------------
  |  |  135|    622|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    622|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    622|    {                                                                          \
  |  |  135|    622|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    622|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    622|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 619]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    622|    }
  ------------------
  344|  4.26k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.64k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.66k, False: 600]
  ------------------
  345|  3.66k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.66k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.66k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.65k, False: 3]
  |  |  |  |  |  Branch (872:49): [True: 3.64k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     19|      *nextTokPtr = ptr;
  347|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  348|     19|    }
  349|  3.66k|  }
  350|    600|  *nextTokPtr = ptr;
  351|    600|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    600|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    619|}
xmltok.c:big2_scanEndTag:
  432|  1.28k|                   const char **nextTokPtr) {
  433|  1.28k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.28k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.28k|    {                                                                          \
  |  |  |  |  135|  1.28k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.28k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.28k|    }
  |  |  ------------------
  ------------------
  434|  1.28k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.28k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.28k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    939|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 939, False: 347]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.15k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.25k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 321, False: 965]
  |  |  ------------------
  |  |  111|  1.25k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    321|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    321|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    321|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 319]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.25k|    /* fall through */                                                         \
  |  |  116|  1.25k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 481, False: 805]
  |  |  ------------------
  |  |  117|  1.25k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 458, False: 828]
  |  |  ------------------
  |  |  118|  1.25k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.25k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.25k|    break;                                                                     \
  |  |  120|  1.25k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.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: 1.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|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 1.26k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.28k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.28k|  }
  440|  2.66k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.66k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.66k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.66k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.32k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.32k, False: 345]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.07k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.46k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 317, False: 2.34k]
  |  |  ------------------
  |  |   82|  1.46k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    317|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    317|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    317|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 300]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  1.46k|    /* fall through */                                                         \
  |  |   87|  1.46k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 266, False: 2.39k]
  |  |  ------------------
  |  |   88|    821|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 255, False: 2.41k]
  |  |  ------------------
  |  |   89|  1.05k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 238, False: 2.42k]
  |  |  ------------------
  |  |   90|  1.27k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 213, False: 2.45k]
  |  |  ------------------
  |  |   91|  1.46k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 196, False: 2.46k]
  |  |  ------------------
  |  |   92|  1.46k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.46k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.46k|    break;                                                                     \
  |  |   94|  1.46k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |   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.66k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    374|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 374, False: 2.29k]
  ------------------
  444|    596|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 222, False: 2.44k]
  ------------------
  445|    847|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 251, False: 2.41k]
  ------------------
  446|  1.75k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    847|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    948|#  define MINBPC(enc) 2
  ------------------
  447|  1.75k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.75k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.75k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.71k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.71k, False: 37]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    327|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 327, False: 1.42k]
  ------------------
  449|    541|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 214, False: 1.54k]
  ------------------
  450|    948|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 407, False: 1.34k]
  ------------------
  451|    948|          break;
  452|    761|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 761, False: 993]
  ------------------
  453|    761|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    761|#  define MINBPC(enc) 2
  ------------------
  454|    761|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    761|#define XML_TOK_END_TAG 5
  ------------------
  455|     45|        default:
  ------------------
  |  Branch (455:9): [True: 45, False: 1.70k]
  ------------------
  456|     45|          *nextTokPtr = ptr;
  457|     45|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     45|#define XML_TOK_INVALID 0
  ------------------
  458|  1.75k|        }
  459|  1.75k|      }
  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: 2.66k]
  ------------------
  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|    298|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 298, False: 2.36k]
  ------------------
  469|    298|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    298|#  define MINBPC(enc) 2
  ------------------
  470|    298|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    298|#define XML_TOK_END_TAG 5
  ------------------
  471|     14|    default:
  ------------------
  |  Branch (471:5): [True: 14, False: 2.65k]
  ------------------
  472|     14|      *nextTokPtr = ptr;
  473|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  474|  2.66k|    }
  475|  2.66k|  }
  476|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.25k|}
xmltok.c:big2_scanAtts:
  573|  3.09k|                 const char **nextTokPtr) {
  574|  3.09k|#  ifdef XML_NS
  575|  3.09k|  int hadColon = 0;
  576|  3.09k|#  endif
  577|   169k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   169k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   169k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   169k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   167k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 167k, False: 1.94k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  13.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.43k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.91k, False: 167k]
  |  |  ------------------
  |  |   82|  3.43k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.91k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.91k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.91k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 1.89k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  3.43k|    /* fall through */                                                         \
  |  |   87|  3.43k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 449, False: 169k]
  |  |  ------------------
  |  |   88|  2.82k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 482, False: 168k]
  |  |  ------------------
  |  |   89|  3.02k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 169k]
  |  |  ------------------
  |  |   90|  3.22k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 169k]
  |  |  ------------------
  |  |   91|  3.43k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 169k]
  |  |  ------------------
  |  |   92|  3.43k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.43k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.43k|    break;                                                                     \
  |  |   94|  3.43k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 169k]
  |  |  |  |  ------------------
  |  |  |  |   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: 169k]
  |  |  |  |  ------------------
  |  |  |  |   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|     27|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 27, False: 169k]
  |  |  |  |  ------------------
  |  |  |  |   71|     27|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 23]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     46|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     23|    }                                                                          \
  |  |  |  |   77|     23|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 169k]
  ------------------
  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|    707|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 707, False: 168k]
  ------------------
  598|  1.01k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 306, False: 169k]
  ------------------
  599|  1.36k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 351, False: 169k]
  ------------------
  600|  2.86k|      for (;;) {
  601|  2.86k|        int t;
  602|       |
  603|  2.86k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.86k|#  define MINBPC(enc) 2
  ------------------
  604|  2.86k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.86k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.86k|    {                                                                          \
  |  |  |  |  135|  2.86k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.86k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.86k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 2.82k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  2.86k|    }
  |  |  ------------------
  ------------------
  605|  2.82k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.82k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.82k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.80k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.80k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.82k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.29k, False: 1.53k]
  ------------------
  607|  1.29k|          break;
  608|  1.53k|        switch (t) {
  609|    764|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 764, False: 771]
  ------------------
  610|  1.15k|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 393, False: 1.14k]
  ------------------
  611|  1.50k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 348, False: 1.18k]
  ------------------
  612|  1.50k|          break;
  613|     30|        default:
  ------------------
  |  Branch (613:9): [True: 30, False: 1.50k]
  ------------------
  614|     30|          *nextTokPtr = ptr;
  615|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  616|  1.53k|        }
  617|  1.53k|      }
  618|       |      /* fall through */
  619|   165k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 164k, False: 4.85k]
  ------------------
  620|   165k|      int open;
  621|   165k|#  ifdef XML_NS
  622|   165k|      hadColon = 0;
  623|   165k|#  endif
  624|   166k|      for (;;) {
  625|   166k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   166k|#  define MINBPC(enc) 2
  ------------------
  626|   166k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   166k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   166k|    {                                                                          \
  |  |  |  |  135|   166k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   166k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   166k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 166k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   166k|    }
  |  |  ------------------
  ------------------
  627|   166k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   166k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   166k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   166k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 166k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   166k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 3.74k, False: 162k]
  |  Branch (628:32): [True: 162k, False: 680]
  ------------------
  629|   165k|          break;
  630|    680|        switch (open) {
  631|    215|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 215, False: 465]
  ------------------
  632|    409|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 194, False: 486]
  ------------------
  633|    650|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 241, False: 439]
  ------------------
  634|    650|          break;
  635|     30|        default:
  ------------------
  |  Branch (635:9): [True: 30, False: 650]
  ------------------
  636|     30|          *nextTokPtr = ptr;
  637|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  638|    680|        }
  639|    680|      }
  640|   165k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   165k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  8.60M|      for (;;) {
  643|  8.60M|        int t;
  644|  8.60M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.60M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.60M|    {                                                                          \
  |  |  |  |  135|  8.60M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.60M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.60M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 73, False: 8.60M]
  |  |  |  |  ------------------
  |  |  |  |  136|     73|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     73|      }                                                                        \
  |  |  |  |  138|  8.60M|    }
  |  |  ------------------
  ------------------
  645|  8.60M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  8.60M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.60M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.07M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.07M, False: 7.52M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  8.60M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 165k, False: 8.43M]
  ------------------
  647|   165k|          break;
  648|  8.43M|        switch (t) {
  649|  48.3k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 8.43M]
  |  |  |  |  ------------------
  |  |  |  |   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: 8.43M]
  |  |  |  |  ------------------
  |  |  |  |   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|  24.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  24.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 24.1k, False: 8.41M]
  |  |  |  |  ------------------
  |  |  |  |   50|  24.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 24.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  24.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  24.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  24.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|  24.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  24.1k|    break;
  |  |  ------------------
  |  |   63|  24.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 19, False: 8.43M]
  |  |  ------------------
  |  |   64|     19|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 8.43M]
  |  |  ------------------
  |  |   65|     25|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 8.43M]
  |  |  ------------------
  |  |   66|     25|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  68.2k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 68.2k, False: 8.37M]
  ------------------
  651|  68.2k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  68.2k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  68.2k|#  define MINBPC(enc) 2
  ------------------
  652|  68.2k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 13, False: 68.2k]
  ------------------
  653|     13|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 9, False: 4]
  ------------------
  654|      9|              *nextTokPtr = ptr;
  655|     13|            return tok;
  656|     13|          }
  657|  68.2k|          break;
  658|  68.2k|        }
  659|  68.2k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 7, False: 8.43M]
  ------------------
  660|      7|          *nextTokPtr = ptr;
  661|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  662|  8.34M|        default:
  ------------------
  |  Branch (662:9): [True: 8.34M, False: 92.4k]
  ------------------
  663|  8.34M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.34M|#  define MINBPC(enc) 2
  ------------------
  664|  8.34M|          break;
  665|  8.43M|        }
  666|  8.43M|      }
  667|   165k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   165k|#  define MINBPC(enc) 2
  ------------------
  668|   165k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   165k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   165k|    {                                                                          \
  |  |  |  |  135|   165k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   165k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 165k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|   165k|    }
  |  |  ------------------
  ------------------
  669|   165k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   165k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   165k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   165k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 165k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   160k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 160k, False: 4.89k]
  ------------------
  671|   161k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.16k, False: 164k]
  ------------------
  672|   163k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.70k, False: 163k]
  ------------------
  673|   163k|        break;
  674|    256|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 256, False: 165k]
  ------------------
  675|    256|        goto sol;
  676|  1.74k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.74k, False: 163k]
  ------------------
  677|  1.74k|        goto gt;
  678|     23|      default:
  ------------------
  |  Branch (678:7): [True: 23, False: 165k]
  ------------------
  679|     23|        *nextTokPtr = ptr;
  680|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  681|   165k|      }
  682|       |      /* ptr points to closing quote */
  683|   165k|      for (;;) {
  684|   165k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   165k|#  define MINBPC(enc) 2
  ------------------
  685|   165k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   165k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   165k|    {                                                                          \
  |  |  |  |  135|   165k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   165k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 165k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   165k|    }
  |  |  ------------------
  ------------------
  686|   165k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   165k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   165k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   164k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 164k, False: 1.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   131k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   163k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 995, False: 164k]
  |  |  ------------------
  |  |  111|   163k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    995|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    995|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    995|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 982]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|   163k|    /* fall through */                                                         \
  |  |  116|   163k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 129k, False: 35.3k]
  |  |  ------------------
  |  |  117|   163k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 32.1k, False: 133k]
  |  |  ------------------
  |  |  118|   163k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   163k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   163k|    break;                                                                     \
  |  |  120|   163k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 165k]
  |  |  |  |  ------------------
  |  |  |  |  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: 165k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 165k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    356|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 356, False: 164k]
  ------------------
  689|  1.02k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 672, False: 164k]
  ------------------
  690|  1.60k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 581, False: 164k]
  ------------------
  691|  1.60k|          continue;
  692|    353|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 353, False: 164k]
  ------------------
  693|  2.09k|        gt:
  694|  2.09k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.09k|#  define MINBPC(enc) 2
  ------------------
  695|  2.09k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.09k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    196|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 196, False: 165k]
  ------------------
  697|    452|        sol:
  698|    452|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    452|#  define MINBPC(enc) 2
  ------------------
  699|    452|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    452|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    452|    {                                                                          \
  |  |  |  |  135|    452|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    452|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    452|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 442]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    452|    }
  |  |  ------------------
  ------------------
  700|    442|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    442|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    442|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 432, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 424, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     18|            *nextTokPtr = ptr;
  702|     18|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  703|     18|          }
  704|    424|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    424|#  define MINBPC(enc) 2
  ------------------
  705|    424|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    424|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     11|        default:
  ------------------
  |  Branch (706:9): [True: 11, False: 165k]
  ------------------
  707|     11|          *nextTokPtr = ptr;
  708|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  709|   165k|        }
  710|   163k|        break;
  711|   165k|      }
  712|   163k|      break;
  713|   163k|    }
  714|   163k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 169k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   169k|    }
  718|   169k|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.09k|}
xmltok.c:big2_scanRef:
  545|   139k|                const char **nextTokPtr) {
  546|   139k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   139k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   139k|    {                                                                          \
  |  |  |  |  135|   139k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   139k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   139k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 139k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   139k|    }
  |  |  ------------------
  ------------------
  547|   139k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   139k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   139k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   130k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 130k, False: 9.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  22.3k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   131k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 9.22k, False: 130k]
  |  |  ------------------
  |  |  111|   131k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  9.22k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  9.22k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  9.22k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 9.21k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|   131k|    /* fall through */                                                         \
  |  |  116|   131k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.88k, False: 135k]
  |  |  ------------------
  |  |  117|   131k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 118k, False: 21.1k]
  |  |  ------------------
  |  |  118|   131k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   131k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   131k|    break;                                                                     \
  |  |  120|   131k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 139k]
  |  |  |  |  ------------------
  |  |  |  |  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: 139k]
  |  |  |  |  ------------------
  |  |  |  |  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|     12|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 139k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  7.96k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.96k, False: 131k]
  ------------------
  550|  7.96k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.96k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.96k|#  define MINBPC(enc) 2
  ------------------
  551|     12|  default:
  ------------------
  |  Branch (551:3): [True: 12, False: 139k]
  ------------------
  552|     12|    *nextTokPtr = ptr;
  553|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  554|   139k|  }
  555|   175k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   175k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   175k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   175k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   166k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 166k, False: 8.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   160k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  43.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 8.91k, False: 166k]
  |  |  ------------------
  |  |   82|  43.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  8.91k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  8.91k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  8.91k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 8.89k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  43.8k|    /* fall through */                                                         \
  |  |   87|  43.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 19.1k, False: 155k]
  |  |  ------------------
  |  |   88|  36.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.34k, False: 166k]
  |  |  ------------------
  |  |   89|  43.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 6.90k, False: 168k]
  |  |  ------------------
  |  |   90|  43.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 174k]
  |  |  ------------------
  |  |   91|  43.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 326, False: 174k]
  |  |  ------------------
  |  |   92|  43.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  43.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  43.8k|    break;                                                                     \
  |  |   94|  43.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 175k]
  |  |  |  |  ------------------
  |  |  |  |   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: 175k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 175k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   131k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 131k, False: 43.8k]
  ------------------
  559|   131k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   131k|#  define MINBPC(enc) 2
  ------------------
  560|   131k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   131k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     15|    default:
  ------------------
  |  Branch (561:5): [True: 15, False: 175k]
  ------------------
  562|     15|      *nextTokPtr = ptr;
  563|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  564|   175k|    }
  565|   175k|  }
  566|     51|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     51|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   131k|}
xmltok.c:big2_scanCharRef:
  514|  7.96k|                    const char **nextTokPtr) {
  515|  7.96k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.96k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.96k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.96k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.96k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  7.96k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  7.96k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.96k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.96k, False: 5]
  |  |  |  |  |  Branch (872:49): [True: 6.68k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  6.68k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.68k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.68k|#  define MINBPC(enc) 2
  ------------------
  518|  1.28k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.28k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.28k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.27k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.27k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.25k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.25k, False: 23]
  ------------------
  520|  1.25k|      break;
  521|     23|    default:
  ------------------
  |  Branch (521:5): [True: 23, False: 1.25k]
  ------------------
  522|     23|      *nextTokPtr = ptr;
  523|     23|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  524|  1.28k|    }
  525|  3.19k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.25k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.94k|#  define MINBPC(enc) 2
  ------------------
  526|  3.19k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.19k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.19k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.17k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.94k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.94k, False: 1.24k]
  ------------------
  528|  1.94k|        break;
  529|  1.22k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.22k, False: 1.97k]
  ------------------
  530|  1.22k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.22k|#  define MINBPC(enc) 2
  ------------------
  531|  1.22k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.22k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     27|      default:
  ------------------
  |  Branch (532:7): [True: 27, False: 3.16k]
  ------------------
  533|     27|        *nextTokPtr = ptr;
  534|     27|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  535|  3.19k|      }
  536|  3.19k|    }
  537|  1.25k|  }
  538|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.96k|}
xmltok.c:big2_scanHexCharRef:
  483|  6.68k|                       const char **nextTokPtr) {
  484|  6.68k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.68k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.68k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.68k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.68k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.68k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.68k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.67k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.67k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.66k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.66k, False: 2.01k]
  ------------------
  487|  6.67k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.00k, False: 4.68k]
  ------------------
  488|  6.67k|      break;
  489|     15|    default:
  ------------------
  |  Branch (489:5): [True: 15, False: 6.67k]
  ------------------
  490|     15|      *nextTokPtr = ptr;
  491|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  492|  6.68k|    }
  493|  19.5k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  6.67k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  12.8k|#  define MINBPC(enc) 2
  ------------------
  494|  19.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  19.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  19.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  19.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 19.5k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.64k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.64k, False: 13.9k]
  ------------------
  496|  12.8k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 7.25k, False: 12.3k]
  ------------------
  497|  12.8k|        break;
  498|  6.62k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.62k, False: 12.9k]
  ------------------
  499|  6.62k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.62k|#  define MINBPC(enc) 2
  ------------------
  500|  6.62k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.62k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     33|      default:
  ------------------
  |  Branch (501:7): [True: 33, False: 19.5k]
  ------------------
  502|     33|        *nextTokPtr = ptr;
  503|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  504|  19.5k|      }
  505|  19.5k|    }
  506|  6.67k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.68k|}
xmltok.c:big2_cdataSectionTok:
  356|  40.0k|                        const char **nextTokPtr) {
  357|  40.0k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 154, False: 39.9k]
  ------------------
  358|    154|    return XML_TOK_NONE;
  ------------------
  |  |   51|    154|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  39.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  39.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  39.9k|    size_t n = end - ptr;
  361|  39.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  39.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 10.0k, False: 29.8k]
  ------------------
  362|  10.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
  363|  10.0k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 19, False: 10.0k]
  ------------------
  364|     19|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     19|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  10.0k|      end = ptr + n;
  366|  10.0k|    }
  367|  39.9k|  }
  368|  39.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  39.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  35.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 35.7k, False: 4.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  13.9k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 13.9k, False: 25.9k]
  ------------------
  370|  13.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.9k|#  define MINBPC(enc) 2
  ------------------
  371|  13.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.9k|    {                                                                          \
  |  |  |  |  135|  13.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 13.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  13.9k|    }
  |  |  ------------------
  ------------------
  372|  13.9k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  13.9k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  13.9k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 10.5k, False: 3.39k]
  |  |  |  |  |  Branch (872:49): [True: 5.05k, False: 5.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  8.90k|      break;
  374|  5.05k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.05k|#  define MINBPC(enc) 2
  ------------------
  375|  5.05k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.05k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.05k|    {                                                                          \
  |  |  |  |  135|  5.05k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.05k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 5.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  5.05k|    }
  |  |  ------------------
  ------------------
  376|  5.05k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.62k, False: 1.42k]
  |  |  |  |  |  Branch (872:49): [True: 285, False: 3.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  4.76k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  4.76k|#  define MINBPC(enc) 2
  ------------------
  378|  4.76k|      break;
  379|  4.76k|    }
  380|    285|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    285|#  define MINBPC(enc) 2
  ------------------
  381|    285|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    285|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  12.2k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 12.2k, False: 27.6k]
  ------------------
  383|  12.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.2k|#  define MINBPC(enc) 2
  ------------------
  384|  12.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.2k|    {                                                                          \
  |  |  |  |  135|  12.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 12.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  12.2k|    }
  |  |  ------------------
  ------------------
  385|  12.2k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  12.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.19k, False: 3.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 617, False: 11.6k]
  ------------------
  386|    617|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    617|#  define MINBPC(enc) 2
  ------------------
  387|  12.2k|    *nextTokPtr = ptr;
  388|  12.2k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  4.13k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 4.13k, False: 35.7k]
  ------------------
  390|  4.13k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.13k|#  define MINBPC(enc) 2
  ------------------
  391|  4.13k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.13k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  4.13k|    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.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: 39.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.68k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.62k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.68k, False: 38.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.68k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 58, False: 1.62k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.62k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     58|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.62k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.62k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.62k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.62k|    break;
  |  |  ------------------
  |  |   63|  1.62k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 53, False: 39.8k]
  |  |  ------------------
  |  |   64|     53|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 39.9k]
  |  |  ------------------
  |  |   65|     64|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 39.9k]
  |  |  ------------------
  |  |   66|     64|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     64|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     64|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  7.79k|  default:
  ------------------
  |  Branch (393:3): [True: 7.79k, False: 32.1k]
  ------------------
  394|  7.79k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.79k|#  define MINBPC(enc) 2
  ------------------
  395|  7.79k|    break;
  396|  39.9k|  }
  397|  1.40M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.40M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.40M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.40M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  60.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 60.9k, False: 1.34M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.40M]
  |  |  ------------------
  |  |  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.40M]
  |  |  ------------------
  |  |  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|  21.5k|      LEAD_CASE(4)
  ------------------
  |  |  400|  21.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 21.5k, False: 1.38M]
  |  |  ------------------
  |  |  401|  21.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  21.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 54, False: 21.4k]
  |  |  ------------------
  |  |  402|     54|      *nextTokPtr = ptr;                                                       \
  |  |  403|     54|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     54|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     54|    }                                                                          \
  |  |  405|  21.4k|    ptr += n;                                                                  \
  |  |  406|  21.4k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     48|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 48, False: 1.40M]
  ------------------
  412|     48|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.40M]
  ------------------
  413|     55|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 7, False: 1.40M]
  ------------------
  414|  9.46k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 9.41k, False: 1.39M]
  ------------------
  415|  12.9k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 3.49k, False: 1.40M]
  ------------------
  416|  22.8k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 9.92k, False: 1.39M]
  ------------------
  417|  22.8k|      *nextTokPtr = ptr;
  418|  22.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.36M|    default:
  ------------------
  |  Branch (419:5): [True: 1.36M, False: 44.4k]
  ------------------
  420|  1.36M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.36M|#  define MINBPC(enc) 2
  ------------------
  421|  1.36M|      break;
  422|  1.40M|    }
  423|  1.40M|  }
  424|    145|  *nextTokPtr = ptr;
  425|    145|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    145|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  23.0k|}
xmltok.c:big2_attributeValueTok:
 1262|   151k|                          const char **nextTokPtr) {
 1263|   151k|  const char *start;
 1264|   151k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.99k, False: 148k]
  ------------------
 1265|  2.99k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.99k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   148k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   148k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   148k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   148k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 148k]
  ------------------
 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|   148k|  start = ptr;
 1275|  5.00M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  5.00M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.00M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.00M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   201k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 201k, False: 4.80M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 5.00M]
  |  |  ------------------
  |  | 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: 5.00M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  5.85k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  5.85k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 5.85k, False: 4.99M]
  |  |  ------------------
  |  | 1279|  5.85k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  5.85k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  83.1k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 83.1k, False: 4.92M]
  ------------------
 1286|  83.1k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 56.9k, False: 26.1k]
  ------------------
 1287|  56.9k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  56.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  56.9k|#  define MINBPC(enc) 2
  ------------------
 1288|  26.1k|      *nextTokPtr = ptr;
 1289|  26.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  26.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 5.00M]
  ------------------
 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.29k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 1.29k, False: 5.00M]
  ------------------
 1295|  1.29k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 909, False: 382]
  ------------------
 1296|    909|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    909|#  define MINBPC(enc) 2
  ------------------
 1297|    909|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    909|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|    909|      }
 1299|    382|      *nextTokPtr = ptr;
 1300|    382|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    382|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  56.6k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 56.6k, False: 4.94M]
  ------------------
 1302|  56.6k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 30.3k, False: 26.2k]
  ------------------
 1303|  30.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.3k|#  define MINBPC(enc) 2
  ------------------
 1304|  30.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  30.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  30.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  30.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 439, False: 29.9k]
  ------------------
 1305|    439|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    439|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  29.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  29.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 17.5k, False: 12.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 422, False: 29.4k]
  ------------------
 1307|    422|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    422|#  define MINBPC(enc) 2
  ------------------
 1308|  29.9k|        *nextTokPtr = ptr;
 1309|  29.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  29.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  30.3k|      }
 1311|  26.2k|      *nextTokPtr = ptr;
 1312|  26.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  26.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  5.96k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 5.96k, False: 4.99M]
  ------------------
 1314|  5.96k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 5.09k, False: 876]
  ------------------
 1315|  5.09k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.09k|#  define MINBPC(enc) 2
  ------------------
 1316|  5.09k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  5.09k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  5.09k|      }
 1318|    876|      *nextTokPtr = ptr;
 1319|    876|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    876|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  4.85M|    default:
  ------------------
  |  Branch (1320:5): [True: 4.85M, False: 152k]
  ------------------
 1321|  4.85M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.85M|#  define MINBPC(enc) 2
  ------------------
 1322|  4.85M|      break;
 1323|  5.00M|    }
 1324|  5.00M|  }
 1325|  1.51k|  *nextTokPtr = ptr;
 1326|  1.51k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.51k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   148k|}
xmltok.c:big2_entityValueTok:
 1331|  57.1k|                       const char **nextTokPtr) {
 1332|  57.1k|  const char *start;
 1333|  57.1k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.27k, False: 54.8k]
  ------------------
 1334|  2.27k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.27k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  54.8k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  54.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  54.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  54.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 54.8k]
  ------------------
 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|  54.8k|  start = ptr;
 1344|  29.6M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  29.6M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  29.6M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.6M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   225k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 225k, False: 29.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: 29.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: 29.6M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  55.5k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  55.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 55.5k, False: 29.5M]
  |  |  ------------------
  |  | 1348|  55.5k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  55.5k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  6.35k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 6.35k, False: 29.6M]
  ------------------
 1355|  6.35k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 3.58k, False: 2.76k]
  ------------------
 1356|  3.58k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.58k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.58k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.76k|      *nextTokPtr = ptr;
 1358|  2.76k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.76k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 29.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|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 5]
  ------------------
 1363|      6|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  23.9k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 23.9k, False: 29.5M]
  ------------------
 1367|  23.9k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 12.7k, False: 11.2k]
  ------------------
 1368|  12.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  12.7k|#  define MINBPC(enc) 2
  ------------------
 1369|  12.7k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  12.7k|      }
 1371|  11.2k|      *nextTokPtr = ptr;
 1372|  11.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  22.7k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 22.7k, False: 29.5M]
  ------------------
 1374|  22.7k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 13.0k, False: 9.70k]
  ------------------
 1375|  13.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.0k|#  define MINBPC(enc) 2
  ------------------
 1376|  13.0k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  13.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 185, False: 12.8k]
  ------------------
 1377|    185|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    185|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  12.8k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  12.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.89k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.89k, False: 2.99k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 911, False: 11.9k]
  ------------------
 1379|    911|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    911|#  define MINBPC(enc) 2
  ------------------
 1380|  12.8k|        *nextTokPtr = ptr;
 1381|  12.8k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  13.0k|      }
 1383|  9.70k|      *nextTokPtr = ptr;
 1384|  9.70k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.70k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  29.5M|    default:
  ------------------
  |  Branch (1385:5): [True: 29.5M, False: 108k]
  ------------------
 1386|  29.5M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  29.5M|#  define MINBPC(enc) 2
  ------------------
 1387|  29.5M|      break;
 1388|  29.6M|    }
 1389|  29.6M|  }
 1390|  1.71k|  *nextTokPtr = ptr;
 1391|  1.71k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.71k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  54.8k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  24.1k|                         const char *end1, const char *ptr2) {
 1716|  24.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   103k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  79.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 91.1k, False: 12.5k]
  ------------------
 1718|  91.1k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  91.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 36, False: 91.1k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     36|      return 0; /* LCOV_EXCL_LINE */
 1725|     36|    }
 1726|  91.1k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  91.1k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  91.1k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 91.0k, False: 35]
  |  |  |  |  |  Branch (872:49): [True: 79.5k, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  11.5k|      return 0;
 1728|  91.1k|  }
 1729|  12.5k|  return ptr1 == end1;
 1730|  24.1k|}
xmltok.c:big2_nameLength:
 1733|  14.0k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  14.0k|  const char *start = ptr;
 1735|   834k|  for (;;) {
 1736|   834k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   834k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   834k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.9k, False: 803k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 834k]
  |  |  ------------------
  |  | 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: 834k]
  |  |  ------------------
  |  | 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: 834k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   803k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 803k, False: 30.9k]
  ------------------
 1746|   815k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 11.3k, False: 823k]
  ------------------
 1747|   815k|#  ifdef XML_NS
 1748|   815k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 834k]
  ------------------
 1749|   815k|#  endif
 1750|   820k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 5.08k, False: 829k]
  ------------------
 1751|   820k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 40, False: 834k]
  ------------------
 1752|   820k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 266, False: 834k]
  ------------------
 1753|   820k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 136, False: 834k]
  ------------------
 1754|   820k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   820k|#  define MINBPC(enc) 2
  ------------------
 1755|   820k|      break;
 1756|  14.0k|    default:
  ------------------
  |  Branch (1756:5): [True: 14.0k, False: 820k]
  ------------------
 1757|  14.0k|      return (int)(ptr - start);
 1758|   834k|    }
 1759|   834k|  }
 1760|  14.0k|}
xmltok.c:big2_getAtts:
 1510|  9.73k|                ATTRIBUTE *atts) {
 1511|  9.73k|  enum { other, inName, inValue } state = inName;
 1512|  9.73k|  int nAtts = 0;
 1513|  9.73k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  13.4M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.73k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  13.4M|#  define MINBPC(enc) 2
  ------------------
 1517|  13.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  13.4M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.4M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.51M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.51M, False: 9.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 13.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));                                       \
  |  |  ------------------
  |  |  |  |  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: 13.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));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|  40.3k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  40.3k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 40.3k, False: 13.4M]
  |  |  ------------------
  |  | 1528|  40.3k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  40.3k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 40.3k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  40.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  40.3k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  9.89M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 9.89M, False: 3.55M]
  ------------------
 1535|  10.2M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 364k, False: 13.0M]
  ------------------
 1536|  10.4M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 174k, False: 13.2M]
  ------------------
 1537|  10.4M|      START_NAME
  ------------------
  |  | 1519|  10.4M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 324k, False: 10.1M]
  |  |  ------------------
  |  | 1520|   324k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 165k, False: 158k]
  |  |  ------------------
  |  | 1521|   165k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   165k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   165k|      }                                                                        \
  |  | 1524|   324k|      state = inName;                                                          \
  |  | 1525|   324k|    }
  ------------------
 1538|  10.4M|      break;
 1539|      0|#  undef START_NAME
 1540|  32.4k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 32.4k, False: 13.4M]
  ------------------
 1541|  32.4k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 5.75k, False: 26.6k]
  ------------------
 1542|  5.75k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 3.84k, False: 1.91k]
  ------------------
 1543|  3.84k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.84k|#  define MINBPC(enc) 2
  ------------------
 1544|  5.75k|        state = inValue;
 1545|  5.75k|        open = BT_QUOT;
 1546|  26.6k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 5.75k, False: 20.9k]
  ------------------
 1547|  5.75k|        state = other;
 1548|  5.75k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 3.84k, False: 1.91k]
  ------------------
 1549|  3.84k|          atts[nAtts].valueEnd = ptr;
 1550|  5.75k|        nAtts++;
 1551|  5.75k|      }
 1552|  32.4k|      break;
 1553|   637k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 637k, False: 12.8M]
  ------------------
 1554|   637k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 318k, False: 319k]
  ------------------
 1555|   318k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 161k, False: 157k]
  ------------------
 1556|   161k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   161k|#  define MINBPC(enc) 2
  ------------------
 1557|   318k|        state = inValue;
 1558|   318k|        open = BT_APOS;
 1559|   319k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 318k, False: 252]
  ------------------
 1560|   318k|        state = other;
 1561|   318k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 161k, False: 157k]
  ------------------
 1562|   161k|          atts[nAtts].valueEnd = ptr;
 1563|   318k|        nAtts++;
 1564|   318k|      }
 1565|   637k|      break;
 1566|  78.2k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 78.2k, False: 13.3M]
  ------------------
 1567|  78.2k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 68.0k, False: 10.2k]
  ------------------
 1568|  68.0k|        atts[nAtts].normalized = 0;
 1569|  78.2k|      break;
 1570|   989k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 989k, False: 12.4M]
  ------------------
 1571|   989k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.65k, False: 986k]
  ------------------
 1572|  2.65k|        state = other;
 1573|   986k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 666k, False: 320k]
  |  Branch (1573:36): [True: 337k, False: 328k]
  |  Branch (1573:55): [True: 173k, False: 163k]
  ------------------
 1574|   986k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 29.0k, False: 144k]
  ------------------
 1575|   173k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|   144k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   144k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 144k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   317k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 11.0k, False: 133k]
  ------------------
 1576|   173k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|   133k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|   133k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 114k, False: 19.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   306k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 72.4k, False: 60.8k]
  ------------------
 1577|   173k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  60.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  60.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 41.7k, False: 19.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 32.0k, False: 28.7k]
  ------------------
 1578|   144k|        atts[nAtts].normalized = 0;
 1579|   989k|      break;
 1580|   222k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 222k, False: 13.2M]
  ------------------
 1581|   257k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 35.1k, False: 13.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|   257k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.29k, False: 254k]
  ------------------
 1585|  2.29k|        state = other;
 1586|   254k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 251k, False: 3.93k]
  |  Branch (1586:36): [True: 141k, False: 109k]
  ------------------
 1587|   141k|        atts[nAtts].normalized = 0;
 1588|   257k|      break;
 1589|   284k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 284k, False: 13.1M]
  ------------------
 1590|   285k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 1.57k, False: 13.4M]
  ------------------
 1591|   285k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 9.73k, False: 275k]
  ------------------
 1592|  9.73k|        return nAtts;
 1593|   275k|      break;
 1594|   697k|    default:
  ------------------
  |  Branch (1594:5): [True: 697k, False: 12.7M]
  ------------------
 1595|   697k|      break;
 1596|  13.4M|    }
 1597|  13.4M|  }
 1598|       |  /* not reached */
 1599|  9.73k|}
xmltok.c:big2_charRefNumber:
 1602|  3.84k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  3.84k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  3.84k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.84k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  3.84k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  3.84k|#  define MINBPC(enc) 2
  ------------------
 1607|  3.84k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  3.84k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.84k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.84k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 3.00k, False: 842]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  14.5k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  3.00k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  14.5k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  14.5k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 14.5k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 2.97k, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  11.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  11.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  11.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  11.5k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  11.5k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 11.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  11.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 11.5k]
  ------------------
 1612|    266|      case ASCII_0:
  ------------------
  |  |   90|    266|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 266, False: 11.3k]
  ------------------
 1613|    909|      case ASCII_1:
  ------------------
  |  |   91|    909|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 643, False: 10.9k]
  ------------------
 1614|  1.23k|      case ASCII_2:
  ------------------
  |  |   92|  1.23k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 329, False: 11.2k]
  ------------------
 1615|  1.81k|      case ASCII_3:
  ------------------
  |  |   93|  1.81k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 572, False: 11.0k]
  ------------------
 1616|  2.50k|      case ASCII_4:
  ------------------
  |  |   94|  2.50k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 691, False: 10.8k]
  ------------------
 1617|  3.84k|      case ASCII_5:
  ------------------
  |  |   95|  3.84k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.33k, False: 10.2k]
  ------------------
 1618|  4.17k|      case ASCII_6:
  ------------------
  |  |   96|  4.17k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 337, False: 11.2k]
  ------------------
 1619|  4.38k|      case ASCII_7:
  ------------------
  |  |   97|  4.38k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 206, False: 11.3k]
  ------------------
 1620|  5.26k|      case ASCII_8:
  ------------------
  |  |   98|  5.26k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 882, False: 10.7k]
  ------------------
 1621|  6.23k|      case ASCII_9:
  ------------------
  |  |   99|  6.23k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 968, False: 10.6k]
  ------------------
 1622|  6.23k|        result <<= 4;
 1623|  6.23k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  6.23k|#define ASCII_0 0x30
  ------------------
 1624|  6.23k|        break;
 1625|    225|      case ASCII_A:
  ------------------
  |  |   36|    225|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 225, False: 11.3k]
  ------------------
 1626|    513|      case ASCII_B:
  ------------------
  |  |   37|    513|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 288, False: 11.2k]
  ------------------
 1627|    715|      case ASCII_C:
  ------------------
  |  |   38|    715|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 202, False: 11.3k]
  ------------------
 1628|  1.09k|      case ASCII_D:
  ------------------
  |  |   39|  1.09k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 380, False: 11.2k]
  ------------------
 1629|  2.05k|      case ASCII_E:
  ------------------
  |  |   40|  2.05k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 962, False: 10.6k]
  ------------------
 1630|  3.34k|      case ASCII_F:
  ------------------
  |  |   41|  3.34k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.29k, False: 10.2k]
  ------------------
 1631|  3.34k|        result <<= 4;
 1632|  3.34k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.34k|#define ASCII_A 0x41
  ------------------
 1633|  3.34k|        break;
 1634|    280|      case ASCII_a:
  ------------------
  |  |   63|    280|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 280, False: 11.3k]
  ------------------
 1635|    490|      case ASCII_b:
  ------------------
  |  |   64|    490|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 210, False: 11.3k]
  ------------------
 1636|    785|      case ASCII_c:
  ------------------
  |  |   65|    785|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 295, False: 11.2k]
  ------------------
 1637|  1.07k|      case ASCII_d:
  ------------------
  |  |   66|  1.07k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 286, False: 11.2k]
  ------------------
 1638|  1.30k|      case ASCII_e:
  ------------------
  |  |   67|  1.30k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 234, False: 11.3k]
  ------------------
 1639|  2.00k|      case ASCII_f:
  ------------------
  |  |   68|  2.00k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 698, False: 10.8k]
  ------------------
 1640|  2.00k|        result <<= 4;
 1641|  2.00k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.00k|#define ASCII_a 0x61
  ------------------
 1642|  2.00k|        break;
 1643|  11.5k|      }
 1644|  11.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 26, False: 11.5k]
  ------------------
 1645|     26|        return -1;
 1646|  11.5k|    }
 1647|  3.00k|  } else {
 1648|  3.04k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  3.04k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.04k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.04k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 840, False: 2.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.20k|#  define MINBPC(enc) 2
  ------------------
 1649|  2.20k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  2.20k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.20k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.20k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  2.20k|      result *= 10;
 1651|  2.20k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  2.20k|#define ASCII_0 0x30
  ------------------
 1652|  2.20k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 2, False: 2.20k]
  ------------------
 1653|      2|        return -1;
 1654|  2.20k|    }
 1655|    842|  }
 1656|  3.81k|  return checkCharRefNumber(result);
 1657|  3.84k|}
xmltok.c:big2_predefinedEntityName:
 1661|  67.0k|                             const char *end) {
 1662|  67.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  67.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  67.0k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  67.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 59.6k, False: 7.38k]
  ------------------
 1664|  2.06k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.06k, False: 64.9k]
  ------------------
 1665|  2.06k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  2.06k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.06k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.45k, False: 606]
  |  |  |  |  |  Branch (872:49): [True: 918, False: 537]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    918|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    918|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    918|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 506, False: 412]
  |  |  |  |  |  Branch (871:32): [True: 432, False: 486]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    402|      case ASCII_l:
  ------------------
  |  |   74|    402|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 402, False: 516]
  ------------------
 1668|    402|        return ASCII_LT;
  ------------------
  |  |  111|    402|#define ASCII_LT 0x3C
  ------------------
 1669|     10|      case ASCII_g:
  ------------------
  |  |   69|     10|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 10, False: 908]
  ------------------
 1670|     10|        return ASCII_GT;
  ------------------
  |  |  113|     10|#define ASCII_GT 0x3E
  ------------------
 1671|    918|      }
 1672|    918|    }
 1673|  1.64k|    break;
 1674|  1.64k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.61k, False: 65.4k]
  ------------------
 1675|  1.61k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.61k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.61k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.31k, False: 301]
  |  |  |  |  |  Branch (872:49): [True: 1.07k, False: 241]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.07k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.07k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.07k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.07k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.07k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 861, False: 213]
  |  |  |  |  |  Branch (872:49): [True: 650, False: 211]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    650|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    650|#  define MINBPC(enc) 2
  ------------------
 1679|    650|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    650|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    650|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 448, False: 202]
  |  |  |  |  |  Branch (872:49): [True: 206, False: 242]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    206|          return ASCII_AMP;
  ------------------
  |  |  105|    206|#define ASCII_AMP 0x26
  ------------------
 1681|    650|      }
 1682|  1.07k|    }
 1683|  1.41k|    break;
 1684|  3.70k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.70k, False: 63.3k]
  ------------------
 1685|  3.70k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.70k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.70k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 334, False: 3.37k]
  |  |  |  |  |  Branch (871:32): [True: 3.44k, False: 266]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.56k|    case ASCII_q:
  ------------------
  |  |   79|  1.56k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.56k, False: 2.14k]
  ------------------
 1687|  1.56k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.56k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.56k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  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.31k, False: 258]
  |  |  |  |  |  Branch (872:49): [True: 1.05k, False: 258]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.05k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 846, False: 206]
  |  |  |  |  |  Branch (872:49): [True: 651, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    651|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    651|#  define MINBPC(enc) 2
  ------------------
 1692|    651|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    651|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    651|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 416, False: 235]
  |  |  |  |  |  Branch (872:49): [True: 216, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    216|            return ASCII_QUOT;
  ------------------
  |  |  104|    216|#define ASCII_QUOT 0x22
  ------------------
 1694|    651|        }
 1695|  1.05k|      }
 1696|  1.35k|      break;
 1697|  1.80k|    case ASCII_a:
  ------------------
  |  |   63|  1.80k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.80k, False: 1.90k]
  ------------------
 1698|  1.80k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.80k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  1.80k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.80k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.46k, False: 339]
  |  |  |  |  |  Branch (872:49): [True: 1.03k, False: 433]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.03k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.03k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.03k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  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: 833, False: 202]
  |  |  |  |  |  Branch (872:49): [True: 595, False: 238]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    595|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    595|#  define MINBPC(enc) 2
  ------------------
 1703|    595|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    595|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    595|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 389, False: 206]
  |  |  |  |  |  Branch (872:49): [True: 194, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    194|            return ASCII_APOS;
  ------------------
  |  |  106|    194|#define ASCII_APOS 0x27
  ------------------
 1705|    595|        }
 1706|  1.03k|      }
 1707|  1.61k|      break;
 1708|  3.70k|    }
 1709|  67.0k|  }
 1710|  65.9k|  return 0;
 1711|  67.0k|}
xmltok.c:big2_updatePosition:
 1779|  3.48k|                       POSITION *pos) {
 1780|  6.88M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  6.88M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.88M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.88M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   355k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 355k, False: 6.53M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 6.88M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 6.88M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  27.0k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  27.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 27.0k, False: 6.86M]
  |  |  ------------------
  |  | 1784|  27.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  27.0k|    pos->columnNumber++;                                                       \
  |  | 1786|  27.0k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  9.54k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 9.54k, False: 6.87M]
  ------------------
 1792|  9.54k|      pos->columnNumber = 0;
 1793|  9.54k|      pos->lineNumber++;
 1794|  9.54k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.54k|#  define MINBPC(enc) 2
  ------------------
 1795|  9.54k|      break;
 1796|  35.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 35.0k, False: 6.85M]
  ------------------
 1797|  35.0k|      pos->lineNumber++;
 1798|  35.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  35.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  35.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  35.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  70.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  35.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 35.0k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  35.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  35.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.9k, False: 12.0k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.43k, False: 33.5k]
  ------------------
 1800|  1.43k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.43k|#  define MINBPC(enc) 2
  ------------------
 1801|  35.0k|      pos->columnNumber = 0;
 1802|  35.0k|      break;
 1803|  6.81M|    default:
  ------------------
  |  Branch (1803:5): [True: 6.81M, False: 71.6k]
  ------------------
 1804|  6.81M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.81M|#  define MINBPC(enc) 2
  ------------------
 1805|  6.81M|      pos->columnNumber++;
 1806|  6.81M|      break;
 1807|  6.88M|    }
 1808|  6.88M|  }
 1809|  3.48k|}
xmltok.c:big2_isPublicId:
 1450|  1.05k|                   const char **badPtr) {
 1451|  1.05k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.05k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1453|  10.5k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.5k|#  define MINBPC(enc) 2
  ------------------
 1454|  10.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.5k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    781|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 781, False: 9.79k]
  ------------------
 1456|  1.52k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 739, False: 9.83k]
  ------------------
 1457|  1.92k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 409, False: 10.1k]
  ------------------
 1458|  2.12k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 199, False: 10.3k]
  ------------------
 1459|  2.39k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 269, False: 10.3k]
  ------------------
 1460|  2.78k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 392, False: 10.1k]
  ------------------
 1461|  3.12k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 331, False: 10.2k]
  ------------------
 1462|  3.89k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 776, False: 9.79k]
  ------------------
 1463|  4.47k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 576, False: 9.99k]
  ------------------
 1464|  4.72k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 249, False: 10.3k]
  ------------------
 1465|  4.91k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 196, False: 10.3k]
  ------------------
 1466|  5.54k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 628, False: 9.94k]
  ------------------
 1467|  5.79k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 247, False: 10.3k]
  ------------------
 1468|  5.99k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 204, False: 10.3k]
  ------------------
 1469|  6.44k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 452, False: 10.1k]
  ------------------
 1470|  6.72k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 273, False: 10.2k]
  ------------------
 1471|  6.94k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 227, False: 10.3k]
  ------------------
 1472|  7.23k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 289, False: 10.2k]
  ------------------
 1473|  7.23k|#  ifdef XML_NS
 1474|  7.23k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 10.5k]
  ------------------
 1475|  7.23k|#  endif
 1476|  7.23k|      break;
 1477|    235|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 235, False: 10.3k]
  ------------------
 1478|    235|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    235|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    235|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 235, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 234]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    234|      break;
 1483|    325|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 325, False: 10.2k]
  ------------------
 1484|  2.48k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.16k, False: 8.40k]
  ------------------
 1485|  2.48k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  2.48k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.48k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.48k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.48k, False: 8]
  ------------------
 1486|  2.48k|        break;
 1487|       |      /* fall through */
 1488|    618|    default:
  ------------------
  |  Branch (1488:5): [True: 610, False: 9.96k]
  ------------------
 1489|    618|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    618|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    618|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 591, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    220|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 220, False: 398]
  ------------------
 1491|    582|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 362, False: 256]
  ------------------
 1492|    582|        break;
 1493|     36|      default:
  ------------------
  |  Branch (1493:7): [True: 36, False: 582]
  ------------------
 1494|     36|        *badPtr = ptr;
 1495|     36|        return 0;
 1496|    618|      }
 1497|    582|      break;
 1498|  10.5k|    }
 1499|  10.5k|  }
 1500|  1.01k|  return 1;
 1501|  1.05k|}

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

